diff --git a/rule/egg_energy/auto_release_green_energy.go b/rule/egg_energy/auto_release_green_energy.go index 68974a8..4082240 100644 --- a/rule/egg_energy/auto_release_green_energy.go +++ b/rule/egg_energy/auto_release_green_energy.go @@ -21,8 +21,8 @@ const LockKey = "auto_release_exchange_team_egg_energy_lock_key" func AutoReleaseExchangeTeamEggEnergy(engine *xorm.Engine) (err error) { now := time.Now() fmt.Println(now.Hour()) - if !(now.Hour() > 1 && now.Hour() < 8) { - //TODO::只在凌晨一点 ~ 凌晨 8 点运行 + if !(now.Hour() > 2 && now.Hour() < 8) { + //TODO::只在凌晨2点 ~ 凌晨 8 点运行 return errors.New("非运行时间") } //TODO::增加“悲观锁”防止串行 diff --git a/rule/egg_energy/star_level_dividends.go b/rule/egg_energy/star_level_dividends.go index aa73562..f9bc03c 100644 --- a/rule/egg_energy/star_level_dividends.go +++ b/rule/egg_energy/star_level_dividends.go @@ -24,8 +24,8 @@ const SettlementStarLevelDividendsLockKey = "settlement_star_level_dividends_loc func SettlementStarLevelDividends(engine *xorm.Engine, ch *rabbit.Channel) (err error) { now := time.Now() fmt.Println(now.Hour()) - if !(now.Hour() > 2 && now.Hour() < 8) { - //TODO::只在凌晨一点 ~ 凌晨 8 点运行 + if !(now.Hour() > 1 && now.Hour() < 8) { + //TODO::只在凌晨1点 ~ 凌晨 8 点运行 return errors.New("非运行时间") } //TODO::增加“悲观锁”防止串行 @@ -147,7 +147,7 @@ func SettlementStarLevelDividends(engine *xorm.Engine, ch *rabbit.Channel) (err userSignInArr = append(userSignInArr, l.Uid) if len(userSignInArr) >= 10000 { var users []*model.User - err = session.In("uid", userSignInArr).Find(&users) + err = session.In("id", userSignInArr).Find(&users) if err != nil { fmt.Println("err:::::7777777", err) return err