From 91b44914f6f66386f4110efdba99d80b4a3b064a Mon Sep 17 00:00:00 2001 From: whyour Date: Fri, 26 Dec 2025 00:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/env.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/back/services/env.ts b/back/services/env.ts index 0759710e..cd4d0a84 100644 --- a/back/services/env.ts +++ b/back/services/env.ts @@ -13,10 +13,11 @@ import { stepPosition, } from '../data/env'; import { writeFileWithLock } from '../shared/utils'; +import { sequelize } from '../data'; @Service() export default class EnvService { - constructor(@Inject('logger') private logger: winston.Logger) {} + constructor(@Inject('logger') private logger: winston.Logger) { } public async create(payloads: Env[]): Promise { const envs = await this.envs(); @@ -146,7 +147,7 @@ export default class EnvService { } try { const result = await this.find(condition, [ - ['isPinned', 'DESC'], + [sequelize.literal('COALESCE(`isPinned`, 0)'), 'DESC'], ['position', 'DESC'], ['createdAt', 'ASC'], ]);