Bladeren bron

update 一个圈圈

master
DengBiao 11 maanden geleden
bovenliggende
commit
fc47d361e9
1 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. +10
    -1
      rule/one_circles/one_circles_public_platoon_give_activty_coin.go

+ 10
- 1
rule/one_circles/one_circles_public_platoon_give_activty_coin.go Bestand weergeven

@@ -6,6 +6,7 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md"
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/rule/one_circles/md"
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/cache"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/logx"
"encoding/json"
"errors"
@@ -168,12 +169,20 @@ func SettlementPublicGiveActivityCoin(engine *xorm.Engine, masterId string, uid
return err
}
}

err = session.Commit()
if err != nil {
_ = session.Rollback()
return errors.New("事务提交失败")
}

redisKey := fmt.Sprintf(md2.UserNextWatchAdDate, masterId, uid)
var nextWatchAdDate string
if oneCirclesUserWatchRecords.NextWatchAdDate.After(time.Now()) {
nextWatchAdDate = oneCirclesUserWatchRecords.NextWatchAdDate.Format("2006-01-02 15:04:05")
} else {
nextWatchAdDate = time.Now().Add(time.Duration(zhios_order_relate_utils.StrToInt64(videoRewardSystem.IntervalMinutes)) * time.Minute).Format("2006-01-02 15:04:05")
}
cache.SetEx(redisKey, nextWatchAdDate, 60*2) //TODO::默认缓存1小时
}
return
}


Laden…
Annuleren
Opslaan