feat: 全量 Controller 接口中文注解补全完成

- 39 个 Controller 全部添加 @Tag/@Operation/@Parameter 中文注解(共 278 个 @Operation)
- 分 3 批实施:Batch 1 AI+社区(7)、Batch 2 情绪+日记+互动(11)、Batch 3 其他(13)
- 已有注解的 8 个 Controller 不重复修改
- 编译验证通过:mvn clean install -DskipTests — BUILD SUCCESS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 23:27:39 +08:00
parent 88bec9b5df
commit d1a0018d1b
34 changed files with 2014 additions and 135 deletions
@@ -25,7 +25,7 @@ import java.util.List;
*/
@RestController
@RequestMapping("/user-profile")
@Tag(name = "用户档案管理", description = "用户生命档案的增删改查和查询功能")
@Tag(name = "用户档案管理", description = "用户档案的查询、创建、更新、删除和 AI 设置管理接口")
public class UserProfileController {
@Autowired
@@ -34,6 +34,7 @@ public class UserProfileController {
/**
* 新增档案
*/
@Operation(summary = "创建用户档案", description = "为当前用户创建个人档案,包含昵称、MBTI 人格类型、童年经历等。")
@PostMapping("/create")
public Result<UserProfileResponse> create(@Valid @RequestBody UserProfileCreateRequest request) {
UserProfileResponse response = userProfileService.createProfile(request);
@@ -43,8 +44,9 @@ public class UserProfileController {
/**
* 删除档案
*/
@Operation(summary = "删除用户档案", description = "删除指定的用户档案。")
@DeleteMapping("/delete")
public Result<Void> delete(@RequestParam String id) {
public Result<Void> delete(@Parameter(description = "档案 ID") @RequestParam String id) {
boolean success = userProfileService.deleteProfile(id);
if (success) {
return Result.success();
@@ -56,6 +58,7 @@ public class UserProfileController {
/**
* 修改档案
*/
@Operation(summary = "更新用户档案", description = "更新当前用户的个人档案信息。")
@PutMapping("/update")
public Result<UserProfileResponse> update(@Valid @RequestBody UserProfileUpdateRequest request) {
UserProfileResponse response = userProfileService.updateProfile(request);
@@ -65,8 +68,9 @@ public class UserProfileController {
/**
* 根据ID查询详情
*/
@Operation(summary = "获取档案详情", description = "根据 ID 获取用户档案详情。")
@GetMapping("/detail")
public Result<UserProfileResponse> getById(@RequestParam String id) {
public Result<UserProfileResponse> getById(@Parameter(description = "档案 ID") @RequestParam String id) {
UserProfileResponse response = userProfileService.getProfileById(id);
if (response == null) {
return Result.notFound("档案不存在");
@@ -77,6 +81,7 @@ public class UserProfileController {
/**
* 获取当前登录用户的档案
*/
@Operation(summary = "获取当前用户档案", description = "获取当前登录用户的个人档案信息。")
@GetMapping("/me")
public Result<UserProfileResponse> getCurrentProfile() {
UserProfileResponse response = userProfileService.getCurrentUserProfile();
@@ -87,6 +92,7 @@ public class UserProfileController {
/**
* 分页查询
*/
@Operation(summary = "分页查询用户档案", description = "分页查询用户档案列表。")
@GetMapping("/page")
public Result<PageResult<UserProfileResponse>> getPage(@Validated UserProfilePageRequest request) {
PageResult<UserProfileResponse> pageResult = userProfileService.getProfilePage(request);
@@ -96,6 +102,7 @@ public class UserProfileController {
/**
* 列表查询
*/
@Operation(summary = "列表查询用户档案", description = "列表查询用户档案。")
@GetMapping("/list")
public Result<List<UserProfileResponse>> getList(@Validated UserProfilePageRequest request) {
List<UserProfileResponse> list = userProfileService.getProfileList(request);
@@ -107,6 +114,7 @@ public class UserProfileController {
* 将childhood、peak、valley数据迁移到生命事件表
* 注意:此接口为一次性数据迁移接口,迁移完成后可删除
*/
@Operation(summary = "迁移生活事件", description = "将生活事件模块的数据迁移到用户档案中。")
@PostMapping("/migrateLifeEvents")
public Result<Integer> migrateLifeEvents() {
int count = userProfileService.migrateLifeEventsFromProfiles();