Skip to content

Commit

Permalink
fix: isNewMember @Builder.Default 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
daeunkwak committed Aug 26, 2023
1 parent 36f8b29 commit e2099ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,25 @@ 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("");

} 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일간 재가입이 불가합니다.");
Expand All @@ -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());
Expand Down

0 comments on commit e2099ed

Please sign in to comment.