瀏覽代碼

update 一个圈圈

master
DengBiao 11 月之前
父節點
當前提交
cc4f134fde
共有 1 個檔案被更改,包括 4 行新增4 行删除
  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 查看文件

@@ -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…
取消
儲存