组合名字函数修改
This commit is contained in:
@@ -327,9 +327,14 @@ func FloatWeight2Int(weight float32) int {
|
||||
return int(math.Round(float64(weight * 1000)))
|
||||
}
|
||||
|
||||
func ComposeSkuName(prefix, name, comment, unit string, spec_quality float32, spec_unit string, maxLen int) (skuName string) {
|
||||
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 time.Now().Before(exPrefixEnd) && time.Now().After(exPrefixBegin) {
|
||||
skuName = exPrefix
|
||||
}
|
||||
}
|
||||
if prefix != "" {
|
||||
skuName = "[" + prefix + "]"
|
||||
skuName += "[" + prefix + "]"
|
||||
}
|
||||
skuName += name
|
||||
if unit == "份" {
|
||||
|
||||
Reference in New Issue
Block a user