Commit 5ee7da9e by 周晓航

修改获取门店校验对象的vo

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 241bf605
...@@ -427,12 +427,12 @@ public class CheckOrder { ...@@ -427,12 +427,12 @@ public class CheckOrder {
} }
// fisherman 预计 营业时间范围校验 begin // fisherman 预计 营业时间范围校验 begin
List<String> nextDayBusinessTime = storeCenterService.getNextDayBusinessTime(Integer.parseInt(storeResponseDto.getBusinessType()), storeResponseDto.getBusinessHours()); List<String> nextDayBusinessTime = storeCenterService.getNextDayBusinessTime(Integer.parseInt(storeResponseDto.getBusinessType()), storeResponseDto.getBusinessHours());
AssortOrderLogUtil.info("fisherman 校验门店时间数据 02",JSON.toJSONString(nextDayBusinessTime));
if (CollectionUtils.isEmpty(nextDayBusinessTime)) { if (CollectionUtils.isEmpty(nextDayBusinessTime)) {
throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR); throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR);
} }
for (String bussinessTime : nextDayBusinessTime) { for (String bussinessTime : nextDayBusinessTime) {
BusinessDate bussinessTime2 = this.getStoreBusinessDate(bussinessTime, true); BusinessDate bussinessTime2 = this.getStoreBusinessDate(bussinessTime, true);
AssortOrderLogUtil.info("fisherman 校验门店时间数据 02",JSON.toJSONString(bussinessTime2));
// 取餐时间在营业时间前面, 或者在营业结束时间后面 // 取餐时间在营业时间前面, 或者在营业结束时间后面
boolean isTrue = takeMealDateTime.before(bussinessTime2.getStartDate()) || takeMealDateTime.after(bussinessTime2.getEndDate()); boolean isTrue = takeMealDateTime.before(bussinessTime2.getStartDate()) || takeMealDateTime.after(bussinessTime2.getEndDate());
if (isTrue) { if (isTrue) {
...@@ -443,7 +443,6 @@ public class CheckOrder { ...@@ -443,7 +443,6 @@ public class CheckOrder {
// 营业结束前校验 结束时间前十分钟可以下单 begin // 营业结束前校验 结束时间前十分钟可以下单 begin
List<String> todayBusinessTimes = storeCenterService.getTodayBusinessTime(Integer.parseInt(storeResponseDto.getBusinessType()), storeResponseDto.getBusinessHoursDay()); List<String> todayBusinessTimes = storeCenterService.getTodayBusinessTime(Integer.parseInt(storeResponseDto.getBusinessType()), storeResponseDto.getBusinessHoursDay());
AssortOrderLogUtil.info("fisherman 校验门店时间数据 03",JSON.toJSONString(todayBusinessTimes));
if (CollectionUtils.isEmpty(todayBusinessTimes)) { if (CollectionUtils.isEmpty(todayBusinessTimes)) {
throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR); throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR);
} }
...@@ -452,6 +451,7 @@ public class CheckOrder { ...@@ -452,6 +451,7 @@ public class CheckOrder {
for (String todayTime : todayBusinessTimes) { for (String todayTime : todayBusinessTimes) {
//每段营业时间校验 //每段营业时间校验
BusinessDate businessDate2 = this.getStoreBusinessDate(todayTime, true); BusinessDate businessDate2 = this.getStoreBusinessDate(todayTime, true);
AssortOrderLogUtil.info("fisherman 校验门店时间数据 03",JSON.toJSONString(businessDate2));
if (createOrder.after(businessDate2.getEndDate())) { if (createOrder.after(businessDate2.getEndDate())) {
throw new ServiceException(ResponseResult.ORDER_TAKEMEALTIME_INVAILD); throw new ServiceException(ResponseResult.ORDER_TAKEMEALTIME_INVAILD);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment