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