From 5b963bae19340ddbb865ec5225f9686d96b246d2 Mon Sep 17 00:00:00 2001 From: jiakang Date: Thu, 27 Apr 2023 11:44:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AD=97=E5=85=B8=E9=A1=B9?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E9=A1=B9=E6=9C=AA=E6=B8=85=E9=99=A4=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pig/admin/controller/SysDictController.java | 5 +++-- .../pig/admin/service/impl/SysDictItemServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/SysDictController.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/SysDictController.java index c9b10d1c..0fb87a42 100644 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/SysDictController.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/controller/SysDictController.java @@ -76,7 +76,8 @@ public class SysDictController { @GetMapping("/page") public R> getDictPage(Page page, SysDict sysDict) { return R.ok(sysDictService.page(page, Wrappers.lambdaQuery() - .like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey()))); + .like(StrUtil.isNotBlank(sysDict.getDictKey()), SysDict::getDictKey, sysDict.getDictKey()) + .orderByDesc(SysDict::getUpdateTime))); } /** @@ -87,7 +88,7 @@ public class SysDictController { @GetMapping("/key/{key}") @Cacheable(value = CacheConstants.DICT_DETAILS, key = "#key") public R> getDictByKey(@PathVariable String key) { - return R.ok(sysDictItemService.list(Wrappers.query().lambda().eq(SysDictItem::getDictKey, key))); + return R.ok(sysDictItemService.list(Wrappers.query().lambda().eq(SysDictItem::getDictKey, key).orderByAsc(SysDictItem::getSortOrder))); } /** diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDictItemServiceImpl.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDictItemServiceImpl.java index 65c729f2..b43e6dc6 100755 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDictItemServiceImpl.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDictItemServiceImpl.java @@ -65,7 +65,7 @@ public class SysDictItemServiceImpl extends ServiceImpl