dengbiao 2 dni temu
rodzic
commit
953e3394de
1 zmienionych plików z 2 dodań i 2 usunięć
  1. +2
    -2
      rule/egg_energy/available_green_energy_settlement.go

+ 2
- 2
rule/egg_energy/available_green_energy_settlement.go Wyświetl plik

@@ -68,9 +68,9 @@ func CalcPriceReductionFormula(userExchangeNumsValue string, eggEnergyCoreData *


greenEnergyValues := userExchangeNums.Mul(afterPrice) //能量价值 greenEnergyValues := userExchangeNums.Mul(afterPrice) //能量价值
greenEnergyFeeValues := greenEnergyValues.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //能量个数扣除手续费价值 greenEnergyFeeValues := greenEnergyValues.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //能量个数扣除手续费价值
resp.GetEggEnergyAmount = greenEnergyValues.Sub(greenEnergyFeeValues).Truncate(8).String() //用户实际得到的钱
resp.GetEggEnergyAmount = greenEnergyValues.Sub(greenEnergyFeeValues).Truncate(2).String() //用户实际得到的钱
amountFee := userExchangeNums.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //能量手续费 amountFee := userExchangeNums.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //能量手续费
resp.AmountFee = amountFee.String()
resp.AmountFee = amountFee.Truncate(8).String()


afterEnergyTotalNumsValue := nowEnergyTotalNums.Sub(userExchangeNums.Sub(amountFee)) //变更后-现行数量 afterEnergyTotalNumsValue := nowEnergyTotalNums.Sub(userExchangeNums.Sub(amountFee)) //变更后-现行数量
afterPlanetTotalValue := afterEnergyTotalNumsValue.Mul(afterPrice) //变更后-星球价值 afterPlanetTotalValue := afterEnergyTotalNumsValue.Mul(afterPrice) //变更后-星球价值


Ładowanie…
Anuluj
Zapisz