huangjiajun vor 5 Monaten
Ursprung
Commit
6b5f9b8ace
2 geänderte Dateien mit 12 neuen und 12 gelöschten Zeilen
  1. +6
    -6
      rule/regional_agent.go
  2. +6
    -6
      rule/regional_sub_agent.go

+ 6
- 6
rule/regional_agent.go Datei anzeigen

@@ -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 Datei anzeigen

@@ -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


Laden…
Abbrechen
Speichern