Skip to content

Commit

Permalink
Fix: 정렬 순서 수정
Browse files Browse the repository at this point in the history
피드, 타임라인, 저장 데이터 정렬 순서 수정
  • Loading branch information
haeyonghahn committed Aug 25, 2023
1 parent f8b2ef7 commit f34de58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Page<Record> findByRecordByInterestCodeAndIsNotUserId(Long userId, List<I
.join(user.onboardings, onboarding)
.where(userIdNotEquals(userId), interestTypeEquals(interestCodes))
.orderBy(
record.createdDate.desc()
record.lastModifiedDate.desc()
), countQuery -> countQuery
.select(record).distinct()
.from(record)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public Optional<List<Record>> findByUserId(Long id) {
.select(record).distinct()
.from(record)
.join(record.files, file).fetchJoin()
.orderBy(
record.lastModifiedDate.desc()
)
.where(userIdEquals(id))
.fetch());
}
Expand All @@ -43,7 +46,7 @@ public Optional<List<Record>> findRecordByDate(Long userId, String recordDate) {
.join(record.files, file).fetchJoin()
.where(userIdEquals(userId), recordDateEquals(recordDate))
.orderBy(
record.recordDate.desc()
record.lastModifiedDate.desc()
)
.fetch());
}
Expand All @@ -57,7 +60,7 @@ public Optional<List<Record>> findFeedBySave(Long saveUserId) {
.join(record.files, file).fetchJoin()
.where(saveUserIdEquals(saveUserId), feedSaveEquals("Y"))
.orderBy(
record.recordDate.desc()
record.lastModifiedDate.desc()
)
.fetch());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spring:
database: mysql
database-platform: org.hibernate.dialect.MySQL8Dialect
hibernate:
ddl-auto: create
ddl-auto: none
properties:
hibernate:
format_sql: true
Expand Down

0 comments on commit f34de58

Please sign in to comment.