mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-13 21:27:19 +08:00
fix order
This commit is contained in:
@@ -68,11 +68,16 @@ public class PageRequestDto {
|
||||
}
|
||||
|
||||
public List<SortField<Object>> getSortFields() {
|
||||
return sortBy.entrySet().stream()
|
||||
.map(
|
||||
(entry) ->
|
||||
field(name(entry.getKey())).sort(SortOrder.valueOf(entry.getValue().getKeyword())))
|
||||
.toList();
|
||||
List<SortField<Object>> sortFields = sortBy.entrySet().stream()
|
||||
.map(
|
||||
(entry) ->
|
||||
field(name(entry.getKey())).sort(SortOrder.valueOf(entry.getValue().getKeyword())))
|
||||
.toList();
|
||||
if (sortFields.isEmpty()) {
|
||||
return List.of(field(name("id")).sort(SortOrder.ASC));
|
||||
} else {
|
||||
return sortFields;
|
||||
}
|
||||
}
|
||||
|
||||
private void checkPageAndSize(int page, int size) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class QrtzJobRepository extends QrtzJobDetailsDao {
|
||||
StringUtils.isNotEmpty(queryDto.name())
|
||||
? QRTZ_JOB_DETAILS.SCHED_NAME.eq(queryDto.name())
|
||||
: noCondition())
|
||||
.orderBy(pageRequestDto.getSortFields())
|
||||
.orderBy(QRTZ_JOB_DETAILS.qrtzTriggers().TRIGGER_NAME)
|
||||
.limit(pageRequestDto.getSize())
|
||||
.offset(pageRequestDto.getOffset())
|
||||
.fetch();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
VITE_APP_PORT=5173
|
||||
VITE_SOURCE_MAP=true
|
||||
# mock
|
||||
VITE_ENABLE_MOCK=true
|
||||
VITE_BASE_URL=http://localhost:5173
|
||||
#VITE_ENABLE_MOCK=true
|
||||
#VITE_BASE_URL=http://localhost:5173
|
||||
# local
|
||||
#VITE_ENABLE_MOCK=false
|
||||
#VITE_BASE_URL=http://localhost:8080
|
||||
VITE_ENABLE_MOCK=false
|
||||
VITE_BASE_URL=http://localhost:8080
|
||||
# dev
|
||||
#VITE_ENABLE_MOCK=false
|
||||
#VITE_BASE_URL=https://localhost/api
|
||||
|
||||
Reference in New Issue
Block a user