From 53a8982b1cb9f84c89ae7c95ead25d0a590791ef Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 23 Jul 2024 18:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/happy_orchard/happy_orchard_give_water.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rule/happy_orchard/happy_orchard_give_water.go b/rule/happy_orchard/happy_orchard_give_water.go index 1ff4fa5..add82c7 100644 --- a/rule/happy_orchard/happy_orchard_give_water.go +++ b/rule/happy_orchard/happy_orchard_give_water.go @@ -46,13 +46,14 @@ func HappyOrchardGiveWater(eg *xorm.Engine, masterId string, uid int, isMultiple if residueWatchAdNum < 0 { residueWatchAdNum = zhios_order_relate_utils.StrToInt(videoRewardSystem.RewardTotalNum) } - _, err2 := eg.Insert(&models.HappyOrchardUserWatchRecords{ + UserWatchRecords = &models.HappyOrchardUserWatchRecords{ Uid: uid, NextWatchAdDate: now.Add(time.Hour * time.Duration(zhios_order_relate_utils.StrToInt(videoRewardSystem.EachRoundHour))), ResidueWatchAdNum: zhios_order_relate_utils.StrToInt(videoRewardSystem.RewardTotalNum) - 1, CreateAt: now, UpdateAt: now, - }) + } + _, err2 := eg.Insert(UserWatchRecords) if err2 != nil { return err2 }