diff --git a/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomDetailResDto.java b/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomDetailResDto.java index 58e1a8562..fce298b86 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomDetailResDto.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomDetailResDto.java @@ -15,7 +15,7 @@ public class AdminRoomDetailResDto { private Long roomId; private String title; private String content; - private Long categoryId; + private String categoryName; private Integer currentPeople; private Integer minPeople; private Integer maxPeople; @@ -33,7 +33,7 @@ public AdminRoomDetailResDto(Room room, String hostNickname, this.roomId = room.getId(); this.title = room.getTitle(); this.content = room.getContent(); - this.categoryId = room.getCategory().getId(); + this.categoryName = room.getCategory().getName(); this.currentPeople = room.getCurrentPeople(); this.minPeople = room.getMinPeople(); this.maxPeople = room.getMaxPeople(); diff --git a/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomResDto.java b/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomResDto.java index 46936a21a..8a299f60e 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomResDto.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/admin/room/controller/response/AdminRoomResDto.java @@ -12,7 +12,7 @@ public class AdminRoomResDto { private Long roomId; private String hostIntraId; private String creatorIntraId; - private Long categoryId; + private String categoryName; private String title; private String content; private Integer currentPeople; @@ -27,7 +27,7 @@ public AdminRoomResDto(Room room) { this.roomId = room.getId(); this.hostIntraId = room.getHost().getIntraId(); this.creatorIntraId = room.getCreator().getIntraId(); - this.categoryId = room.getCategory().getId(); + this.categoryName = room.getCategory().getName(); this.title = room.getTitle(); this.content = room.getContent(); this.currentPeople = room.getCurrentPeople(); diff --git a/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminCreateReqDto.java b/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminCreateReqDto.java index f86327e78..6ccd8ae6f 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminCreateReqDto.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminCreateReqDto.java @@ -13,7 +13,7 @@ @Getter @NoArgsConstructor public class TemplateAdminCreateReqDto { - @NotNull(message = "카테고리이름은 필수입니다.") + @NotNull(message = "카테고리 이름은 필수입니다.") private String categoryName; @NotBlank(message = "게임 이름은 필수이며, 비어 있을 수 없습니다.") diff --git a/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminUpdateReqDto.java b/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminUpdateReqDto.java index 6885dbb70..49605e477 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminUpdateReqDto.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/admin/templates/controller/request/TemplateAdminUpdateReqDto.java @@ -11,7 +11,7 @@ @Getter @NoArgsConstructor public class TemplateAdminUpdateReqDto { - @NotNull(message = "카테고리이름은 필수입니다.") + @NotNull(message = "카테고리 이름은 필수입니다.") private String categoryName; @NotBlank(message = "게임 이름은 필수이며, 비어 있을 수 없습니다.") diff --git a/gg-pingpong-api/src/main/java/gg/party/api/user/category/service/CategoryService.java b/gg-pingpong-api/src/main/java/gg/party/api/user/category/service/CategoryService.java index 415bfadb0..5bbdcf1d7 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/user/category/service/CategoryService.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/user/category/service/CategoryService.java @@ -28,7 +28,7 @@ public class CategoryService { /** * 카테고리 전체 조회 * @throws OnPenaltyException 패널티 상태의 유저 입력 - 403 - * @return 카테고리 전체 리스트 (name 순으로 오름차순 정렬) + * @return 카테고리 전체 리스트 (id 순으로 오름차순 정렬) */ @Transactional(readOnly = true) public CategoryListResDto findCategoryList(UserDto userDto) { @@ -38,7 +38,7 @@ public CategoryListResDto findCategoryList(UserDto userDto) { partyPenalty.getStartTime().plusHours(partyPenalty.getPenaltyTime()))) { throw new OnPenaltyException(); } - return new CategoryListResDto(categoryRepository.findAll(Sort.by(Sort.Direction.ASC, "name")).stream() + return new CategoryListResDto(categoryRepository.findAll(Sort.by(Sort.Direction.ASC, "id")).stream() .map(CategoryResDto::new) .collect(Collectors.toList())); } diff --git a/gg-pingpong-api/src/main/java/gg/party/api/user/template/controller/response/TemplateResDto.java b/gg-pingpong-api/src/main/java/gg/party/api/user/template/controller/response/TemplateResDto.java index b6979cd3e..3b6dfc773 100644 --- a/gg-pingpong-api/src/main/java/gg/party/api/user/template/controller/response/TemplateResDto.java +++ b/gg-pingpong-api/src/main/java/gg/party/api/user/template/controller/response/TemplateResDto.java @@ -8,7 +8,7 @@ @NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) public class TemplateResDto { private Long gameTemplateId; - private Long categoryId; + private String categoryName; private String gameName; private Integer maxGamePeople; private Integer minGamePeople; @@ -20,7 +20,7 @@ public class TemplateResDto { public TemplateResDto(GameTemplate template) { this.gameTemplateId = template.getId(); - this.categoryId = template.getCategory().getId(); + this.categoryName = template.getCategory().getName(); this.gameName = template.getGameName(); this.maxGamePeople = template.getMaxGamePeople(); this.minGamePeople = template.getMinGamePeople();