From 4a7dbf010fd34041170f9059fa4c196a871e556d Mon Sep 17 00:00:00 2001 From: jun02160 Date: Sat, 9 Nov 2024 02:25:56 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=EB=A9=A4=EB=B2=84=20coffee=20chat?= =?UTF-8?q?=20=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); From 6062df1b2e92e41ea58c3b719f2873f9f0a178d6 Mon Sep 17 00:00:00 2001 From: jun02160 Date: Sat, 9 Nov 2024 18:06:57 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20isCoffeeChatActivate=20param=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/dto/member/MemberProfileSpecificResponse.java | 4 ++-- .../makers/internal/member/controller/MemberController.java | 2 +- 2 files changed, 3 insertions(+), 3 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 a9c2c0b1..4533400a 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 @@ -88,7 +88,7 @@ public record MemberCareerResponse( Boolean isCurrent ){} - public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpecificResponse response, Boolean isMine) { + public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) { return new MemberProfileSpecificResponse( response.name(), response.profileImage(), @@ -114,7 +114,7 @@ public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpeci response.projects(), response.careers(), response.allowOfficial(), - response.isCoffeeChatActivate(), + isCoffeeChatActivate, isMine ); } 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 6ef9b593..f3f7f2ef 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 @@ -169,7 +169,7 @@ public ResponseEntity getUserProfile ( memberMapper.toProfileSpecificResponse( member, true, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate ), - isMine); + isMine, isCoffeeChatActivate); sortProfileCareer(response); return ResponseEntity.status(HttpStatus.OK).body(response); } From c2f95edc906fe914b7799b20554225181682e81a Mon Sep 17 00:00:00 2001 From: jun02160 Date: Sat, 9 Nov 2024 20:41:23 +0900 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20method=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/dto/member/MemberProfileSpecificResponse.java | 2 +- .../makers/internal/member/controller/MemberController.java | 2 +- 2 files changed, 2 insertions(+), 2 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 4533400a..d880b224 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 @@ -88,7 +88,7 @@ public record MemberCareerResponse( Boolean isCurrent ){} - public static MemberProfileSpecificResponse checkIsBlindPhone(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) { + public static MemberProfileSpecificResponse applyIsPhoneBlind(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) { return new MemberProfileSpecificResponse( response.name(), response.profileImage(), 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 29ace8d2..f5891715 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 @@ -170,7 +170,7 @@ public ResponseEntity getUserProfile ( ).collect(Collectors.toList()); val isMine = Objects.equals(member.getId(), memberDetails.getId()); val isCoffeeChatActivate = coffeeChatService.getCoffeeChatActivate(member.getId()); - val response = MemberProfileSpecificResponse.checkIsBlindPhone( + val response = MemberProfileSpecificResponse.applyIsPhoneBlind( memberMapper.toProfileSpecificResponse( member, true, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate ), From 38c52d13021bde59cc5d9d7d8c5ea0d3c1449c3a Mon Sep 17 00:00:00 2001 From: jun02160 Date: Sat, 9 Nov 2024 20:42:18 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20method=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/dto/member/MemberProfileSpecificResponse.java | 2 +- .../makers/internal/member/controller/MemberController.java | 2 +- 2 files changed, 2 insertions(+), 2 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 d880b224..340811cb 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 @@ -88,7 +88,7 @@ public record MemberCareerResponse( Boolean isCurrent ){} - public static MemberProfileSpecificResponse applyIsPhoneBlind(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) { + public static MemberProfileSpecificResponse applyPhoneMasking(MemberProfileSpecificResponse response, Boolean isMine, Boolean isCoffeeChatActivate) { return new MemberProfileSpecificResponse( response.name(), response.profileImage(), 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 f5891715..8b88c12f 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 @@ -170,7 +170,7 @@ public ResponseEntity getUserProfile ( ).collect(Collectors.toList()); val isMine = Objects.equals(member.getId(), memberDetails.getId()); val isCoffeeChatActivate = coffeeChatService.getCoffeeChatActivate(member.getId()); - val response = MemberProfileSpecificResponse.applyIsPhoneBlind( + val response = MemberProfileSpecificResponse.applyPhoneMasking( memberMapper.toProfileSpecificResponse( member, true, memberProfileProjects, activityResponses, soptActivityResponse, isCoffeeChatActivate ),