DengBiao vor 9 Monaten
Ursprung
Commit
619b898322
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  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 Datei anzeigen

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


Laden…
Abbrechen
Speichern