-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: 온보딩 #98
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
base: develop2
Are you sure you want to change the base?
Feat: 온보딩 #98
Conversation
yeonkyungJoo
left a comment
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.
ENUM들이 많은데,
프론트 쪽에 전달하다가 오류가 날 수 있으니 ENUM 클래스별로 API를 제공하는 게 좋을 것 같아요.
| @@ -1,0 +1,3 @@ | |||
| dependencies { | |||
| implementation 'org.springframework.boot:spring-boot-starter-web' | |||
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.
domain-core에는 web과 같은 외부 의존성이 들어가지 않아야 합니다.
| public static final String LIST_MEMBER = MEMBER; | ||
|
|
||
| public static final String JOIN_MEMBER = MEMBER + "/join"; | ||
| public static final String CONDITION_MEMBER = MEMBER + "/onboarding"; |
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.
URL이 너무 '온보딩'에 국한되어 있는 것 같습니다. 조건을 설정하다는 의미의 URL이 좋을 것 같아요. set-options나 set-conditions/preference 같은 게 더 좋을 것 같습니다.
| //관심동네 | ||
| InterestDistrictCommand interestDistrictCommand = new InterestDistrictCommand(onboardingRequest.interestDistrict()); | ||
|
|
||
| Boolean joinResult = memberApplicationService.condition(conditionCommand, priorityCommand, interestDistrictCommand); |
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.
joinResult보다 다른 변수명이 좋을 것 같습니다. 가급적이면 메소드명과 일치하는 변수명으로 해주세요!
|
|
||
| @Transactional | ||
| public Boolean condition(ConditionCommand conditionCommand, PriorityCommand priorityCommand, InterestDistrictCommand interestDistrictCommand) { | ||
| // 1. 토큰에서 유저 정보 추출 후 검증 |
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.
컨트롤러에서 @AuthenticationPrincipal UUID memberId 파라미터로 설정해두면 됩니다. 이미 필터에서 토큰 추출해서 검증하고 들어올 거에요.
|
|
||
| Member setCommonCondition(Member member,Purpose purpose, Budget budget, MonthIncome monthIncome); | ||
|
|
||
| ActualLiving setActualLivingCondition(MemberId memberId, LivingPerson livingPerson, ChildrenPlan childrenPlan, SchoolDistrict schoolDistrict, Traffic traffic, CommutingArea commutingArea, InfraNew infra, Environment environment); |
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.
매개변수를 다 나열하는 것보다 하나의 DTO를 만드는 게 더 깔끔하지 않을까요?
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| public class GapInvestment extends AggregateRoot<GapInvestmentId> { |
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.
AggregateRoot가 맞는지 한번 생각해봐야할 것 같아요.
코드리뷰시 참고할 사항입니다.