From a910e697f3571c2f58cc7b929bc8aa3f4fb78724 Mon Sep 17 00:00:00 2001 From: louwenzhi Date: Mon, 31 May 2021 12:28:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archive/archive.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archive/archive.go b/archive/archive.go index 0d13f12..b62a779 100644 --- a/archive/archive.go +++ b/archive/archive.go @@ -77,7 +77,7 @@ func CustProduct(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1013,7 +1013,7 @@ func ArchiveJit_shiporder(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1347,7 +1347,7 @@ func ArchiveJit_packorder(conf *config.EnvConfig) { timeStart, _ := time.ParseInLocation(timeLayout, stime, loc) timeEnd, _ := time.ParseInLocation(timeLayout, etime, loc) now := time.Now() - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { time.Sleep(60 * time.Second) continue } @@ -1501,11 +1501,11 @@ func DelPrinterInfo(conf *config.EnvConfig) { now := time.Now() fmt.Println(timeStart) fmt.Println(timeEnd) - if now.After(timeStart) && now.Before(timeEnd) { + if now.After(timeEnd) || now.Before(timeStart) { + fmt.Println("不在处理时间内!") time.Sleep(60 * time.Second) continue } - var ( err error oneWeek time.Time