|
|
@@ -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 |
|
|
|