From b9e49b181ad4fdb01590b0b785a46d6c98d5d6c0 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 20 Aug 2022 20:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/cron.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/back/services/cron.ts b/back/services/cron.ts index 460de02a..ab756f61 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -168,7 +168,12 @@ export default class CronService { } let condition: any = { where: query, - order: [['createdAt', 'DESC']], + order: [ + ['isPinned', 'DESC'], + ['isDisabled', 'ASC'], + ['status', 'ASC'], + ['createdAt', 'DESC'], + ], }; if (page && size) { condition.offset = (page - 1) * size;