🐞 fix(订单): 各种类型的订单在支付之前校验次数

This commit is contained in:
luying
2023-04-06 13:32:40 +08:00
parent f7ccc14f74
commit 08d5ebedeb
18 changed files with 224 additions and 29 deletions

View File

@@ -125,9 +125,9 @@ export async function makeLimitPackageReward(roleId: string, roleName: string, s
if (!item) {
return STATUS.ACTIVITY_NO_PRODUCT;
}
// if (item.countMax > 0 && item.buyCount >= item.countMax) {
// return STATUS.ACTIVITY_MAX_COUNT;
// }
if (item.countMax > 0 && item.buyCount >= item.countMax) {
return STATUS.ACTIVITY_MAX_COUNT;
}
let rewardArray = stringToRewardParam(item.reward)
let result = await addReward(roleId, roleName, sid, serverId, rewardArray, ITEM_CHANGE_REASON.BUY_LIMIT_PACKAGE);