diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 61b1d572..09c7bc5b 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -37,7 +37,9 @@ "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" status)", "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" add -A)", "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" commit -m \"$(cat <<''EOF''\nrefactor(identity): remove province/city/address fields\n\n- Remove provinceCode, cityCode, address from UserAccount aggregate\n- Remove ProvinceCode, CityCode value objects\n- Remove UserLocationUpdatedEvent domain event\n- Update Prisma schema to drop province/city/address columns\n- Update repository, mapper, handlers, services and DTOs\n- Clean up tests and factory files\n\nProvince/city should belong to adoption-service as transaction data,\nnot identity-service user data.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \nEOF\n)\")", - "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" push)" + "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" push)", + "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" commit -m \"$(cat <<''EOF''\nfix(identity): update migration to TEXT avatar and remove province/city/address\n\n- Change avatar_url column from VARCHAR(500) to TEXT\n- Remove province_code, city_code, address columns from user_accounts\n- Remove idx_province_city index\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \nEOF\n)\")", + "Bash(git -C \"c:\\Users\\dong\\Desktop\\rwadurian\" commit -m \"$(cat <<''EOF''\nfix(identity): remove address from updateProfile and fix deviceInfo type\n\n- Remove dto.address parameter from updateProfile controller\n- Remove address property from updateProfile service\n- Fix deviceInfo JSON serialization for Prisma InputJsonValue type\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \nEOF\n)\")" ], "deny": [], "ask": [] diff --git a/backend/services/identity-service/src/api/controllers/user-account.controller.ts b/backend/services/identity-service/src/api/controllers/user-account.controller.ts index 9457a699..ea56b55b 100644 --- a/backend/services/identity-service/src/api/controllers/user-account.controller.ts +++ b/backend/services/identity-service/src/api/controllers/user-account.controller.ts @@ -124,7 +124,7 @@ export class UserAccountController { @ApiOperation({ summary: '更新用户资料' }) async updateProfile(@CurrentUser() user: CurrentUserData, @Body() dto: UpdateProfileDto) { await this.userService.updateProfile( - new UpdateProfileCommand(user.userId, dto.nickname, dto.avatarUrl, dto.address), + new UpdateProfileCommand(user.userId, dto.nickname, dto.avatarUrl), ); return { message: '更新成功' }; } diff --git a/backend/services/identity-service/src/application/services/user-application.service.ts b/backend/services/identity-service/src/application/services/user-application.service.ts index 143b4b83..b66b1ba3 100644 --- a/backend/services/identity-service/src/application/services/user-application.service.ts +++ b/backend/services/identity-service/src/application/services/user-application.service.ts @@ -371,7 +371,6 @@ export class UserApplicationService { account.updateProfile({ nickname: command.nickname, avatarUrl: command.avatarUrl, - address: command.address, }); await this.userRepository.save(account); diff --git a/backend/services/identity-service/src/infrastructure/persistence/repositories/user-account.repository.impl.ts b/backend/services/identity-service/src/infrastructure/persistence/repositories/user-account.repository.impl.ts index c32d4d1e..34578861 100644 --- a/backend/services/identity-service/src/infrastructure/persistence/repositories/user-account.repository.impl.ts +++ b/backend/services/identity-service/src/infrastructure/persistence/repositories/user-account.repository.impl.ts @@ -76,7 +76,7 @@ export class UserAccountRepositoryImpl implements UserAccountRepository { userId: savedUserId, deviceId: d.deviceId, deviceName: d.deviceName, - deviceInfo: d.deviceInfo || null, // 100% 保存完整 JSON + deviceInfo: d.deviceInfo ? JSON.parse(JSON.stringify(d.deviceInfo)) : null, // 100% 保存完整 JSON platform: (info as any).platform || null, deviceModel: (info as any).model || null, osVersion: (info as any).osVersion || null,