From 953e3394de41f9f84a847781ed6a84373a7f0560 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 23 Dec 2024 18:29:33 +0800 Subject: [PATCH] update --- rule/egg_energy/available_green_energy_settlement.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rule/egg_energy/available_green_energy_settlement.go b/rule/egg_energy/available_green_energy_settlement.go index 1c3be6e..4bbe4c5 100644 --- a/rule/egg_energy/available_green_energy_settlement.go +++ b/rule/egg_energy/available_green_energy_settlement.go @@ -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) //变更后-星球价值