@@ -42,7 +42,7 @@ require ( | |||||
) | ) | ||||
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/goccy/go-json v0.10.2 // indirect | ||||
github.com/golang/snappy v0.0.4 // indirect | github.com/golang/snappy v0.0.4 // indirect | ||||
github.com/json-iterator/go v1.1.12 // indirect | github.com/json-iterator/go v1.1.12 // indirect | ||||
@@ -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= | 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 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.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 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_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= | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 h1:dqvWJqlJi0WXCwTxbWPLvSOsKPjP+iEDBVgLcAl9nOE= | ||||
@@ -9,6 +9,7 @@ import ( | |||||
egg_system_rules "code.fnuoos.com/EggPlanet/egg_system_rules.git/utils" | 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" | 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" | "code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" | ||||
"errors" | |||||
"fmt" | "fmt" | ||||
"github.com/shopspring/decimal" | "github.com/shopspring/decimal" | ||||
"math/rand" | "math/rand" | ||||
@@ -23,6 +24,7 @@ func ActivityCoinAutoExchangeEggPersonEnergy(engine *xorm.Engine, req md.EggEner | |||||
endTimeValue, _ := egg_system_rules.StringToTime(req.EndExchangeTime) | endTimeValue, _ := egg_system_rules.StringToTime(req.EndExchangeTime) | ||||
if endTimeValue.After(now) { | if endTimeValue.After(now) { | ||||
time.Sleep(time.Microsecond * time.Duration(rand.Intn(5))) //TODO::随机休眠5s不等 | time.Sleep(time.Microsecond * time.Duration(rand.Intn(5))) //TODO::随机休眠5s不等 | ||||
return errors.New("未到可执行时间~~~") | |||||
} | } | ||||
//2、查询sign 记录 | //2、查询sign 记录 | ||||
@@ -113,6 +113,8 @@ func ActivityCoinReadyExchangeEggEnergy(engine *xorm.Engine, uid int64, ch *rabb | |||||
TotalPersonEggPointsAmountValue: autoExchangeNumsByPersonAmount.String(), | TotalPersonEggPointsAmountValue: autoExchangeNumsByPersonAmount.String(), | ||||
TotalTeamEggPointsAmountValue: autoExchangeNumsByTeamAmount.String(), | TotalTeamEggPointsAmountValue: autoExchangeNumsByTeamAmount.String(), | ||||
IsCompleted: 0, | IsCompleted: 0, | ||||
CreateAt: now.Format("2006-01-02 15:04:05"), | |||||
UpdateAt: now.Format("2006-01-02 15:04:05"), | |||||
} | } | ||||
_, err = eggSignInDb.EggSignInInsert(sign) | _, err = eggSignInDb.EggSignInInsert(sign) | ||||
if err != nil { | if err != nil { | ||||