Skip to content

Commit

Permalink
fix: 피드 최근 순으로 정렬 수정 (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb authored May 21, 2024
2 parents dabec15 + 8ccecf6 commit 368d2a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 368d2a3

Please sign in to comment.