浏览代码

update

master
DengBiao 9 个月前
父节点
当前提交
619b898322
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. +6
    -6
      rule/one_circles/one_circles_activity_coin_auto_exchange_green_energy.go

+ 6
- 6
rule/one_circles/one_circles_activity_coin_auto_exchange_green_energy.go 查看文件

@@ -75,9 +75,9 @@ func ActivityCoinAutoExchangeGreenEnergy(engine *xorm.Engine, masterId string) (
session := engine.NewSession()

//4、处理"个人活跃积分"兑换
autoExchangeNumsByPersonValue := decimal.NewFromFloat(autoExchangeNumsByPerson)
autoExchangeNumsByPersonAmount := autoExchangeNumsByPersonValue.Div(personActivePointsCoinExchangeRatioValue).String()
for _, v := range list1 {
autoExchangeNumsByPersonValue, _ := decimal.NewFromString(v.Amount)
autoExchangeNumsByPersonAmount := autoExchangeNumsByPersonValue.Div(personActivePointsCoinExchangeRatioValue).String()
//4.1计算涨价公式
err1, values, _, afterPriceValue := NewCalcPriceIncreaseFormula(autoExchangeNumsByPersonAmount, oneCirclesGreenEnergyBasicSetting)
if err1 != nil {
@@ -106,7 +106,7 @@ func ActivityCoinAutoExchangeGreenEnergy(engine *xorm.Engine, masterId string) (
OrdId: "",
CoinId: oneCirclesPublicPlatoonBasicSetting.PersonActivePointsCoinId,
Uid: v.Uid,
Amount: autoExchangeNumsByPerson,
Amount: zhios_order_relate_utils.StrToFloat64(v.Amount),
})
if err != nil {
_ = session.Rollback()
@@ -124,9 +124,9 @@ func ActivityCoinAutoExchangeGreenEnergy(engine *xorm.Engine, masterId string) (
}

//5、处理"团队活跃积分"兑换
autoExchangeNumsByTeamValue := decimal.NewFromFloat(autoExchangeNumsByTeam)
autoExchangeNumsByTeamAmount := autoExchangeNumsByTeamValue.Div(teamActivePointsCoinExchangeRatioValue).String()
for _, v := range list2 {
autoExchangeNumsByTeamValue, _ := decimal.NewFromString(v.Amount)
autoExchangeNumsByTeamAmount := autoExchangeNumsByTeamValue.Div(teamActivePointsCoinExchangeRatioValue).String()
//5.1计算涨价公式
err1, values, _, afterPriceValue := NewCalcPriceIncreaseFormula(autoExchangeNumsByTeamAmount, oneCirclesGreenEnergyBasicSetting)
if err1 != nil {
@@ -155,7 +155,7 @@ func ActivityCoinAutoExchangeGreenEnergy(engine *xorm.Engine, masterId string) (
OrdId: "",
CoinId: oneCirclesPublicPlatoonBasicSetting.TeamActivePointsCoinId,
Uid: v.Uid,
Amount: autoExchangeNumsByTeam,
Amount: zhios_order_relate_utils.StrToFloat64(v.Amount),
})
if err != nil {
_ = session.Rollback()


正在加载...
取消
保存