From 4200d5e530b418ad1ca5641d2c15162e35cde4bb Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 29 May 2022 11:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=90=AF=E5=8A=A8=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E4=BE=9D=E8=B5=96=E4=BC=98=E5=85=88=E5=AE=89=E8=A3=85?= =?UTF-8?q?linux=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/loaders/initData.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/back/loaders/initData.ts b/back/loaders/initData.ts index b541926f..a810ccf0 100644 --- a/back/loaders/initData.ts +++ b/back/loaders/initData.ts @@ -21,7 +21,11 @@ export default async () => { ); // 初始化时安装所有处于安装中,安装成功,安装失败的依赖 - DependenceModel.findAll({ where: {}, raw: true }).then(async (docs) => { + DependenceModel.findAll({ + where: {}, + order: [['type', 'DESC']], + raw: true, + }).then(async (docs) => { const groups = _.groupBy(docs, 'type'); for (const key in groups) { if (Object.prototype.hasOwnProperty.call(groups, key)) {