diff --git a/consume/md/md.go b/consume/md/md.go index c05d568..d88752b 100644 --- a/consume/md/md.go +++ b/consume/md/md.go @@ -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"` diff --git a/consume/zhios_new_video_reward_exchange.go b/consume/zhios_new_video_reward_exchange.go index a7eafca..3286ee9 100644 --- a/consume/zhios_new_video_reward_exchange.go +++ b/consume/zhios_new_video_reward_exchange.go @@ -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