From ee66c5ec2331dc9916e4889675cc20aafe3e0252 Mon Sep 17 00:00:00 2001 From: elyudwo Date: Mon, 22 Jan 2024 19:26:02 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20:=20=EB=82=B4=EA=B0=80=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=ED=95=9C=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20studyId=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=98=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../studypost/dto/data/PostDataByUserId.java | 16 +++++++++------- .../repository/StudyPostRepositoryImpl.java | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) 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)