Explorar el Código

update

master
dengbiao hace 1 semana
padre
commit
7d0f83ee12
Se han modificado 4 ficheros con 7 adiciones y 1 borrados
  1. +1
    -1
      go.mod
  2. +2
    -0
      go.sum
  3. +2
    -0
      rule/egg_energy/activity_coin_auto_exchange_egg_energy.go
  4. +2
    -0
      rule/egg_energy/activity_coin_ready_exchange_egg_energy.go

+ 1
- 1
go.mod Ver fichero

@@ -42,7 +42,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241206115326-8cbc93c7c64d
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210121211-81406596ad48
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/json-iterator/go v1.1.12 // indirect


+ 2
- 0
go.sum Ver fichero

@@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241206115326-8cbc93c7c64d h1:9XUmoFAlU46M4psHog/SbZepbSQe+I9VCiRquaqw97A=
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241206115326-8cbc93c7c64d/go.mod h1:+bDK4gfBq4LEkhh6K/A46+0urH/sgxDxnjIjlxb9HI8=
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210121211-81406596ad48 h1:cEcOp21RER1MGwWXUhzObJUek8QDrypKqRR+y3chE1A=
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210121211-81406596ad48/go.mod h1:+bDK4gfBq4LEkhh6K/A46+0urH/sgxDxnjIjlxb9HI8=
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be h1:zuleX5JnIGQpt6wDAmCFs++lLgOmE6kWo3xkJnjrSck=
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be/go.mod h1:Yuc7XnUQ15eaC0ZobcJG7XwkVTttVqp52OTanXhI1Qk=
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 h1:dqvWJqlJi0WXCwTxbWPLvSOsKPjP+iEDBVgLcAl9nOE=


+ 2
- 0
rule/egg_energy/activity_coin_auto_exchange_egg_energy.go Ver fichero

@@ -9,6 +9,7 @@ import (
egg_system_rules "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils"
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils/logx"
"code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit"
"errors"
"fmt"
"github.com/shopspring/decimal"
"math/rand"
@@ -23,6 +24,7 @@ func ActivityCoinAutoExchangeEggPersonEnergy(engine *xorm.Engine, req md.EggEner
endTimeValue, _ := egg_system_rules.StringToTime(req.EndExchangeTime)
if endTimeValue.After(now) {
time.Sleep(time.Microsecond * time.Duration(rand.Intn(5))) //TODO::随机休眠5s不等
return errors.New("未到可执行时间~~~")
}

//2、查询sign 记录


+ 2
- 0
rule/egg_energy/activity_coin_ready_exchange_egg_energy.go Ver fichero

@@ -113,6 +113,8 @@ func ActivityCoinReadyExchangeEggEnergy(engine *xorm.Engine, uid int64, ch *rabb
TotalPersonEggPointsAmountValue: autoExchangeNumsByPersonAmount.String(),
TotalTeamEggPointsAmountValue: autoExchangeNumsByTeamAmount.String(),
IsCompleted: 0,
CreateAt: now.Format("2006-01-02 15:04:05"),
UpdateAt: now.Format("2006-01-02 15:04:05"),
}
_, err = eggSignInDb.EggSignInInsert(sign)
if err != nil {


Cargando…
Cancelar
Guardar