1
This commit is contained in:
parent
18f724d177
commit
8696af8903
@ -196,7 +196,11 @@ public class CheckUtil {
|
||||
//周几汉字转数字
|
||||
timeSlotsStr = changeWeekNumber(timeSlots);
|
||||
}
|
||||
List<String> timeSlotStrList = Arrays.asList(timeSlotsStr.split(StrUtil.COMMA));
|
||||
// 拆分字符串 并过滤掉 "" 的
|
||||
List<String> timeSlotStrList = Arrays.stream(timeSlotsStr.split(StrUtil.COMMA))
|
||||
.filter(str -> !str.isEmpty()) // 过滤掉空字符串
|
||||
.collect(Collectors.toList());
|
||||
|
||||
//转换为int类型
|
||||
List<Integer> timeSlotList = timeSlotStrList.stream().map(Integer::parseInt).collect(Collectors.toList());
|
||||
if (timeSlotStrList.isEmpty() && (StringUtils.isNotEmpty(startTime) || StringUtils.isNotEmpty(endTime))) {
|
||||
|
Loading…
Reference in New Issue
Block a user