Merge branch 'master' into dev

This commit is contained in:
dy 2023-12-22 11:04:11 +08:00
commit e34a5a635f
2 changed files with 36 additions and 3 deletions

View File

@ -0,0 +1,27 @@
import {ctor} from "../global";
import {initMongoDB} from "../setMongodb";
async function start() {
await initMongoDB()
// 刷新活动配置
console.log(`删除错误活动数据开始...`);
await G.mongodb.collection("hdinfo").deleteOne({hdid: 8000})
console.log(`删除错误活动数据完成...`);
}
ctor();
start().then(() => {
let s = 0;
setInterval(() => {
s += 1;
console.log(new Date().format("MM-dd hh:mm:ss"));
if (s >= 3) process.exit(1);
}, 1000)
console.log("逻辑执行完成...等待退出!!!");
});

View File

@ -178,6 +178,7 @@ export class PayFun {
if (payed) {
console.log(uid, payId, payArgs, orderNo);
console.log('订单号已存在');
return;
}
}
@ -232,13 +233,18 @@ export class PayFun {
prize.push(...conf.prize)
}
//圣诞节活动充值
await Christmasfun.payChristmas(payId, call);
try{
await Christmasfun.payChristmas(payId, call);
}catch (e) {
console.log("Christmasfun.payChristmas Error",e);
}
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player)
if (isReplaceConf) {
let prizePayId = `zuanshi_${conf.money}`
payArgs.toPrizePayId = prizePayId
conf = this.replacePrizeToChongzhi(prizePayId, conf)
prize = [...conf.prize]
prize = conf.prize;
}
await PlayerFun.sendPrize(call, prize);
@ -286,7 +292,7 @@ export class PayFun {
* @param payId
* @param conf
*/
static async replacePrizeToChongzhi(payId, conf) {
static replacePrizeToChongzhi(payId, conf) {
return {
id: payId,
money: conf.money,