|
@@ -153,6 +153,32 @@ public class RoomRealtimeStatuServiceImpl extends ServiceImpl<RoomRealtimeStatuD
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void userHoldOrder(Long orderId) {
|
|
|
|
|
+ RoomRealtimeStatuEntity realtimeStatuEntity = findByBizId(orderId);
|
|
|
|
|
+ if (realtimeStatuEntity == null) {
|
|
|
|
|
+ throw new RRException(BizCodeEnume.UNKNOW_EXCEPTION, "房源锁定异常");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ realtimeStatuEntity.setStatu("3");
|
|
|
|
|
+ this.updateById(realtimeStatuEntity);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void userReturnOrder(Long orderId) {
|
|
|
|
|
+ RoomRealtimeStatuEntity roomRealtimeStatuEntity = findByBizId(orderId);
|
|
|
|
|
+ if (roomRealtimeStatuEntity == null) return;
|
|
|
|
|
+ roomRealtimeStatuEntity.setStatu("4");
|
|
|
|
|
+ this.updateById(roomRealtimeStatuEntity);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private RoomRealtimeStatuEntity findByBizId(Long bizId) {
|
|
|
|
|
+ QueryWrapper<RoomRealtimeStatuEntity> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper.eq("biz_id", bizId);
|
|
|
|
|
+ queryWrapper.last("limit 1");
|
|
|
|
|
+ return this.getOne(queryWrapper);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 随机根据房型选房
|
|
* 随机根据房型选房
|
|
|
* @param lockRoomDTO 锁房参数
|
|
* @param lockRoomDTO 锁房参数
|