Browse Source

update

master
dengbiao 2 days ago
parent
commit
953e3394de
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      rule/egg_energy/available_green_energy_settlement.go

+ 2
- 2
rule/egg_energy/available_green_energy_settlement.go View File

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

greenEnergyValues := userExchangeNums.Mul(afterPrice) //能量价值
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)) //能量手续费
resp.AmountFee = amountFee.String()
resp.AmountFee = amountFee.Truncate(8).String()

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


Loading…
Cancel
Save