Browse Source

结算观看激励广告返回积分值

master
huangjiajun 1 month ago
parent
commit
12fa11429e
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      rule/egg_energy/give_activty_coin.go

+ 3
- 2
rule/egg_energy/give_activty_coin.go View File

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


Loading…
Cancel
Save