Commit 3beeb81f by 吕明尚

换房极端情况下的订单状态判断

parent cb39dd2d
......@@ -577,6 +577,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override
public Boolean changeRoom(SOrderDto dto) {
SOrder sOrder = getById(dto.getId());
//订单状态不等于待使用或者使用中都报错
if (!sOrder.getStatus().equals(OrderStatusEnum.UNUSED.getCode()) && !sOrder.getStatus().equals(OrderStatusEnum.INUSE.getCode())) {
throw new BaseException("订单异常,不能换房");
}
SOrder oldSOrder = new SOrder();
LambdaQueryWrapper<SRoom> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SRoom::getStoreId, sOrder.getStoreId());
......
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