Skip to content

Commit 7c560e1

Browse files
authored
feat: likeCount를 recommendCount로 변경 (#114)
* fix: 오류 해결 * fix: 오류 해결 * fix: 오류 해결 * chore: 파라미터 2개 이상 시 클래스 묶어주기 * chore: 검색어 필터 return을 하나로 묶어주기 * feat: member publicId 변경사항 적용 * feat: likeCount를 recommendCount로 변경
1 parent 83f7187 commit 7c560e1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/main/java/org/myteam/server/board/domain/BoardCount.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public class BoardCount {
2929
@JoinColumn(name = "board_id")
3030
private Board board;
3131

32-
@Column(name = "like_count", nullable = false)
33-
private int likeCount;
32+
@Column(name = "recommend_count", nullable = false)
33+
private int recommendCount;
3434

3535
@Column(name = "view_count", nullable = false)
3636
private int viewCount;
@@ -39,9 +39,9 @@ public class BoardCount {
3939
private int commentCount;
4040

4141
@Builder
42-
public BoardCount(Board board, int likeCount, int commentCount, int viewCount) {
42+
public BoardCount(Board board, int recommendCount, int commentCount, int viewCount) {
4343
this.board = board;
44-
this.likeCount = likeCount;
44+
this.recommendCount = recommendCount;
4545
this.commentCount = commentCount;
4646
this.viewCount = viewCount;
4747
}
@@ -51,7 +51,7 @@ public static BoardCount createBoardCount(Board board) {
5151

5252
return BoardCount.builder()
5353
.board(board)
54-
.likeCount(COUNT_SETTING_NUMBER)
54+
.recommendCount(COUNT_SETTING_NUMBER)
5555
.commentCount(COUNT_SETTING_NUMBER)
5656
.viewCount(COUNT_SETTING_NUMBER)
5757
.build();

src/main/java/org/myteam/server/board/domain/BoardOrderType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
public enum BoardOrderType {
44
CREATE,
5-
LIKE,
5+
RECOMMEND,
66
COMMENT
77
}

src/main/java/org/myteam/server/board/dto/reponse/BoardResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class BoardResponse {
5555
/**
5656
* 좋아요 수
5757
*/
58-
private Integer likeCount;
58+
private Integer recommendCount;
5959
/**
6060
* 댓글 수
6161
*/
@@ -84,7 +84,7 @@ public BoardResponse(Board board, BoardCount boardCount) {
8484
this.content = board.getContent();
8585
this.link = board.getLink();
8686
this.thumbnail = board.getThumbnail();
87-
this.likeCount = boardCount.getLikeCount();
87+
this.recommendCount = boardCount.getRecommendCount();
8888
this.commentCount = boardCount.getCommentCount();
8989
this.viewCount = boardCount.getViewCount();
9090
this.createdAt = board.getCreatedAt();

src/main/java/org/myteam/server/board/repository/BoardQueryRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private OrderSpecifier<?> isOrderByEqualToOrderCategory(BoardOrderType orderType
9999
BoardOrderType boardOrderType = Optional.ofNullable(orderType).orElse(BoardOrderType.CREATE);
100100
return switch (boardOrderType) {
101101
case CREATE -> board.createdAt.desc();
102-
case LIKE -> boardCount.likeCount.desc();
102+
case RECOMMEND -> boardCount.recommendCount.desc();
103103
case COMMENT -> boardCount.commentCount.desc();
104104
};
105105
}

0 commit comments

Comments
 (0)