From 4a7dbf010fd34041170f9059fa4c196a871e556d Mon Sep 17 00:00:00 2001 From: jun02160 Date: Sat, 9 Nov 2024 02:25:56 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A9=A4=EB=B2=84=20coffee=20chat=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=ED=95=84=EB=93=9C=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/dto/member/MemberProfileSpecificResponse.java | 2 -- .../java/org/sopt/makers/internal/mapper/MemberMapper.java | 6 ++++-- .../makers/internal/member/controller/MemberController.java | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/sopt/makers/internal/dto/member/MemberProfileSpecificResponse.java b/src/main/java/org/sopt/makers/internal/dto/member/MemberProfileSpecificResponse.java index 759db51c..a9c2c0b1 100644 --- a/src/main/java/org/sopt/makers/internal/dto/member/MemberProfileSpecificResponse.java +++ b/src/main/java/org/sopt/makers/internal/dto/member/MemberProfileSpecificResponse.java @@ -34,7 +34,6 @@ public record MemberProfileSpecificResponse( List careers, Boolean allowOfficial, Boolean isCoffeeChatActivate, - String coffeeChatBio, @Schema(required = true) Boolean isMine ) { @@ -116,7 +115,6 @@ public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpeci response.careers(), response.allowOfficial(), response.isCoffeeChatActivate(), - response.coffeeChatBio(), isMine ); } diff --git a/src/main/java/org/sopt/makers/internal/mapper/MemberMapper.java b/src/main/java/org/sopt/makers/internal/mapper/MemberMapper.java index 2907a7df..ab73a830 100644 --- a/src/main/java/org/sopt/makers/internal/mapper/MemberMapper.java +++ b/src/main/java/org/sopt/makers/internal/mapper/MemberMapper.java @@ -41,7 +41,8 @@ MemberProfileSpecificResponse toProfileSpecificResponse ( boolean isMine, List projects, List activities, - List soptActivities + List soptActivities, + Boolean isCoffeeChatActivate ); @Mapping(target = "activities", source = "activities") @@ -49,7 +50,8 @@ MemberProfileSpecificResponse toProfileSpecificResponse ( Member member, boolean isMine, List projects, - List activities + List activities, + Boolean isCoffeeChatActivate ); @Mapping(target = "activities", source = "activities") diff --git a/src/main/java/org/sopt/makers/internal/member/controller/MemberController.java b/src/main/java/org/sopt/makers/internal/member/controller/MemberController.java index 21a33534..6ef9b593 100644 --- a/src/main/java/org/sopt/makers/internal/member/controller/MemberController.java +++ b/src/main/java/org/sopt/makers/internal/member/controller/MemberController.java @@ -164,9 +164,10 @@ public ResponseEntity getUserProfile ( new MemberProfileSpecificResponse.MemberActivityResponse(entry.getKey(), entry.getValue()) ).collect(Collectors.toList()); val isMine = Objects.equals(member.getId(), memberDetails.getId()); + val isCoffeeChatActivate = coffeeChatService.getCoffeeChatActivate(member.getId()); val response = MemberProfileSpecificResponse.checkIsBlindPhone( memberMapper.toProfileSpecificResponse( - member, true, memberProfileProjects, activityResponses, soptActivityResponse + member, true, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate ), isMine); sortProfileCareer(response); @@ -193,8 +194,9 @@ public ResponseEntity getMyProfile ( memberProfileProjects ); val isMine = Objects.equals(member.getId(), memberDetails.getId()); + val isCoffeeChatActivate = coffeeChatService.getCoffeeChatActivate(member.getId()); val response = memberMapper.toProfileSpecificResponse( - member, isMine, memberProfileProjects, activityResponses, soptActivityResponse + member, isMine, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate ); sortProfileCareer(response); return ResponseEntity.status(HttpStatus.OK).body(response);