feat(user): 新增用户注册后默认分配5个人设

This commit is contained in:
2025-12-08 18:51:16 +08:00
parent 86601e772f
commit f72781d948
6 changed files with 34 additions and 8 deletions

View File

@@ -36,8 +36,6 @@ public class CharacterController {
@Resource
private KeyboardCharacterService characterService;
@Autowired
private ChatModel chatModel;
@GetMapping("/list")
@Operation(summary = "人设列表", description = "人设列表接口按 rank 排名")
@@ -75,7 +73,8 @@ public class CharacterController {
@PostMapping("/addUserCharacter")
@Operation(summary = "添加用户人设", description = "添加用户人设接口")
public BaseResponse<Boolean> addUserCharacter(@RequestBody KeyboardUserCharacterAddDTO addDTO) {
characterService.addUserCharacter(addDTO);
long loginIdAsLong = StpUtil.getLoginIdAsLong();
characterService.addUserCharacter(addDTO,loginIdAsLong);
return ResultUtils.success(true);
}