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