Commit 485c8c35645a894f76e3588a369703e6367d3a35
1 parent
8e892c71
活动礼包购买记录活动过期清理
Showing
4 changed files
with
21 additions
and
3 deletions
Show diff stats
src/GlobalVar.lua
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 | ... | ... |