-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BE] issue119: 내가 참여한 스터디 목록 조회 리팩터링 #180
Conversation
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.
오류 잡아주시느라 고생하셨습니다!
Approve 해도 될 것 같아요~_~
@@ -35,11 +37,11 @@ public class MyStudyDao { | |||
currentMemberCount, maxMemberCount, startDate, endDate); | |||
}; | |||
|
|||
private static final RowMapper<Map<Long, Map<MemberData, List<TagSummaryData>>>> OWNER_WITH_TAG_ROW_MAPPER = (rs, rn) -> { | |||
Map<Long, Map<MemberData, List<TagSummaryData>>> result = new LinkedHashMap<>(); | |||
private static final ResultSetExtractor<Map<Long, StudyOwnerWithTagsData>> OWNER_WITH_TAG_ROW_MAPPER = rs -> { |
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.
기존의 RowMapper 를 쓰면 첫번째 row 가 while (rs.next)
시 누락되어 ResultSetExtractor
로 변경해주셨군요..!!
굿굿👍
} | ||
return result; | ||
}; | ||
|
||
public List<MyStudySummaryData> findMyStudyByGithubId(Long id) { | ||
String sql = "SELECT study.id, study.title, study.study_status, study.current_member_count, " | ||
String sql = "SELECT DISTINCT study.id, study.title, study.study_status, study.current_member_count, " |
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.
DISTINCT
처리 좋네요!
public Map<Long, Map<MemberData, List<TagSummaryData>>> findStudyOwnerWithTags(List<Long> studyIds) { | ||
public Map<Long, StudyOwnerWithTagsData> findStudyOwnerWithTags(List<Long> studyIds) { |
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.
이렇게 묶어준 게 훨씬 가독성 있는 것 같습니다!!
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
public class StudyOwnerWithTagsData { |
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.
With보다 And가 더 좋아 보여요
748df68
to
441dcf1
Compare
요약
내가 참여한 스터디 목록 기능을 리팩터링 및 누락된 요구사항을 추가한다.
세부사항
close #119