diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java index bb523aaf..72cfcd42 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/dto/data/PostDataByUserId.java @@ -8,20 +8,22 @@ @Getter public class PostDataByUserId { - private Long postId; - private MajorType major; - private String title; - private String content; - private Integer remainingSeat; - private boolean close; + private final Long postId; + private final MajorType major; + private final String title; + private final String content; + private final Integer remainingSeat; + private final boolean close; + private final Long studyId; @Builder - public PostDataByUserId(Long postId, MajorType major, String title, String content, Integer remainingSeat, boolean close) { + public PostDataByUserId(Long postId, MajorType major, String title, String content, Integer remainingSeat, boolean close, Long studyId) { this.postId = postId; this.major = major; this.title = title; this.content = content; this.remainingSeat = remainingSeat; this.close = close; + this.studyId = studyId; } } diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java index 4c4d3a5b..98fdcac1 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/studypost/repository/StudyPostRepositoryImpl.java @@ -90,7 +90,8 @@ public List findByPostedUserId(final Long userId, final Pageab post.title, post.content, post.remainingSeat, - post.close + post.close, + post.studyId ) ) .from(post)