Pārlūkot izejas kodu

修改古玉充能活动

gitxsm 1 gadu atpakaļ
vecāks
revīzija
e825cda4df

+ 1 - 14
script/common/CommonDB.lua

@@ -42,6 +42,7 @@ KEY_COMMERCEACT_INFO = "commerceActInfo"				-- 跨服活动信息
 KEY_JJCLADDER_TIME = "jjcladderEndTime"					-- 天梯赛结束时间
 KEY_JJCLADDER_TIME = "jjcladderEndTime"					-- 天梯赛结束时间
 KEY_COMMERCEACT_MIDDLE_INFO = "commerceMiddleActInfo"	-- 中心服跨服商业活动信息
 KEY_COMMERCEACT_MIDDLE_INFO = "commerceMiddleActInfo"	-- 中心服跨服商业活动信息
 KEY_BAN_DATA = "banData"								-- 封禁数据
 KEY_BAN_DATA = "banData"								-- 封禁数据
+KEY_REBATE_DATA = "rebateData"							-- 渠道返利数据
 
 
 db = db or {
 db = db or {
 	serverStartTime = nil,								-- 开服时间
 	serverStartTime = nil,								-- 开服时间
@@ -72,35 +73,21 @@ db = db or {
 	commerceMiddleActInfo = {},							-- 中心服跨服商业活动信息
 	commerceMiddleActInfo = {},							-- 中心服跨服商业活动信息
 }
 }
 
 
-do
-	if _G.is_middle == true then
-		if not db[KEY_BAN_DATA] then
-			db[KEY_BAN_DATA] = {}
-		end
-	end
-end
 
 
 --普通服缓存的封禁数据
 --普通服缓存的封禁数据
 local banList = {}
 local banList = {}
 
 
 
 
 
 
-
 function init()
 function init()
 	LuaMongo.find(DB.db_common)
 	LuaMongo.find(DB.db_common)
 	if not LuaMongo.next(db) then
 	if not LuaMongo.next(db) then
 		LuaMongo.insert(DB.db_common, db)
 		LuaMongo.insert(DB.db_common, db)
 	end
 	end
-	if type(db[KEY_BAN_DATA]) ~= "table" then
-		db[KEY_BAN_DATA] = {}
-	end
 end
 end
 
 
 -- 修改db单个字段
 -- 修改db单个字段
 function updateValue(key, value)
 function updateValue(key, value)
-	if key == KEY_BAN_DATA then
-		print("===========updateValue============", type(value))
-	end
 	if not key then return end	
 	if not key then return end	
 	if not db then return end
 	if not db then return end
 	if value then
 	if value then

+ 4 - 4
script/module/absAct/LotteryByDiamondLogic.lua

@@ -70,7 +70,7 @@ function Query(human, id)
 
 
     --普通奖池
     --普通奖池
     local nLotteryCostCnt = lottery1CostCnt
     local nLotteryCostCnt = lottery1CostCnt
-    if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+    if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
         nLotteryCostCnt = 0
         nLotteryCostCnt = 0
     end
     end
 
 
@@ -129,7 +129,7 @@ function Lottery(human, id, type)
     local targetTotalWeight = comTotalWeight
     local targetTotalWeight = comTotalWeight
     local targetPrizeCfg = LotteryCfg[1].prizeData
     local targetPrizeCfg = LotteryCfg[1].prizeData
     if type == 1 then
     if type == 1 then
-        if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+        if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
             actData.lastFreeTime = os.time()
             actData.lastFreeTime = os.time()
         else
         else
             itemCnt = lottery1CostCnt
             itemCnt = lottery1CostCnt
@@ -184,7 +184,7 @@ function Lottery(human, id, type)
     msgRet.lotteryTimes = actData.speLotteryTimes or 0
     msgRet.lotteryTimes = actData.speLotteryTimes or 0
 
 
     local nLotteryCostCnt = lottery1CostCnt
     local nLotteryCostCnt = lottery1CostCnt
-    if not actData.lastFreeTime or not Util.isSameDay(actData.lastFreeTime) then
+    if not actData.lastFreeTime or not Util.isSameDayByTimes(actData.lastFreeTime, os.time()) then
         nLotteryCostCnt = 0
         nLotteryCostCnt = 0
     end
     end
     Grid.makeItem(msgRet.lottery1cost, lotteryCostID, nLotteryCostCnt)
     Grid.makeItem(msgRet.lottery1cost, lotteryCostID, nLotteryCostCnt)
@@ -202,7 +202,7 @@ function isRed(human, YYInfo, funcConfig)
         return false
         return false
     end
     end
 
 
-    if not tActData.lastFreeTime or not Util.isSameDay(tActData.lastFreeTime) then
+    if not tActData.lastFreeTime or not Util.isSameDayByTimes(tActData.lastFreeTime, os.time()) then
         return true
         return true
     end
     end