This commit is contained in:
dy 2024-01-03 11:38:06 +08:00
parent 8f0c24bc87
commit 1a9f942297

View File

@ -231,16 +231,12 @@ export class PlayerFun {
atn atn
} }
G.mongodb.collection('rmbuse').insertOne(data); G.mongodb.collection('rmbuse').insertOne(data);
if (data.isAdd){ // 消费竞赛开启时写入跨服数据库
ActionLog.addDayLog(uid, { key: 'addRmbmoney', val: atn.n }); if (G.huodong.xfjs && !data.isAdd && typeof data.change == 'number') {
}else { G.crossmongodb.collection('rmbuse').updateOne({uid: data.uid, type: `xfjs_${G.huodong.xfjsId}`}, {
// 消费竞赛开启时写入跨服数据库 $set: {time: G.time},
if (G.huodong.xfjs && typeof data.change == 'number') { $inc: {change: data.change}
G.crossmongodb.collection('rmbuse').updateOne({uid: data.uid, type: `xfjs_${G.huodong.xfjsId}`}, { }, {upsert: true});
$set: {time: G.time},
$inc: {change: data.change}
}, {upsert: true});
}
} }
} }