diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/util/CheckUtil.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/util/CheckUtil.java index 0b56a9b3e..dd7cb3f5f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/util/CheckUtil.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/util/CheckUtil.java @@ -101,7 +101,7 @@ public class CheckUtil { if (StringUtils.isEmpty(paymentTypes)) { // 活动没有支付方式限制 return true; - }else if (StringUtils.isEmpty(paymentType)){ + } else if (StringUtils.isEmpty(paymentType)) { //当前会员的 支付方式 为空 return false; } @@ -196,7 +196,11 @@ public class CheckUtil { //周几汉字转数字 timeSlotsStr = changeWeekNumber(timeSlots); } - List timeSlotStrList = Arrays.asList(timeSlotsStr.split(StrUtil.COMMA)); +// 拆分字符串 并过滤掉 "" 的 + List timeSlotStrList = Arrays.stream(timeSlotsStr.split(StrUtil.COMMA)) + .filter(str -> !str.isEmpty()) // 过滤掉空字符串 + .collect(Collectors.toList()); + //转换为int类型 List timeSlotList = timeSlotStrList.stream().map(Integer::parseInt).collect(Collectors.toList()); if (timeSlotStrList.isEmpty() && (StringUtils.isNotEmpty(startTime) || StringUtils.isNotEmpty(endTime))) {