Commit f5bbfc54 by 吕明尚

订单开始和结束时间改为取分钟

parent 13e2fc10
...@@ -1684,11 +1684,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1684,11 +1684,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
// } // }
//更改订单状态,房间状态,开始时间,结束时间 //更改订单状态,房间状态,开始时间,结束时间
sOrder.setStatus(OrderStatusEnum.INUSE.getCode()); sOrder.setStatus(OrderStatusEnum.INUSE.getCode());
sOrder.setStartDate(new Date()); sOrder.setStartDate(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())));
//计算预约开始和结束时间时长 //计算预约开始和结束时间时长
BigDecimal bigDecimal = DateUtils.differentHour(sOrder.getPreStartDate(), sOrder.getPreEndDate()); BigDecimal bigDecimal = DateUtils.differentHour(sOrder.getPreStartDate(), sOrder.getPreEndDate());
//结束时间为开始时间+预约时长 //结束时间为开始时间+预约时长
sOrder.setEndDate(DateUtils.addHours(new Date(), bigDecimal.intValue())); sOrder.setEndDate(DateUtils.addHours(DateUtils.parseDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM, new Date())), bigDecimal.intValue()));
if (!ObjectUtils.isEmpty(sOrder.getPackId())) { if (!ObjectUtils.isEmpty(sOrder.getPackId())) {
SPack byId = packService.getById(sOrder.getPackId()); SPack byId = packService.getById(sOrder.getPackId());
if (!ObjectUtils.isEmpty(byId) && byId.getIsFixedEndTime().equals(YesNoEnum.yes.getIndex())) { if (!ObjectUtils.isEmpty(byId) && byId.getIsFixedEndTime().equals(YesNoEnum.yes.getIndex())) {
......
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