🐞 fix(商店): 限时商店添加时间永久类型

This commit is contained in:
luying
2022-11-22 17:19:53 +08:00
parent b94c64cd1a
commit 854cceb1bb
5 changed files with 15 additions and 7 deletions
@@ -63,7 +63,7 @@ export class ShopHandler {
if(dicShopItem['beginTime'] && dicShopItem['beginTime'] > nowSeconds()) return resResult(STATUS.SHOP_CLOSED);
if(dicShopItem['endTime'] && dicShopItem['endTime'] < nowSeconds()) return resResult(STATUS.SHOP_CLOSED);
let userShop = await UserShopModel.findByRoleAndItem(roleId, activityId, dicShopItem, seasonNum);
let userShop = await UserShopModel.findByRoleAndItem(roleId, dicShopItem, seasonNum);
let checkResult = await checkShopInPurchase(session, activityId, count, userShop?.count||0, dicShopItem);
if(checkResult.code != STATUS.SUCCESS.code) {
+1 -1
View File
@@ -140,7 +140,7 @@ export async function checkShopCanBuyInOrder(roleId: string, serverId: number, a
let dicItem = shopData.findByProductID(productID);
if(!dicItem) return false;
let userShop = await UserShopModel.findByRoleAndItem(roleId, activity.activityId, dicItem, seasonNum);
let userShop = await UserShopModel.findByRoleAndItem(roleId, dicItem, seasonNum);
let result = await checkShopItemCanBuy(activity.activityId, dicItem.id, roleId, serverId, guildCode, vipStartTime, 1, userShop?.count||0, dicItem);
return result.code == STATUS.SUCCESS.code;
}