This commit is contained in:
苏尹岚
2019-12-18 15:19:22 +08:00
parent 12a1a23ac1
commit 990f3a2da2
6 changed files with 14 additions and 13 deletions

View File

@@ -328,7 +328,7 @@ func FloatWeight2Int(weight float32) int {
}
func ComposeSkuName(prefix, name, comment, unit string, spec_quality float32, spec_unit string, maxLen int, exPrefix string, exPrefixBegin, exPrefixEnd time.Time) (skuName string) {
if exPrefix != "" && exPrefixBegin != utils.ZeroTimeValue && exPrefixEnd != utils.ZeroTimeValue {
if exPrefix != "" && !utils.IsTimeZero(exPrefixBegin) && !utils.IsTimeZero(exPrefixEnd) {
if time.Now().Before(exPrefixEnd) && time.Now().After(exPrefixBegin) {
skuName = exPrefix
}