From 50c52556e059a06eacf0c92e94cc450d6e59fdb9 Mon Sep 17 00:00:00 2001 From: dy Date: Thu, 21 Dec 2023 23:40:41 +0800 Subject: [PATCH 1/3] fix pay --- src/fix_patch/patch_hdinfo_20231221.ts | 27 ++++++++++++++++++++++++++ src/public/pay.ts | 1 + 2 files changed, 28 insertions(+) create mode 100644 src/fix_patch/patch_hdinfo_20231221.ts diff --git a/src/fix_patch/patch_hdinfo_20231221.ts b/src/fix_patch/patch_hdinfo_20231221.ts new file mode 100644 index 0000000..22afa3b --- /dev/null +++ b/src/fix_patch/patch_hdinfo_20231221.ts @@ -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("逻辑执行完成...等待退出!!!"); +}); + + diff --git a/src/public/pay.ts b/src/public/pay.ts index 61fef69..ec4ea08 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -178,6 +178,7 @@ export class PayFun { if (payed) { console.log(uid, payId, payArgs, orderNo); console.log('订单号已存在'); + return; } } From c6953882084e4cb4397ecd06c076182e88149ab2 Mon Sep 17 00:00:00 2001 From: dy Date: Thu, 21 Dec 2023 23:51:03 +0800 Subject: [PATCH 2/3] fix pay --- src/public/pay.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/public/pay.ts b/src/public/pay.ts index ec4ea08..e752ce8 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -233,7 +233,12 @@ 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}` From ba2c49868f653cf8763a89e26a419d3550748b56 Mon Sep 17 00:00:00 2001 From: dy Date: Fri, 22 Dec 2023 00:22:54 +0800 Subject: [PATCH 3/3] fix pay --- src/public/pay.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/public/pay.ts b/src/public/pay.ts index e752ce8..b1302b5 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -244,7 +244,7 @@ export class PayFun { let prizePayId = `zuanshi_${conf.money}` payArgs.toPrizePayId = prizePayId conf = this.replacePrizeToChongzhi(prizePayId, conf) - prize = [...conf.prize] + prize = conf.prize; } await PlayerFun.sendPrize(call, prize); @@ -292,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,