refactor(character): 移除冗余Bean拷贝并统一返回VO类型
This commit is contained in:
@@ -42,8 +42,7 @@ public class CharacterController {
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "人设列表", description = "人设列表接口按 rank 排名")
|
||||
public BaseResponse<List<KeyboardCharacterRespVO>> list() {
|
||||
List<KeyboardCharacter> list = characterService.selectListWithRank();
|
||||
return ResultUtils.success(BeanUtil.copyToList(list, KeyboardCharacterRespVO.class));
|
||||
return ResultUtils.success(characterService.selectListWithRank());
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@@ -56,8 +55,7 @@ public class CharacterController {
|
||||
@GetMapping("/listByTag")
|
||||
@Operation(summary = "按标签查询人设列表", description = "按标签查询人设列表接口")
|
||||
public BaseResponse<List<KeyboardCharacterRespVO>> listByTag(@RequestParam("tagId") Long tagId) {
|
||||
List<KeyboardCharacter> list = characterService.selectListByTag(tagId);
|
||||
return ResultUtils.success(BeanUtil.copyToList(list, KeyboardCharacterRespVO.class));
|
||||
return ResultUtils.success(characterService.selectListByTag(tagId));
|
||||
}
|
||||
|
||||
@GetMapping("/listByUser")
|
||||
|
||||
Reference in New Issue
Block a user