Compare commits
2 Commits
8780716d44
...
945d406131
Author | SHA1 | Date | |
---|---|---|---|
945d406131 | |||
af03f2f6c5 |
@ -66,7 +66,8 @@ export class PayFun {
|
||||
);
|
||||
})
|
||||
|
||||
G.mongodb.collection('payLogNew').insertMany(args.map(i => ({key: i.payId, uid: uid, values: i.val})));
|
||||
let colls = args.map(i => ({key: i.payId, uid: uid, values: i.val}))
|
||||
if(colls.length>0)G.mongodb.collection('payLogNew').insertMany(colls);
|
||||
|
||||
G.server.sendMsgByUid(uid, 'msg_s2c/PayChange', Object.fromEntries(args.map(a => [a.payId, a.val])));
|
||||
}
|
||||
|
@ -78,16 +78,17 @@ export class XstaskFun {
|
||||
uid: uid,
|
||||
};
|
||||
});
|
||||
let result = await G.mongodb.collection('xstask').insertMany(taskList);
|
||||
|
||||
this.uidTask[uid] = this.uidTask[uid] || [];
|
||||
|
||||
if(taskList.length > 0){
|
||||
let result = await G.mongodb.collection('xstask').insertMany(taskList);
|
||||
taskList.forEach((task, index) => {
|
||||
this.uidTask[uid].push(G.mongodb.conversionIdObj({
|
||||
_id: result.insertedIds[index],
|
||||
...task
|
||||
}));
|
||||
});
|
||||
|
||||
}
|
||||
return this.uidTask[uid];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user