diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/service/impl/AllocStallServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/service/impl/AllocStallServiceImpl.java index fde8d44e..779ad6ef 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/service/impl/AllocStallServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/allocation/canteen/service/impl/AllocStallServiceImpl.java @@ -62,8 +62,19 @@ public class AllocStallServiceImpl extends ServiceImpl listReserveDate(AllocMobileCanteenQueryDTO queryDTO) { AllocCanteenOrderDTO allocCanteenOrderDTO = this.allocOrderMetadataApi.queryAvailableOrder(queryDTO.getCanteenId(), queryDTO.getStallId()); - String ifReserveSkipHoliday = allocCanteenOrderDTO.getIfReserveSkipHoliday(); - Integer reserveLimitDayNum = Integer.parseInt(allocCanteenOrderDTO.getReserveLimitDay()); + String ifReserveSkipHoliday="1"; + if(allocCanteenOrderDTO.getIfReserveSkipHoliday()!=null&&!"".equals(allocCanteenOrderDTO.getIfReserveSkipHoliday())){ + ifReserveSkipHoliday= allocCanteenOrderDTO.getIfReserveSkipHoliday(); + } + Integer reserveLimitDayNum = 0; + try{ + reserveLimitDayNum=Integer.parseInt(allocCanteenOrderDTO.getReserveLimitDay()); + }catch (Exception e){ + reserveLimitDayNum=7; + } + if(allocCanteenOrderDTO.getIfAllowReserveToday()==null||"".equals(allocCanteenOrderDTO.getIfAllowReserveToday())){ + allocCanteenOrderDTO.setIfAllowReserveToday("1"); + } return this.listMatchData(ifReserveSkipHoliday, reserveLimitDayNum, allocCanteenOrderDTO.getIfAllowReserveToday()); }