Browse Source

更新

one_orenge
huangjiajun 4 months ago
parent
commit
37ef619809
2 changed files with 12 additions and 9 deletions
  1. +1
    -0
      consume/md/md.go
  2. +11
    -9
      consume/zhios_new_video_reward_exchange.go

+ 1
- 0
consume/md/md.go View File

@@ -22,6 +22,7 @@ type ZhiosTaskReward struct {
PlanType string `json:"plan_type"`
Provider string `json:"provider"`
PvdOid string `json:"pvd_oid"`
IsTeam string `json:"is_team"`
}
type AcquisitionCfg struct {
Id string `json:"id"`


+ 11
- 9
consume/zhios_new_video_reward_exchange.go View File

@@ -71,16 +71,18 @@ func handleZhiosNewVideoRewardExchange(msg []byte) error {
//奖励
oid := canalMsg.Oid
uid := canalMsg.Uid
sess := eg.NewSession()
defer sess.Close()
sess.Begin()
_, err = svc.ExchangeUserVirFinValidAndInterFlowWithSession(sess,
utils.StrToFloat64(amount), "看视频奖励", "0", 1, 170, utils.StrToInt(uid), utils.StrToInt(canalMsg.CoinId), 0, utils.StrToInt64(oid), "", 0, 0)
if err != nil {
sess.Rollback()
return err
if canalMsg.IsTeam != "1" {
sess := eg.NewSession()
defer sess.Close()
sess.Begin()
_, err = svc.ExchangeUserVirFinValidAndInterFlowWithSession(sess,
utils.StrToFloat64(amount), "看视频奖励", "0", 1, 170, utils.StrToInt(uid), utils.StrToInt(canalMsg.CoinId), 0, utils.StrToInt64(oid), "", 0, 0)
if err != nil {
sess.Rollback()
return err
}
sess.Commit()
}
sess.Commit()
if canalMsg.Mode != "" {
//计算佣金
var CommissionParam md3.CommissionFirstParam


Loading…
Cancel
Save