Skip to content

Commit

Permalink
Merge pull request #68 from Domitory-CheckMate/feature/67-post
Browse files Browse the repository at this point in the history
[fix] 게시글 상세 조회 room Type & domitary type 추가
  • Loading branch information
OJOJIN authored Mar 22, 2024
2 parents 78ca1b1 + 043f208 commit 5ed77a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public record PostDetailResponseDto(
String profile,
String gender,
String mbti,
String roomType,
String dormitoryType,
boolean isScrap,
CheckListResponseDto checkList
) {
Expand All @@ -22,6 +24,8 @@ public static PostDetailResponseDto of(PostDetailDto postDetailDto, CheckListRes
.major(postDetailDto.major())
.profile(postDetailDto.profile())
.gender(postDetailDto.gender().getDesc())
.roomType(postDetailDto.roomType().getDesc())
.dormitoryType(postDetailDto.dormitoryType().getDesc())
.mbti(postDetailDto.mbti().getDesc())
.isScrap(isScrap)
.checkList(checkList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
import org.gachon.checkmate.domain.member.entity.GenderType;
import org.gachon.checkmate.domain.member.entity.MbtiType;
import org.gachon.checkmate.domain.member.entity.ProfileImageType;
import org.gachon.checkmate.domain.post.entity.DormitoryType;
import org.gachon.checkmate.domain.post.entity.RoomType;

public record PostDetailDto(
Long memberId,
String major,
MbtiType mbti,
GenderType gender,
RoomType roomType,
DormitoryType dormitoryType,
String name,
String profile,
PostCheckList postCheckList
) {
@QueryProjection
public PostDetailDto(Long memberId, String major, MbtiType mbti, GenderType gender, String name, String profile, PostCheckList postCheckList) {
public PostDetailDto(Long memberId, String major, MbtiType mbti, GenderType gender, RoomType roomType, DormitoryType dormitoryType, String name, String profile, PostCheckList postCheckList) {
this.memberId = memberId;
this.major = major;
this.mbti = mbti;
this.gender = gender;
this.roomType = roomType;
this.dormitoryType = dormitoryType;
this.name = name;
this.profile = profile;
this.postCheckList = postCheckList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public Optional<PostDetailDto> findPostDetail(Long postId) {
user.major,
user.mbtiType,
user.gender,
post.roomType,
post.dormitoryType,
user.name,
user.profile,
post.postCheckList
Expand Down

0 comments on commit 5ed77a6

Please sign in to comment.