Commit a1a111fd by 周晓航

拦截数字转化异常

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 4288f721
......@@ -340,13 +340,13 @@ public class CheckOrder {
if (Objects.isNull(businessInfoDto)) {
businessInfoDto = this.queryBusinessInfoNew(createOrderVo);
}
try {
Date date = new Date(Long.parseLong(takeMealTimes));
this.checkAdvanceOrderExpectTime(businessInfoDto,storeResponseDto,date);
createOrderVo.setExpectTime(DateUtil.convert2String(date, "yyyy-MM-dd HH:mm:ss"));
}catch (Exception e){
// 传递过来的时间格式为 : 2021-08-17 17:38
Date date = DateUtil.convert2Date(takeMealTimes, "yyyy-MM-dd HH:mm");
if (Objects.isNull(date)) {
throw new ServiceException(ResponseResult.ORDER_CREATE_TAKEMEALTIME_ERROR);
}
this.checkAdvanceOrderExpectTime(businessInfoDto, storeResponseDto, date);
createOrderVo.setExpectTime(DateUtil.convert2String(date, "yyyy-MM-dd HH:mm:ss"));
}
}
}
......
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