Commit 650733de by 吕明尚

换房的旧订单增加备注

parent aaf0ecfe
...@@ -645,11 +645,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -645,11 +645,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
redisUtil.delete(oldSOrder.getOrderNo()); redisUtil.delete(oldSOrder.getOrderNo());
} }
oldSOrder.setIsDelete(YesNoEnum.yes.getIndex()); oldSOrder.setIsDelete(YesNoEnum.yes.getIndex());
oldSOrder.setRemark("订单:" + cj + "由原来的" + list.stream().filter(item -> item.getId().equals(oldSOrder.getRoomId())).findFirst().orElse(null).getName()
+ "换到" + list.stream().filter(item -> item.getId().equals(dto.getRoomId())).findFirst().orElse(null).getName() + "房间");
oldSOrder.setCreateTime(new Date());
newOrder.setHistoricalOrderNo(oldSOrder.getOrderNo()); newOrder.setHistoricalOrderNo(oldSOrder.getOrderNo());
newOrder.setOrderNo(cj); newOrder.setOrderNo(cj);
newOrder.setRoomId(dto.getRoomId()); newOrder.setRoomId(dto.getRoomId());
save(newOrder); save(newOrder);
return removeById(oldSOrder); return updateSOrder(oldSOrder) > 0;
} }
@Override @Override
......
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