Bläddra i källkod

add reverse:for v1.4.4 分佣计算修复

tags/v1.4.4
huangjiajun 2 år sedan
förälder
incheckning
ba89d6a16e
1 ändrade filer med 2 tillägg och 4 borttagningar
  1. +2
    -4
      rule/relate_commission.go

+ 2
- 4
rule/relate_commission.go Visa fil

@@ -37,11 +37,9 @@ func BatchGetCommissionByGoods(eg *xorm.Engine, dbName string, commissionParamLi
if param.IsShare != 0 {
isShare = true
}

if param.IsAllLevelReturn != 0 {
isAllLevelReturn = true
}

if param.GoodsId == "" {
return errors.New("商品ID缺失")
}
@@ -86,6 +84,8 @@ func BatchGetCommissionByOrder(engine *xorm.Engine, dbName string, CommissionPar
for _, param := range CommissionParamList {
param := param // 为下面的闭包创建局部变量
group.Go(func() error {
defer mu.Unlock()
mu.Lock()
if param.IsShare != 0 {
isShare = true
}
@@ -103,7 +103,6 @@ func BatchGetCommissionByOrder(engine *xorm.Engine, dbName string, CommissionPar
if err != nil {
return err
}
mu.Lock()
goodsId2lvUser[param.Oid] = &comm_plan.SettleCommissionToGuide{
Profit: profit,
PvdFee: pvdFee,
@@ -111,7 +110,6 @@ func BatchGetCommissionByOrder(engine *xorm.Engine, dbName string, CommissionPar
SubsidyFee: subsidyFee,
LvUser: lvUser,
}
mu.Unlock()

return nil
})


Laddar…
Avbryt
Spara