From b998a8938d69918467d39386b10a7fc31e168637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 25 Dec 2019 11:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/jxutils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index 1ee21e3ef..b666a5ea3 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -360,10 +360,10 @@ func ComposeSkuName(prefix, name, comment, unit string, spec_quality float32, sp func ComposeSkuNameSync(prefix, name, comment, unit string, spec_quality float32, spec_unit string, maxLen int, exPrefix string, exPrefixBegin, exPrefixEnd *time.Time) (skuName string) { if exPrefix != "" && exPrefixBegin != nil && exPrefixEnd != nil { - if utils.Time2Date(time.Now().Add(6*time.Hour)).Sub(*exPrefixBegin) >= 0 && utils.Time2Date(time.Now()).Sub(*exPrefixEnd) < 0 { + if utils.Time2Date(time.Now().Add(6*time.Hour)).Sub(*exPrefixBegin) >= 0 && utils.Time2Date(time.Now()).Sub(*exPrefixEnd) <= 0 { skuName = exPrefix } - if utils.Time2Date(time.Now().Add(6*time.Hour)).Sub(*exPrefixEnd) >= 0 { + if utils.Time2Date(time.Now().Add(6*time.Hour)).Sub(*exPrefixEnd) > 0 { skuName = "" } }