From 9710751c191d29bc85e8c1e5999a0dee06b6ba68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B9=8F?= Date: Fri, 15 Jul 2022 18:22:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=94=AF=E6=8C=81=E5=A4=9A?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/dict/controller/admin/info.ts | 5 ++++- src/modules/dict/service/info.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/dict/controller/admin/info.ts b/src/modules/dict/controller/admin/info.ts index 48b0eb7..d1770d0 100644 --- a/src/modules/dict/controller/admin/info.ts +++ b/src/modules/dict/controller/admin/info.ts @@ -10,9 +10,12 @@ import { DictInfoService } from '../../service/info'; @CoolController({ api: ['add', 'delete', 'update', 'info', 'list', 'page'], entity: DictInfoEntity, - pageQueryOp: { + listQueryOp: { fieldEq: ['typeId'], keyWordLikeFields: ['name'], + addOrderBy: { + createTime: 'ASC', + }, }, }) export class AdminDictInfoController extends BaseController { diff --git a/src/modules/dict/service/info.ts b/src/modules/dict/service/info.ts index 526a0ac..29d72f1 100644 --- a/src/modules/dict/service/info.ts +++ b/src/modules/dict/service/info.ts @@ -40,6 +40,7 @@ export class DictInfoService extends BaseService { }), }) .orderBy('orderNum', 'ASC') + .addOrderBy('a.createTime', 'ASC') .getMany(); for (const item of typeData) { result[item.key] = _.filter(data, { typeId: item.id });