diff --git a/go.mod b/go.mod index 5cd2dc0..aff451d 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 83e778b..b63fe1a 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/rule/egg_energy/activity_coin_auto_exchange_egg_energy.go b/rule/egg_energy/activity_coin_auto_exchange_egg_energy.go index dc3a940..8133871 100644 --- a/rule/egg_energy/activity_coin_auto_exchange_egg_energy.go +++ b/rule/egg_energy/activity_coin_auto_exchange_egg_energy.go @@ -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 记录 diff --git a/rule/egg_energy/activity_coin_ready_exchange_egg_energy.go b/rule/egg_energy/activity_coin_ready_exchange_egg_energy.go index d04bde3..083f78c 100644 --- a/rule/egg_energy/activity_coin_ready_exchange_egg_energy.go +++ b/rule/egg_energy/activity_coin_ready_exchange_egg_energy.go @@ -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 {