|
|
@@ -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) //变更后-星球价值 |
|
|
|