-
Notifications
You must be signed in to change notification settings - Fork 1
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
포인트 기능 수정 #78
포인트 기능 수정 #78
Conversation
This comment has been minimized.
This comment has been minimized.
* @since 1.3.0 | ||
*/ | ||
@Query("SELECT count(h) FROM HealthMetric h WHERE h.healthMetricId.oauthId = ?1 AND h.groupCode = ?2 AND h.healthMetricId.createdAt = ?3") | ||
int findByGroupCode(String oauthId, GroupCode groupCode, LocalDate createdAt); |
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.
P3) 메서드에 무엇을 조회하는지 명시되어있으면 좋겠어요 그리고 JavaDoc은 "건강지표 조회"인데 쿼리는 count()를 리턴하다보니 혼동이 생깁니다!
* @since 1.3.0 | ||
*/ | ||
public static EarnPoint findByGroupCode(GroupCode groupCode) { | ||
switch (groupCode) { |
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) java 12 버전부터 switch 문에서 람다를 사용할 수 있게 되었어요 현재 17 버전을 사용하고 있는 만큼 람다로 가독성을 올려보는 건 어떨까 생각합니다!
public void addHealthMetricPoint(String oauthId, LocalDate date, GroupCode groupCode) { | ||
User user = userSearchService.findUserByOauthId(oauthId); | ||
int healthMetric = healthMetricSearchService.findByGroupCode(oauthId, groupCode, date); | ||
if (healthMetric == 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.
P3) 변수명이 수정되었으면 좋겠어요
Analysis Details0 IssuesCoverage and DuplicationsProject ID: co-niverse_dangjang-backend_AYj2jZJELehUZAlqDvRk |
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.
LGTM 😊
Changes 📝
Details 🌼
Check List ☑️