|
|
@@ -22,6 +22,9 @@ func CalReturnAmountAndRatio(level, ownbuyReturnType, peerNum int, userType stri |
|
|
|
} |
|
|
|
ratio := getVirtualCoinRatio(userType, level, peerNum, opt.UserRate, coinId) |
|
|
|
amount := getCoinAmount(ratio, zhios_order_relate_utils.StrToInt(coinId), newFee, opt.VirtualCoinMoneyRatioList) |
|
|
|
if coinId != "0" && opt.Mode == "lv_winery" && userType == "own" { //酒庄模式不在这里计算 |
|
|
|
amount = 0 |
|
|
|
} |
|
|
|
amountList = append(amountList, &VirtualCoinCommission{ |
|
|
|
Cid: coinId, |
|
|
|
Val: amount, |
|
|
@@ -449,7 +452,7 @@ func commSubsidy(opt *PlanOpt, totalAmt, integralTotalAmt float64, lvuser *LvUse |
|
|
|
return 0, 0, 0, nil, nil |
|
|
|
} |
|
|
|
//如果不是购买商品模式 跳过 |
|
|
|
if pvdBool == false && zhios_order_relate_utils.InArr(grade[lv].UserSubsidyType, []string{"buy_goods", "winery"}) { // 购买商品补贴 |
|
|
|
if pvdBool == false && zhios_order_relate_utils.InArr(grade[lv].UserSubsidyType, []string{"buy_goods", "winery"}) == false { // 购买商品补贴 |
|
|
|
return 0, 0, 0, nil, nil |
|
|
|
} |
|
|
|
//处理每个条件的返利 |
|
|
|