Skip to content

Commit

Permalink
fix: 条目日期排序时空值排后面 (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
chivehao authored Nov 13, 2024
1 parent 44d6f06 commit ba1f7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- 条目条件查询接口
- 条目更新时更新update_time字段
- 条目日期排序时空值排后面

# 0.20.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ public Mono<PagingWrap<Subject>> listEntitiesByCondition(FindSubjectCondition co
Query query = Query.query(criteria);

if (updateTimeDesc) {
query = query.sort(Sort.by(Sort.Order.desc("update_time")));
query = query.sort(Sort.by(Sort.Order.desc("update_time").nullsLast()));
}

query = query
.sort(Sort.by(airTimeDesc ? Sort.Order.desc("air_time")
: Sort.Order.asc("air_time")))
.sort(Sort.by(airTimeDesc ? Sort.Order.desc("air_time").nullsLast()
: Sort.Order.asc("air_time").nullsLast()))
.sort(Sort.by(Sort.Order.asc("name")))
.with(pageRequest);

Expand Down

0 comments on commit ba1f7d4

Please sign in to comment.