Browse Source

update

master
DengBiao 11 months ago
parent
commit
619b898322
1 changed files with 6 additions and 6 deletions
  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 View File

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


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


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


Loading…
Cancel
Save