Commit 4a73009f by ping.wu

判断错误修改

parent e919ca1a
......@@ -285,7 +285,7 @@ public class CheckOrder {
takeMealDateTime = new Date(takeAwayTime);
// createOrderVo.setTakeMealTime(DateUtil.convert2Str(takeMealDateTime, "HH:mm"));
}
if (takeMealDateTime != null && (takeMealDateTime.before(deliveryStartDate) || takeMealDateTime.after(deliveryStartDate))) {
if (takeMealDateTime != null && (takeMealDateTime.before(deliveryStartDate) || takeMealDateTime.after(deliveryEndDate))) {
throw new ServiceException(ResponseResult.ORDER_CREATE_TIME_NOT_DELIVERY);
}
storeDeliveryInfoDto.setEnableTakeaway(true);
......@@ -295,6 +295,8 @@ public class CheckOrder {
//重新赋值为yyyy-MM-dd HH:mm:ss格式字符串时间
if(takeMealDateTime != null){
createOrderVo.setTakeMealTime(DateUtil.convert2String(takeMealDateTime, "yyyy-MM-dd HH:mm:ss"));
}else {
createOrderVo.setTakeMealTime(null);
}
//非到店或者外卖,类型错误
if (!(CreateOrderType.COLLECT_GOODS.getCode().equals(createOrderVo.getOrderType()) ||
......
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