Browse Source

更新

master
huangjiajun 4 weeks ago
parent
commit
5fe8c0c80f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/svc/svc_division_strategy.go

+ 2
- 2
app/svc/svc_division_strategy.go View File

@@ -113,7 +113,7 @@ func DivisionStrategySave(c *gin.Context, req md.DivisionStrategyDetailRes) erro
mediumData.AgentRevenueRate = utils.StrToInt(req.AgentRevenueRate)
mediumData.ExtraRevenueRate = utils.StrToInt(req.ExtraRevenueRate)
mediumData.AgreementSharingRate = utils.StrToInt(req.AgreementSharingRate)
_, err := sess.Where("id=?", mediumData.Id).Update(mediumData)
_, err := sess.Where("id=?", mediumData.Id).Cols("agreement_sharing_rate,platform_retention_rate,commission_retention_rate,media_revenue_rate,agent_revenue_rate,extra_revenue_rate").Update(mediumData)
if err != nil {
sess.Rollback()
return err
@@ -137,7 +137,7 @@ func DivisionStrategySave(c *gin.Context, req md.DivisionStrategyDetailRes) erro
flow.ExtraRevenueRate = utils.StrToInt(v.ExtraRevenueRate)
flow.AgentRevenueRate = utils.StrToInt(v.AgentRevenueRate)
flow.UpdateAt = time.Now().Format("2006-01-02 15:04:05")
_, err = sess.Where("id=?", flow.Id).Update(flow)
_, err = sess.Where("id=?", flow.Id).Cols("extra_revenue_rate,agent_revenue_rate,update_at").Update(flow)
if err != nil {
sess.Rollback()
return err


Loading…
Cancel
Save