Skip to content

Commit

Permalink
[Fix] : 스터디 단건조회에 chatUrl반환
Browse files Browse the repository at this point in the history
  • Loading branch information
wellbeing-dough committed Nov 28, 2023
1 parent c035a6d commit 2ff6d17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ public class PostData {
private final String penaltyWay;
private final LocalDate studyStartDate;
private final LocalDate studyEndDate;
private final String charUrl;
private final int remainingSeat;
private final boolean isUsersPost;
private final boolean isBookmarked;
private final UserData postedUser;

public PostData(Long postId, String title, LocalDateTime createdDate, String content, MajorType major, int studyPerson, GenderType filteredGender, StudyWayType studyWay, int penalty, String penaltyWay, LocalDate studyStartDate, LocalDate studyEndDate, int remainingSeat, boolean isUsersPost, boolean isBookmarked, UserData postedUser) {
public PostData(Long postId, String title, LocalDateTime createdDate, String content, MajorType major, int studyPerson, GenderType filteredGender, StudyWayType studyWay, int penalty, String penaltyWay, LocalDate studyStartDate, LocalDate studyEndDate, String charUrl, int remainingSeat, boolean isUsersPost, boolean isBookmarked, UserData postedUser) {
this.postId = postId;
this.title = title;
this.createdDate = createdDate;
Expand All @@ -41,12 +42,10 @@ public PostData(Long postId, String title, LocalDateTime createdDate, String con
this.penaltyWay = penaltyWay;
this.studyStartDate = studyStartDate;
this.studyEndDate = studyEndDate;
this.charUrl = charUrl;
this.remainingSeat = remainingSeat;
this.isUsersPost = isUsersPost;
this.isBookmarked = isBookmarked;
this.postedUser = postedUser;
}

// 아이디ㅇ, 생성일ㅇ, 관련학과ㅇ, 제목ㅇ, 팀원수ㅇ, 벌금 종류ㅇ, 성별ㅇ, 내용ㅇ, 시작날짜ㅇ, 종료날짜ㅇ, 벌금ㅇ,
// 대면 여부ㅇ, 관련학과ㅇ, 작성자 아이디ㅇ, 작성자 학과d, 작성자 이름d, 작성자 프사d, 북마크 여부d, 이 글과 비슷한 스터디, 잔여석ㅇ, 작성자 여부ㅇ
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class FindPostResponseById {
private LocalDate studyStartDate;
private LocalDate studyEndDate;
private int remainingSeat;
private String chatUrl;
private boolean isUsersPost;
private boolean isBookmarked;
private UserData postedUser;
Expand All @@ -46,6 +47,7 @@ public FindPostResponseById(PostData postData, List<RelatedPostData> relatedPost
this.studyStartDate = postData.getStudyStartDate();
this.studyEndDate = postData.getStudyEndDate();
this.remainingSeat = postData.getRemainingSeat();
this.chatUrl = postData.getCharUrl();
this.isUsersPost = postData.isUsersPost();
this.isBookmarked = postData.isBookmarked();
this.postedUser = postData.getPostedUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public Optional<PostData> findPostById(Long postId, Long userId) {
PostData.class,
post.id.as("postId"), post.title, post.createdDate, post.content, post.major,
post.studyPerson, post.filteredGender, post.studyWay, post.penalty,
post.penaltyWay, post.studyStartDate, post.studyEndDate, post.remainingSeat,
post.penaltyWay, post.studyStartDate, post.studyEndDate, post.remainingSeat, post.chatUrl,
userId != null ? Expressions.booleanTemplate("{0} = {1}", post.postedUserId, userId) : Expressions.constant(false),
userId != null ? Expressions.booleanTemplate("{0} = {1}", bookmark.userId, userId) : Expressions.constant(false),
Projections.constructor(
Expand Down

0 comments on commit 2ff6d17

Please sign in to comment.