From cc4f134fde1f82cfa2590c7ff3d716fb6ed61305 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 23 Jan 2024 12:38:12 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=B8=80=E4=B8=AA=E5=9C=88=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one_circles_available_green_energy_settlement.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rule/one_circles/one_circles_available_green_energy_settlement.go b/rule/one_circles/one_circles_available_green_energy_settlement.go index 813ace3..f2d80b9 100644 --- a/rule/one_circles/one_circles_available_green_energy_settlement.go +++ b/rule/one_circles/one_circles_available_green_energy_settlement.go @@ -65,11 +65,11 @@ func CalcPriceReductionFormula(engine *xorm.Engine, userExchangeNumsValue string afterPrice := originalQuantityFunds.Div(userExchangeNums.Add(originalQuantityNums)) //降价后的价格 greenEnergyValues := userExchangeNums.Mul(afterPrice) //绿色能量个数 - greenEnergyFeeValues := greenEnergyValues.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //绿色能量个数扣除手续费 + greenEnergyFeeValues := greenEnergyValues.Mul(exchangeAccountBalanceFee.Div(decimalRate)) //绿色能量个数扣除手续费价值 - values = greenEnergyValues.Sub(greenEnergyFeeValues).Truncate(8).String() //扣除用户绿色能量个数 - greenEnergy = greenEnergyValues.Truncate(8).String() - greenEnergyFee = greenEnergyFeeValues.Truncate(8).String() + values = greenEnergyValues.Sub(greenEnergyFeeValues).Truncate(8).String() //用户实际得到的钱 + greenEnergy = greenEnergyValues.Truncate(8).String() //原本兑换到的钱 + greenEnergyFee = userExchangeNums.Mul(exchangeAccountBalanceFee.Div(decimalRate)).Truncate(8).String() //绿色能量手续费 nowPriceValue = nowPrice.String() afterPriceValue = afterPrice.String() return