Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› [Bug] ์นดํ…Œ๊ณ ๋ฆฌ๊ฐ€ ID์ˆœ์ด ์•„๋‹Œ ์ด๋ฆ„์ˆœ์œผ๋กœ ์ •๋ ฌ๋˜๋Š” ๋ฒ„๊ทธ ์ˆ˜์ • #776

Merged
merged 8 commits into from
Mar 27, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@Getter
@NoArgsConstructor
public class TemplateAdminCreateReqDto {
@NotNull(message = "์นดํ…Œ๊ณ ๋ฆฌ์ด๋ฆ„์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.")
@NotNull(message = "์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.")
private String categoryName;

@NotBlank(message = "๊ฒŒ์ž„ ์ด๋ฆ„์€ ํ•„์ˆ˜์ด๋ฉฐ, ๋น„์–ด ์žˆ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Getter
@NoArgsConstructor
public class TemplateAdminUpdateReqDto {
@NotNull(message = "์นดํ…Œ๊ณ ๋ฆฌ์ด๋ฆ„์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.")
@NotNull(message = "์นดํ…Œ๊ณ ๋ฆฌ ์ด๋ฆ„์€ ํ•„์ˆ˜์ž…๋‹ˆ๋‹ค.")
private String categoryName;

@NotBlank(message = "๊ฒŒ์ž„ ์ด๋ฆ„์€ ํ•„์ˆ˜์ด๋ฉฐ, ๋น„์–ด ์žˆ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CategoryService {
/**
* ์นดํ…Œ๊ณ ๋ฆฌ ์ „์ฒด ์กฐํšŒ
* @throws OnPenaltyException ํŒจ๋„ํ‹ฐ ์ƒํƒœ์˜ ์œ ์ € ์ž…๋ ฅ - 403
* @return ์นดํ…Œ๊ณ ๋ฆฌ ์ „์ฒด ๋ฆฌ์ŠคํŠธ (name ์ˆœ์œผ๋กœ ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ)
* @return ์นดํ…Œ๊ณ ๋ฆฌ ์ „์ฒด ๋ฆฌ์ŠคํŠธ (id ์ˆœ์œผ๋กœ ์˜ค๋ฆ„์ฐจ์ˆœ ์ •๋ ฌ)
*/
@Transactional(readOnly = true)
public CategoryListResDto findCategoryList(UserDto userDto) {
Expand All @@ -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()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Loading