Commit 485c8c35645a894f76e3588a369703e6367d3a35

Authored by liuzujun
1 parent 8e892c71

活动礼包购买记录活动过期清理

src/GlobalVar.lua
... ... @@ -292,6 +292,10 @@ CardType = {
292 292 BattlePassCard = 7, -- 探索指令
293 293 }
294 294  
  295 +ShopPackType = {
  296 + ActShopPack = 5, -- 活动礼包
  297 +}
  298 +
295 299 HeroQuality = {
296 300 N = 1,
297 301 R = 2,
... ...
1   -Subproject commit 3c3215a04ace7ebcb57dbb405f2fda22dc551615
  1 +Subproject commit 0cec95763804e1c8aca85f752732913423b8a18d
... ...
src/models/Activity.lua
... ... @@ -705,5 +705,19 @@ function Activity:getBattleTicket(actId)
705 705 end
706 706 end
707 707  
  708 +activityFunc[Activity.ActivityType.ActShopGoods] = {
  709 + ["init"] = function(self, actType, isCrossDay, notify, actId)
  710 + end,
  711 + ["close"] = function(self, actType, notify)
  712 + local rechargeRecord = self.owner.storeData:getProperty("payR")
  713 + for id, cfg in pairs(csvdb["shop_rechargeCsv"]) do
  714 + if cfg.shop == 3 and cfg.type == ShopPackType.ActShopPack then
  715 + rechargeRecord[id] = nil
  716 + end
  717 + end
  718 + self.owner.storeData:updateProperty({field="payR", value=rechargeRecord})
  719 + end,
  720 +}
  721 +
708 722  
709 723 return Activity
... ...
src/models/RolePlugin.lua
... ... @@ -1582,9 +1582,9 @@ function RolePlugin.bind(Role)
1582 1582 end
1583 1583  
1584 1584 --判断是否是活动商品
1585   - local actCfg = csvdb["activity_ctrlCsv"][rechargeData.actid]
  1585 + local actCfg = csvdb["activity_ctrlCsv"][rechargeData.activity_id]
1586 1586 if not actCfg then return "" end
1587   - if not self.activity:isOpenById(rechargeData.actid, "ActShopGoods") then return "" end
  1587 + if not self.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then return "" end
1588 1588  
1589 1589 local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId)
1590 1590 if orderId then
... ...