Преглед на файлове

add reverse for v1.0.7 商品详情分佣

tags/v1.0.7
huangjuajun преди 2 години
родител
ревизия
a1108fa1cd
променени са 1 файла, в които са добавени 28 реда и са изтрити 0 реда
  1. +28
    -0
      rule/relate_commission.go

+ 28
- 0
rule/relate_commission.go Целия файл

@@ -5,6 +5,7 @@ import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/lib/comm_plan"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md"
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/svc"
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils"
"context"
"errors"
"golang.org/x/sync/errgroup"
@@ -119,3 +120,30 @@ func BatchGetCommissionByOrder(engine *xorm.Engine, dbName string, CommissionPar

return goodsId2lvUser, nil
}

//商品详情等使用
func SettleCommWithGoodsDetail(eg *xorm.Engine, dbName string, CommissionParam md.CommissionFirstParam) (float64, float64, float64, float64, *comm_plan.LvUser, error) {
var (
isShare = false
isAllLevelReturn = false
)
if CommissionParam.IsShare != 0 {
isShare = true
}

if CommissionParam.IsAllLevelReturn != 0 {
isAllLevelReturn = true
}
var mapData = map[string]string{
"old_lv": CommissionParam.OldLv,
"new_lv": CommissionParam.NewLv,
"ownbuy_return_type": zhios_order_relate_utils.IntToStr(CommissionParam.OwnbuyReturnType),
}
virCfg, _ := db.SysCfgGetOne(eg, "virtual_coin_rebate_type")
var virType = "price"
if virCfg != nil && virCfg.Val != "" {
virType = virCfg.Val
}
profit, pvdFee, sysFee, subsidyFee, lvUser, err := svc.GetRewardCommission(eg, &CommissionParam.CommissionParam, isShare, CommissionParam.Uid, CommissionParam.Provider, dbName, isAllLevelReturn, mapData, virType)
return profit, pvdFee, sysFee, subsidyFee, lvUser, err
}

Зареждане…
Отказ
Запис