Browse Source

update 一个圈圈

master
DengBiao 11 months ago
parent
commit
cc4f134fde
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      rule/one_circles/one_circles_available_green_energy_settlement.go

+ 4
- 4
rule/one_circles/one_circles_available_green_energy_settlement.go View File

@@ -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


Loading…
Cancel
Save