Skip to content

Commit

Permalink
[fix] #67 post 상세 조회 room dormitoryType 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuKwanKon committed Jan 25, 2024
1 parent 78ca1b1 commit 043f208
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 043f208

Please sign in to comment.