openTimeMtwm2JX中防止越界
This commit is contained in:
@@ -121,7 +121,9 @@ func openTimeMtwm2JX(vendorOpenTime string) (opTimeList []int16) {
|
||||
timePairs := strings.Split(vendorOpenTime, ",")
|
||||
for _, v := range timePairs {
|
||||
times := strings.Split(v, "-")
|
||||
opTimeList = append(opTimeList, jxutils.StrTime2JxOperationTime(times[0]+":00", 700), jxutils.StrTime2JxOperationTime(times[1]+":00", 2000))
|
||||
if len(times) >= 2 {
|
||||
opTimeList = append(opTimeList, jxutils.StrTime2JxOperationTime(times[0]+":00", 700), jxutils.StrTime2JxOperationTime(times[1]+":00", 2000))
|
||||
}
|
||||
}
|
||||
return opTimeList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user