|
@@ -242,18 +242,15 @@ func CalReturnAmountAndRatio(level, ownbuyReturnType int, userType string, fee, |
|
|
return commission, commissionRatio, amountList, ratioList |
|
|
return commission, commissionRatio, amountList, ratioList |
|
|
} |
|
|
} |
|
|
func getfee(fee float64, commArr map[string]string) float64 { |
|
|
func getfee(fee float64, commArr map[string]string) float64 { |
|
|
newfee := fee |
|
|
|
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["alipayServiceChargeRate"]) > 0 { |
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["alipayServiceChargeRate"]) > 0 { |
|
|
newfee = fee - fee*zhios_order_relate_utils.StrToFloat64(commArr["alipayServiceChargeRate"]) |
|
|
|
|
|
|
|
|
fee = fee - fee*zhios_order_relate_utils.StrToFloat64(commArr["alipayServiceChargeRate"]) |
|
|
} |
|
|
} |
|
|
|
|
|
newfee := fee * zhios_order_relate_utils.StrToFloat64(commArr["distributableCoefficientRate"]) |
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["taxRevenueRate"]) > 0 { |
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["taxRevenueRate"]) > 0 { |
|
|
newfee = newfee - newfee*zhios_order_relate_utils.StrToFloat64(commArr["taxRevenueRate"]) |
|
|
|
|
|
|
|
|
newfee = newfee - fee*zhios_order_relate_utils.StrToFloat64(commArr["taxRevenueRate"]) |
|
|
} |
|
|
} |
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["operatingExpenseRate"]) > 0 { |
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["operatingExpenseRate"]) > 0 { |
|
|
newfee = newfee - newfee*zhios_order_relate_utils.StrToFloat64(commArr["operatingExpenseRate"]) |
|
|
|
|
|
} |
|
|
|
|
|
if zhios_order_relate_utils.StrToFloat64(commArr["distributableCoefficientRate"]) > 0 { |
|
|
|
|
|
newfee = newfee - newfee*zhios_order_relate_utils.StrToFloat64(commArr["distributableCoefficientRate"]) |
|
|
|
|
|
|
|
|
newfee = newfee - fee*zhios_order_relate_utils.StrToFloat64(commArr["operatingExpenseRate"]) |
|
|
} |
|
|
} |
|
|
return newfee |
|
|
return newfee |
|
|
} |
|
|
} |
|
|