From 37ef6198095f1a056384dae38651dc4d29446afb Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 5 Aug 2024 10:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consume/md/md.go | 1 + consume/zhios_new_video_reward_exchange.go | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) 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