-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#47 [feat] 디자이너 회원가입 기능 구현 #63
Conversation
…into feat/#47 # Conflicts: # src/main/java/com/moddy/server/common/exception/enums/ErrorCode.java # src/main/java/com/moddy/server/common/exception/enums/SuccessCode.java # src/main/java/com/moddy/server/controller/auth/dto/request/SocialLoginRequest.java # src/main/java/com/moddy/server/domain/designer/Designer.java # src/main/java/com/moddy/server/domain/designer/HairShop.java # src/main/java/com/moddy/server/domain/user/User.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
작업하시느라 고생하셨습니다!
코맨트 확인해주세요!!
INVALID_DAY_OF_WEEK_EXCEPTION(HttpStatus.NOT_FOUND, "요일을 찾을 수 없습니다"), | ||
INVALID_GENDER_EXCEPTION(HttpStatus.NOT_FOUND, "성별을 찾을 수 없습니다"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2
해당 에러는 클라이언트가 속성 값을 잘못 입력했을 때 생기는 에러이기 때문에
BAD_REQUEST , 400 에러인 것 같습니다!
+) 제가 전에 404라고 한 것 같은데, 400이 맞는 것 같습니다 하하..
@SecurityRequirement(name = "JWT Auth") | ||
@PostMapping(value = "/designer", consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) | ||
SuccessResponse<DesignerCreateResponse> createDesigner(@Parameter(hidden = true) @KakaoCode String kakaoCode, @ModelAttribute DesignerCreateRequest request) { | ||
System.out.println(request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p1
println은 지워주세요!
|
||
String instagramUrl, | ||
String naverPlaceUrl, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2
불필요한 공백을 지워주세요!
public class DayOff extends BaseTimeEntity { | ||
public class DayOff{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p1
base entity 를 제거하면 안됩니다..!
|
||
// String kakaoId = String.valueOf(kakaoSocialService.login(SocialLoginRequest.of(code))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p1
불필요한 주석은 제거해주세요!
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2
불필요한 공백은 제거해주세요
public User(String kakaoId, String name, Gender gender, String phoneNumber, Boolean isMarketingAgree, String profileImgUrl ) { | ||
this.kakaoId = kakaoId; | ||
this.name = name; | ||
this.gender = gender; | ||
this.phoneNumber = phoneNumber; | ||
this.isMarketingAgree = isMarketingAgree; | ||
this.profileImgUrl = profileImgUrl; | ||
this.role = role; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2
사용하지 않은 생성자인 듯 합니다! 제거해주세요!
@Transactional(readOnly = true) | ||
@Builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p1
불필요한 어노테이션으로 보입니다.
.findFirst() | ||
.orElseThrow(() -> new BadRequestException(ErrorCode.INVALID_DAY_OF_WEEK_EXCEPTION)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p2
DAY_OF_WEEK_EXCEPTION이 아닌 INVALID_GENDER_EXCEPTION인 것 같습니다!
@Getter | ||
@AllArgsConstructor | ||
public enum DayOfWeek { | ||
NOTHING("없음"), MON("월"), TUE("화"), WED("수"), THU("목"), FRI("금"), SAT("토"), SUN("일"); | ||
|
||
private final String value; | ||
|
||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) | ||
public static DayOfWeek findByDay(String dayOfWeek) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4
findByDayOfWeek는 어떨까요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
작업하시느라 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~~! 로직이 좋네요... 갓경린...
@@ -23,6 +25,7 @@ public enum ErrorCode { | |||
USER_NOT_FOUND_EXCEPTION(HttpStatus.NOT_FOUND, "해당 유저는 존재하지 않습니다."), | |||
|
|||
// 405 METHOD_NOT_ALLOWED | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4 :
위의 에러코드들 처럼 ErrorCode 주석 아래 공백 지우면 좋을것 같아요!
@@ -8,10 +8,13 @@ | |||
@AllArgsConstructor | |||
public enum SuccessCode { | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4:
여기도 공백 지우면 좋을 것 같아요!
FIND_MODEL_MAIN_INFO_SUCCESS(HttpStatus.OK, "모델 메인 뷰 조회 성공"), | ||
SOCIAL_LOGIN_SUCCESS(HttpStatus.OK, "카카오 로그인 성공입니다."), | ||
USER_MY_PAGE_SUCCESS(HttpStatus.OK, "마이페이지 유저 정보 조회 성공입니다."); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p4:
여기도 공백 지우면 좋을 것 같아요!
|
||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING) | ||
public static Gender findByGender(String gender) { | ||
return Stream.of(Gender.values()) | ||
.filter(c -> c.getValue().equals(gender)) | ||
.findFirst() | ||
.orElseThrow(() -> new BadRequestException(ErrorCode.INVALID_GENDER_EXCEPTION)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find 메소드 좋네요! 감사합니다...
request.dayOffs().stream() | ||
.forEach(d -> { | ||
DayOff dayOff = DayOff.builder() | ||
.dayOfWeek(d) | ||
.designer(designer) | ||
.build(); | ||
dayOffJpaRepository.save(dayOff); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dayoff 사용법도 확인했습니다!
관련 이슈번호
해결하는 데 얼마나 걸렸나요? (예상 작업 시간 / 실제 작업 시간)
해결하려는 문제가 무엇인가요?
어떻게 해결했나요?