Conversation
Member
yeonkyungJoo
left a comment
There was a problem hiding this comment.
ENUM들이 많은데,
프론트 쪽에 전달하다가 오류가 날 수 있으니 ENUM 클래스별로 API를 제공하는 게 좋을 것 같아요.
| @@ -0,0 +1,3 @@ | |||
| dependencies { | |||
| implementation 'org.springframework.boot:spring-boot-starter-web' | |||
Member
There was a problem hiding this comment.
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"; |
Member
There was a problem hiding this comment.
URL이 너무 '온보딩'에 국한되어 있는 것 같습니다. 조건을 설정하다는 의미의 URL이 좋을 것 같아요. set-options나 set-conditions/preference 같은 게 더 좋을 것 같습니다.
| //관심동네 | ||
| InterestDistrictCommand interestDistrictCommand = new InterestDistrictCommand(onboardingRequest.interestDistrict()); | ||
|
|
||
| Boolean joinResult = memberApplicationService.condition(conditionCommand, priorityCommand, interestDistrictCommand); |
Member
There was a problem hiding this comment.
joinResult보다 다른 변수명이 좋을 것 같습니다. 가급적이면 메소드명과 일치하는 변수명으로 해주세요!
|
|
||
| @Transactional | ||
| public Boolean condition(ConditionCommand conditionCommand, PriorityCommand priorityCommand, InterestDistrictCommand interestDistrictCommand) { | ||
| // 1. 토큰에서 유저 정보 추출 후 검증 |
Member
There was a problem hiding this comment.
컨트롤러에서 @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); |
Member
There was a problem hiding this comment.
매개변수를 다 나열하는 것보다 하나의 DTO를 만드는 게 더 깔끔하지 않을까요?
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| public class GapInvestment extends AggregateRoot<GapInvestmentId> { |
Member
There was a problem hiding this comment.
AggregateRoot가 맞는지 한번 생각해봐야할 것 같아요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
코드리뷰시 참고할 사항입니다.