fix bug 升级更新错误

This commit is contained in:
luying
2020-12-14 21:10:35 +08:00
parent 763b61b867
commit 2a268b2158
4 changed files with 29 additions and 21 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export default class Item extends BaseModel {
}
public static async findByRoleAndType(roleId: string, type: number, lean = true) {
const items = await ItemModel.find({ roleId, type }).select('id count type').lean(lean);
const items = await ItemModel.find({ roleId, type }).select('id count type').sort({id: 1}).lean(lean);
return items;
}