|
|
@@ -824,13 +824,14 @@ func GetSubsidyVirtualCoinAmount(ratio, moneyRate, typ string, fee, sysFee float |
|
|
|
// 计算佣金、虚拟币额度 |
|
|
|
func getCoinAmount(ratio string, coinId int, fee float64, rateList map[int]string) (amount float64) { |
|
|
|
moneyRate, ok := rateList[coinId] |
|
|
|
if !ok { |
|
|
|
amount = 0.00 |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if coinId == 0 { // 金额 |
|
|
|
amount = fee * zhios_order_relate_utils.StrToFloat64(ratio) |
|
|
|
} else { // 虚拟币 需要将金额按设置的比例兑换成虚拟币 这里不乘比例了 会影响后面的极差 |
|
|
|
if !ok { |
|
|
|
amount = 0.00 |
|
|
|
return |
|
|
|
} |
|
|
|
//amount = fee * zhios_order_relate_utils.AnyToFloat64(moneyRate) * zhios_order_relate_utils.StrToFloat64(ratio) |
|
|
|
amount = fee * zhios_order_relate_utils.AnyToFloat64(moneyRate) |
|
|
|
} |
|
|
|