Merge branch 'feature/pay_for_diamond' into dev
This commit is contained in:
commit
77f8380080
@ -92,12 +92,13 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
||||
const zeroTime = PublicShared.getToDayZeroTime();
|
||||
const setObj = {};
|
||||
setObj[zeroTime] = gotAmount;
|
||||
G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid }, {
|
||||
const updatecEventResult = await G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid }, {
|
||||
$set: setObj
|
||||
}, {upsert: true});
|
||||
console.log('updatecEventResult', JSON.stringify(updatecEventResult));
|
||||
// 记录玩家日志. 仅保留最近 10 条
|
||||
if (showOff) {
|
||||
G.mongodb.collection('hdinfo').updateOne({ hdid: call.req.activityId, }, { $push: { 'data.showOffList': { $each: [{ name: call.conn.gud.name, gotAmount }], $slice: -10 }}});
|
||||
await G.mongodb.collection('hdinfo').updateOne({ hdid: call.req.activityId, }, { $push: { 'data.showOffList': { $each: [{ name: call.conn.gud.name, gotAmount }], $slice: -10 }}});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user