|
|
@@ -17,7 +17,8 @@ const LockKey = "auto_release_exchange_green_energy_lock_key" |
|
|
|
// AutoReleaseExchangeGreenEnergy 结算绿色能量自动释放成可用绿色能量 |
|
|
|
func AutoReleaseExchangeGreenEnergy(engine *xorm.Engine, masterId string) (err error) { |
|
|
|
now := time.Now() |
|
|
|
if now.Hour() > 1 && now.Hour() < 8 { |
|
|
|
fmt.Println(now.Hour()) |
|
|
|
if !(now.Hour() > 1 && now.Hour() < 8) { |
|
|
|
//TODO::只在凌晨一点 ~ 凌晨 8 点运行 |
|
|
|
return errors.New("非运行时间") |
|
|
|
} |
|
|
|