From ff9809f78e3fd05a8333ff4c941fe1cb79d450e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ACT=E4=B8=B6=E6=B5=81=E6=98=9F=E9=9B=A8?= <1340145680@qq.com> Date: Tue, 31 Mar 2026 03:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/cornerScape/getAllAssets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/cornerScape/getAllAssets.ts b/src/routes/cornerScape/getAllAssets.ts index 0977f2e..ef4ce0a 100644 --- a/src/routes/cornerScape/getAllAssets.ts +++ b/src/routes/cornerScape/getAllAssets.ts @@ -21,7 +21,7 @@ export default router.post( .andWhere("o_assets.type", "<>", "clip") .modify((qb) => { if (type && type.length > 0) qb.whereIn("o_assets.type", type); - }); + }).orderByRaw(`CASE o_assets.type WHEN 'role' THEN 1 WHEN 'scene' THEN 2 WHEN 'tool' THEN 3 ELSE 4 END`); const result = await Promise.all( data.map(async (parent: any) => { const historyImages = await u.db("o_image").where("assetsId", parent.id).andWhere("state", "已完成").select("id", "filePath");