修改定时任务排序

This commit is contained in:
whyour 2022-08-20 20:27:19 +08:00
parent 102e447f78
commit b9e49b181a

View File

@ -168,7 +168,12 @@ export default class CronService {
} }
let condition: any = { let condition: any = {
where: query, where: query,
order: [['createdAt', 'DESC']], order: [
['isPinned', 'DESC'],
['isDisabled', 'ASC'],
['status', 'ASC'],
['createdAt', 'DESC'],
],
}; };
if (page && size) { if (page && size) {
condition.offset = (page - 1) * size; condition.offset = (page - 1) * size;