天梯挂机加速;天梯派遣部分新接口
fixed:
数据库类型和插入数据的用法修复
This commit is contained in:
liangtongchuan
2020-10-15 01:50:22 +08:00
parent 2b1575516f
commit 33ee71adcd
14 changed files with 380 additions and 21 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export default class Item extends BaseModel {
public static async createItem(itemInfo: {roleId: string, roleName: string, itemid: number, seqId: number, itemName: string, count: number}, lean = true) {
const doc = new ItemModel();
const update = Object.assign(itemInfo, doc.toJSON());
const update = Object.assign(doc.toJSON(), itemInfo);
const item = await ItemModel.findOneAndUpdate({ seqId: itemInfo.seqId }, update, {upsert: true, new: true}).lean(lean);
return item;
}