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 });