|
@@ -86,7 +86,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b |
|
|
if zhios_order_relate_utils.InArr(cfg.Mode, []string{"lv_price_public_platoon", "lv_price", "lv_price_other", "lv_winery", "extend_price", "niubei_amount"}) && zhios_order_relate_utils.StrToFloat64(rmd.OldPrice) > 0 { //价格为基数 |
|
|
if zhios_order_relate_utils.InArr(cfg.Mode, []string{"lv_price_public_platoon", "lv_price", "lv_price_other", "lv_winery", "extend_price", "niubei_amount"}) && zhios_order_relate_utils.StrToFloat64(rmd.OldPrice) > 0 { //价格为基数 |
|
|
comf = zhios_order_relate_utils.StrToFloat64(rmd.OldPrice) |
|
|
comf = zhios_order_relate_utils.StrToFloat64(rmd.OldPrice) |
|
|
} |
|
|
} |
|
|
if cfg.Mode == "public_platoon" || cfg.Mode == "public_platoon_level" { |
|
|
|
|
|
|
|
|
if cfg.Mode == "public_platoon" { |
|
|
//公排 |
|
|
//公排 |
|
|
//佣金扣除抽成后 |
|
|
//佣金扣除抽成后 |
|
|
fee, _, pvdFee, sysFee := CommFee(comf, cfg, "commission", rmd) |
|
|
fee, _, pvdFee, sysFee := CommFee(comf, cfg, "commission", rmd) |
|
@@ -117,11 +117,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b |
|
|
if rmd.IsGoods == "1" { |
|
|
if rmd.IsGoods == "1" { |
|
|
order, err = BatchSmallGetPublicPlatoonRelateByGoods(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
order, err = BatchSmallGetPublicPlatoonRelateByGoods(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
} else { |
|
|
} else { |
|
|
if cfg.Mode == "public_platoon_level" { |
|
|
|
|
|
order, err = BatchSmallGetPublicPlatoonRelateCommissionLevel(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
|
|
|
} else { |
|
|
|
|
|
order, err = BatchSmallGetPublicPlatoonRelateCommission(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
order, err = BatchSmallGetPublicPlatoonRelateCommissionLevel(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
} |
|
|
} |
|
|
if err != nil || order[rmd.Oid] == nil { |
|
|
if err != nil || order[rmd.Oid] == nil { |
|
|
return 0, 0, 0, 0, nil, nil |
|
|
return 0, 0, 0, 0, nil, nil |
|
@@ -146,13 +142,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b |
|
|
if rmd.IsGoods == "1" { |
|
|
if rmd.IsGoods == "1" { |
|
|
order, err = BatchGetPublicPlatoonRelateCommissionByGoods(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
order, err = BatchGetPublicPlatoonRelateCommissionByGoods(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
} else { |
|
|
} else { |
|
|
if cfg.Mode == "public_platoon_level" { |
|
|
|
|
|
order, err = BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
order, err = BatchGetPublicPlatoonRelateCommissionByOrder(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
order, err = BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine, masterId, PublicPlatoonRelateCommissionReqList) |
|
|
} |
|
|
} |
|
|
if err != nil || order[rmd.Oid] == nil { |
|
|
if err != nil || order[rmd.Oid] == nil { |
|
|
return 0, 0, 0, 0, nil, nil |
|
|
return 0, 0, 0, 0, nil, nil |
|
@@ -332,7 +322,6 @@ func public(engine *xorm.Engine, ulinkParent *comm_plan.LvUser, cfg *comm_plan.P |
|
|
CommonWealthSystems, ok := grade.CommonWealthSystem.(map[string]string) |
|
|
CommonWealthSystems, ok := grade.CommonWealthSystem.(map[string]string) |
|
|
if ok { |
|
|
if ok { |
|
|
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(CommonWealthSystems[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) |
|
|
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(CommonWealthSystems[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|