feat(user): implement user profile management functionality

- Add user nickname update endpoint with validation
- Introduce user profile update endpoint supporting nickname and password changes
- Create UserProfileResponse DTO with nickname field
- Add SetUserNicknameRequest DTO for nickname updates
- Implement UserProfileUpdateRequest DTO for profile modifications
- Refactor UserService to UserProfileService with enhanced capabilities
- Update UserMapper to include nickname in result mapping
- Add new error codes for nickname and profile update failures
- Modify CORS configuration to allow requests from localhost:5173
- Remove obsolete AppConfig RestTemplate bean definition
- Rename UserinfoResponse to UserProfileResponse for consistency
- Adjust controller endpoints to use updated service and DTOs
- Add transactional support for user profile updates
- Improve error handling for user-related operations
This commit is contained in:
Chaos
2025-11-21 17:14:50 +08:00
parent d4bbaf6715
commit b2c6cfe90a
11 changed files with 219 additions and 99 deletions

View File

@@ -70,6 +70,7 @@ public interface UserMapper extends BaseMapper<User> {
@Results({
@Result(id = true, property = "id", column = "id"),
@Result(property = "username", column = "username"),
@Result(property = "nickname", column = "nickname"),
@Result(property = "roles", column = "id",
many = @Many(select = "findRolesByUserId"))
})