更新排序
This commit is contained in:
parent
cfdb3131d1
commit
ff9809f78e
@ -21,7 +21,7 @@ export default router.post(
|
|||||||
.andWhere("o_assets.type", "<>", "clip")
|
.andWhere("o_assets.type", "<>", "clip")
|
||||||
.modify((qb) => {
|
.modify((qb) => {
|
||||||
if (type && type.length > 0) qb.whereIn("o_assets.type", type);
|
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(
|
const result = await Promise.all(
|
||||||
data.map(async (parent: any) => {
|
data.map(async (parent: any) => {
|
||||||
const historyImages = await u.db("o_image").where("assetsId", parent.id).andWhere("state", "已完成").select("id", "filePath");
|
const historyImages = await u.db("o_image").where("assetsId", parent.id).andWhere("state", "已完成").select("id", "filePath");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user