Skip to content
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

fix: 피드 최근 순으로 정렬 수정 #407

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public FeedSliceResponse findAllFeed(int size, Long lastId) {
public FeedSliceResponse findFollowerFeed(int size, Long lastId) {
final Member currentMember = memberUtil.getCurrentMember();
List<Member> sourceMembers = getSourceMembers(currentMember.getId());
System.out.println(sourceMembers.size());

Slice<FeedOneResponse> feedAllByPage =
missionRecordRepository.findFeedAllByPage(size, lastId, sourceMembers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public List<MissionRecord> findAllByMissionIdAndYearMonth(Long missionId, YearMo
missionIdEq(missionId),
yearEq(yearMonth.getYear()),
monthEq(yearMonth.getMonthValue()))
.orderBy(missionRecord.startedAt.asc())
.orderBy(missionRecord.finishedAt.desc())
.fetch();
}

Expand Down Expand Up @@ -181,6 +181,7 @@ public Slice<MissionRecord> findAllFetch(int size, Long lastId) {
.fetchJoin()
.distinct()
.where(ltMissionRecordId(lastId))
.orderBy(missionRecord.finishedAt.desc())
.limit((long) size + 1)
.fetch();

Expand All @@ -204,6 +205,7 @@ public Slice<MissionRecord> findAllFetchByFollowings(
ltMissionRecordId(lastId),
missionRecord.mission.member.in(followingMembers))
.where(mission.visibility.in(List.of(ALL, FOLLOWER)))
.orderBy(missionRecord.finishedAt.desc())
.limit((long) size + 1)
.fetch();

Expand Down
Loading