From 54297a1743fc56b0591b7d653cfab8af716831a7 Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 25 Oct 2022 14:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E5=9B=A2=E8=B4=AD):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=A2=E8=B4=AD=E5=AE=9A=E6=97=B6=E9=80=80?= =?UTF-8?q?=E8=B4=B9=E5=A4=9A=E6=AC=A1=E9=80=80=E8=B4=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/activity/groupShopService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game-server/app/services/activity/groupShopService.ts b/game-server/app/services/activity/groupShopService.ts index 8fbdfcd1d..53887b48c 100644 --- a/game-server/app/services/activity/groupShopService.ts +++ b/game-server/app/services/activity/groupShopService.ts @@ -80,13 +80,13 @@ export async function setGroupShopToSetSum(arr: { activityId: number, itemId: nu } export async function refundGroupShop(isDebug = false) { + console.log('###### refundGroupShop') let activities = await ActivityModel.findActivityByType(ACTIVITY_TYPE.GROUP_SHOP); for(let activityData of activities) { let hasRefund = await ActivityGroupShopRefundModel.check(activityData.activityId); - if(!isDebug && !hasRefund) continue; + if(!isDebug && hasRefund) continue; - let recs = new Map(); let playerData = await getGroupShopServerData(activityData); if(!isDebug && playerData.endTime >= Date.now()) continue; @@ -109,6 +109,7 @@ export async function refundGroupShop(isDebug = false) { await sendMailByContent(MAIL_TYPE.GROUP_SHOP_REFUND, roleId, { goods: rewards, params: [itemName, `${resultDiscount}`, `${sumGold}`] }); } } + console.log('###### refundGroupShop refund complete', activityData.activityId) await ActivityGroupShopRefundModel.refund(activityData.activityId, refundRecs); } } \ No newline at end of file