- GetStoresSkusSaleInfo

This commit is contained in:
gazebo
2018-11-29 13:14:02 +08:00
parent a2a85b091b
commit d9d10c1755
4 changed files with 169 additions and 0 deletions

View File

@@ -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)
}