- GetStoresSkusSaleInfo
This commit is contained in:
@@ -362,3 +362,21 @@ func IsLegalMobileNumber(num int64) bool {
|
||||
func TrimDecorationChar(value string) string {
|
||||
return strings.Trim(value, " \t\n[]()【】()-_——")
|
||||
}
|
||||
|
||||
func BatchStr2Time(strTime ...string) (timeList []time.Time, err error) {
|
||||
timeList = make([]time.Time, len(strTime))
|
||||
for k, v := range strTime {
|
||||
if v == "" {
|
||||
timeList[k] = utils.DefaultTimeValue
|
||||
} else {
|
||||
if timeList[k], err = utils.TryStr2Time(v); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
return timeList, nil
|
||||
}
|
||||
|
||||
func IsTimeEmpty(timeValue time.Time) bool {
|
||||
return (timeValue == utils.DefaultTimeValue || timeValue == utils.ZeroTimeValue)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user