Ver a proveniência

更新

master
huangjiajun há 7 meses
ascendente
cometimento
6b5f9b8ace
2 ficheiros alterados com 12 adições e 12 eliminações
  1. +6
    -6
      rule/regional_agent.go
  2. +6
    -6
      rule/regional_sub_agent.go

+ 6
- 6
rule/regional_agent.go Ver ficheiro

@@ -301,17 +301,17 @@ func CommAmount(CommissionRate float64, amount float64, agentUser *[]model.Regio
} else {
temp["divide_amount"] = everyPersonDivideAmount
var coinSetDetailMap []map[string]interface{}
for _, v := range coinSetDetail {
for _, v1 := range coinSetDetail {
var exchangeRatio float64
if zhios_order_relate_utils.AnyToFloat64(virtualCoin[v.CoinID]) != 0 {
exchangeRatio = zhios_order_relate_utils.AnyToFloat64(virtualCoin[v.CoinID])
if zhios_order_relate_utils.AnyToFloat64(virtualCoin[v1.CoinID]) != 0 {
exchangeRatio = zhios_order_relate_utils.AnyToFloat64(virtualCoin[v1.CoinID])
} else {
exchangeRatio = 0
}
coinSetDetailMap = append(coinSetDetailMap, map[string]interface{}{
"coin_id": v.CoinID,
"coin_name": v.CoinName,
"divide_value": zhios_order_relate_utils.AnyToFloat64(temp["divide_amount"]) * (zhios_order_relate_utils.AnyToFloat64(v.Value) / 100) * exchangeRatio,
"coin_id": v1.CoinID,
"coin_name": v1.CoinName,
"divide_value": zhios_order_relate_utils.AnyToFloat64(temp["divide_amount"]) * (zhios_order_relate_utils.AnyToFloat64(v1.Value) / 100) * exchangeRatio,
})
}
temp["divide_virtual_currency"] = coinSetDetailMap


+ 6
- 6
rule/regional_sub_agent.go Ver ficheiro

@@ -265,17 +265,17 @@ func SubCommAmount(parentUid int, CommissionRate float64, amount float64, agentU
} else {
temp["divide_amount"] = everyPersonDivideAmount
var coinSetDetailMap []map[string]interface{}
for _, v := range coinSetDetail {
for _, v1 := range coinSetDetail {
var exchangeRatio float64
if zhios_order_relate_utils.AnyToFloat64(virtualCoin[v.CoinID]) != 0 {
exchangeRatio = zhios_order_relate_utils.AnyToFloat64(virtualCoin[v.CoinID])
if zhios_order_relate_utils.AnyToFloat64(virtualCoin[v1.CoinID]) != 0 {
exchangeRatio = zhios_order_relate_utils.AnyToFloat64(virtualCoin[v1.CoinID])
} else {
exchangeRatio = 0
}
coinSetDetailMap = append(coinSetDetailMap, map[string]interface{}{
"coin_id": v.CoinID,
"coin_name": v.CoinName,
"divide_value": zhios_order_relate_utils.AnyToFloat64(temp["divide_amount"]) * (zhios_order_relate_utils.AnyToFloat64(v.Value) / 100) * exchangeRatio,
"coin_id": v1.CoinID,
"coin_name": v1.CoinName,
"divide_value": zhios_order_relate_utils.AnyToFloat64(temp["divide_amount"]) * (zhios_order_relate_utils.AnyToFloat64(v1.Value) / 100) * exchangeRatio,
})
}
temp["divide_virtual_currency"] = coinSetDetailMap


Carregando…
Cancelar
Guardar