Commit 3c1ae2c3 by ping.wu

下单门店隔天营业时间判断修改

parent ac91ec33
...@@ -165,9 +165,16 @@ public class CheckOrder { ...@@ -165,9 +165,16 @@ public class CheckOrder {
} catch (ParseException e) { } catch (ParseException e) {
throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR); throw new ServiceException(ResponseResult.STORE_BUSINESS_HOUR_ERROR);
} }
//隔天营业时间处理 //隔天营业时间处理 营业时间 8:00-2:00
// 当前时间 3-19号 08:01 则整体营业时间为3-19号 8:00 到 3-20号 2:00
// 当前时间 3-20号 00:01 则整体营业时间为3-19号 8:00 到 3-20号 2:00
// 当前时间 3-20号 02:01 则营业时间为3-20号 8:00 到 3-21号 2:00
if(startDateTime.after(endDateTime)){ if(startDateTime.after(endDateTime)){
endDateTime = DateUtil.addDays(endDateTime,1); if(endDateTime.after(date)){
startDateTime = DateUtil.addDays(startDateTime,-1);
}else {
endDateTime = DateUtil.addDays(endDateTime,1);
}
} }
storeResponseDto.setBusinessHoursDayStartTime(startDateTime); storeResponseDto.setBusinessHoursDayStartTime(startDateTime);
storeResponseDto.setBusinessHoursDayEndTime(endDateTime); storeResponseDto.setBusinessHoursDayEndTime(endDateTime);
......
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