diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index 3ceedf5..74d0170 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -94,7 +94,7 @@ export default async function (call: ApiCall) { setObj[zeroTime] = gotAmount; G.mongodb.cEvent('payForDiamond').updateOne({ uid: call.uid }, { $set: setObj - }); + }, {upsert: true}); // 记录玩家日志. 仅保留最近 10 条 if (showOff) { G.mongodb.collection('hdinfo').updateOne({ hdid: call.req.activityId, }, { $push: { 'data.showOffList': { $each: [{ name: call.conn.gud.name, gotAmount }], $slice: -10 }}});