From 17402cbad7da9328317239bdefbd06f30a5cc590 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 19 Jan 2024 22:58:31 +0800 Subject: [PATCH] update --- .../one_circles_public_platoon_give_activty_coin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rule/one_circles/one_circles_public_platoon_give_activty_coin.go b/rule/one_circles/one_circles_public_platoon_give_activty_coin.go index 2b392a4..05ada82 100644 --- a/rule/one_circles/one_circles_public_platoon_give_activty_coin.go +++ b/rule/one_circles/one_circles_public_platoon_give_activty_coin.go @@ -91,6 +91,10 @@ func SettlementPublicGiveActivityCoin(engine *xorm.Engine, masterId string, uid } now := time.Now() if oneCirclesUserWatchRecords == nil { + residueWatchAdNum := zhios_order_relate_utils.StrToInt(videoRewardSystem.RewardTotalNum) - 1 + if residueWatchAdNum < 1 { + residueWatchAdNum = zhios_order_relate_utils.StrToInt(videoRewardSystem.RewardTotalNum) + } _, err2 := db.OneCirclesUserWatchRecordsInsert(engine, &model.OneCirclesUserWatchRecords{ Uid: uid, NextWatchAdDate: now.Add(time.Hour * time.Duration(zhios_order_relate_utils.StrToInt(videoRewardSystem.EachRoundHour))),