diff --git a/cider-api/src/main/java/com/cmc/oauth/dto/response/ResponseJwtTokenDto.java b/cider-api/src/main/java/com/cmc/oauth/dto/response/ResponseJwtTokenDto.java index 73ff8a8..5cfd7f3 100644 --- a/cider-api/src/main/java/com/cmc/oauth/dto/response/ResponseJwtTokenDto.java +++ b/cider-api/src/main/java/com/cmc/oauth/dto/response/ResponseJwtTokenDto.java @@ -30,8 +30,7 @@ public class ResponseJwtTokenDto { private Date refreshTokenExpireTime; @Schema(description = "신규 회원 여부 - 이름이 저장되어 있는지 여부") - @Builder.Default - private Boolean isNewMember = false; + private Boolean isNewMember; @Schema(description = "멤버 ID") private Long memberId; diff --git a/cider-api/src/main/java/com/cmc/oauth/service/OauthLoginService.java b/cider-api/src/main/java/com/cmc/oauth/service/OauthLoginService.java index 2df1232..f684af8 100644 --- a/cider-api/src/main/java/com/cmc/oauth/service/OauthLoginService.java +++ b/cider-api/src/main/java/com/cmc/oauth/service/OauthLoginService.java @@ -92,15 +92,17 @@ public ResponseJwtTokenDto createMemberAndJwt(KakaoAccount memberInfo, SocialTyp responseJwtTokenDto = modelMapper.map(tokenDto, ResponseJwtTokenDto.class); - final boolean isNewMember = StringUtils.isEmpty(requestMember.getMemberName()); - responseJwtTokenDto.setIsNewMember(isNewMember); - if (!isNewMember) { - if(requestMember.getMemberName() != null) { - responseJwtTokenDto.setMemberName(requestMember.getMemberName()); - }else{ - responseJwtTokenDto.setMemberName(""); - } - } + // final boolean isNewMember = StringUtils.isEmpty(requestMember.getMemberName()); + + responseJwtTokenDto.setIsNewMember(true); +// if (!isNewMember) { +// if(requestMember.getMemberName() != null) { +// responseJwtTokenDto.setMemberName(requestMember.getMemberName()); +// }else{ +// responseJwtTokenDto.setMemberName(""); +// } +// } + responseJwtTokenDto.setMemberName(""); responseJwtTokenDto.setMemberId(requestMember.getMemberId()); responseJwtTokenDto.setBirthday(""); responseJwtTokenDto.setGender(""); @@ -108,6 +110,7 @@ public ResponseJwtTokenDto createMemberAndJwt(KakaoAccount memberInfo, SocialTyp } else { log.info("기존 회원일 때 :: " + foundMember.get().getMemberId() + foundMember.get().getMemberName()); requestMember = foundMember.get(); // 기존 회원일 때 + log.info("foundMember email ::::: " + foundMember.get().getEmail()); if(requestMember.getIsDeleted() != null){ throw new CiderException("탈퇴한 회원은 7일간 재가입이 불가합니다."); @@ -120,10 +123,10 @@ public ResponseJwtTokenDto createMemberAndJwt(KakaoAccount memberInfo, SocialTyp responseJwtTokenDto = modelMapper.map(tokenDto, ResponseJwtTokenDto.class); final boolean isNewMember = StringUtils.isEmpty(requestMember.getMemberName()); - responseJwtTokenDto.setIsNewMember(isNewMember); - if (!isNewMember) { - responseJwtTokenDto.setMemberName(requestMember.getMemberName()); - } + responseJwtTokenDto.setIsNewMember(false); +// if (!isNewMember) { +// responseJwtTokenDto.setMemberName(requestMember.getMemberName()); +// } responseJwtTokenDto.setMemberId(requestMember.getMemberId()); responseJwtTokenDto.setBirthday(requestMember.getMemberBirth()); responseJwtTokenDto.setGender(requestMember.getMemberGender());