diff --git a/rule/egg_energy/give_activty_coin.go b/rule/egg_energy/give_activty_coin.go index 0611732..0e9e452 100644 --- a/rule/egg_energy/give_activty_coin.go +++ b/rule/egg_energy/give_activty_coin.go @@ -204,13 +204,14 @@ func SettlementGiveActivityCoin(engine *xorm.Engine, user model.User, ecpm strin if residueWatchAdNum < 0 { residueWatchAdNum = egg_system_rules.StrToInt(videoRewardSystem.RewardTotalNum) } - _, err2 := eggEnergyUserWatchRecordsDb.EggEnergyUserWatchRecordsInsert(&model.EggEnergyUserWatchRecords{ + eggEnergyUserWatchRecords = &model.EggEnergyUserWatchRecords{ Uid: uid, NextWatchAdDate: now.Add(time.Hour * time.Duration(egg_system_rules.StrToInt(videoRewardSystem.EachRoundHour))), ResidueWatchAdNum: egg_system_rules.StrToInt(videoRewardSystem.RewardTotalNum) - 1, CreateAt: now.Format("2006-01-02 15:04:05"), UpdateAt: now.Format("2006-01-02 15:04:05"), - }) + } + _, err2 := eggEnergyUserWatchRecordsDb.EggEnergyUserWatchRecordsInsert(eggEnergyUserWatchRecords) if err2 != nil { return rewardValue, err2 }