|
|
@@ -24,6 +24,7 @@ import com.chuanghai.ihotel.dto.LockRoomDTO;
|
|
|
import com.chuanghai.ihotel.entity.HotelOrderBillEntity;
|
|
|
import com.chuanghai.ihotel.entity.HotelOrderEntity;
|
|
|
import com.chuanghai.ihotel.entity.HotelUserEntity;
|
|
|
+import com.chuanghai.ihotel.entity.RoomDoorLockDataEntity;
|
|
|
import com.chuanghai.ihotel.entity.RoomEntity;
|
|
|
import com.chuanghai.ihotel.entity.RoomTypeEntity;
|
|
|
import com.chuanghai.ihotel.entity.SystemSettingEntity;
|
|
|
@@ -80,6 +81,8 @@ public class HotelOrderServiceImpl extends ServiceImpl<HotelOrderDao, HotelOrder
|
|
|
@Autowired
|
|
|
private RoomDoorLockDataService doorLockService;
|
|
|
@Autowired
|
|
|
+ private RoomDoorLockDataService roomDoorLockDataService;
|
|
|
+ @Autowired
|
|
|
private PayComponent payComponent;
|
|
|
@Autowired
|
|
|
private JXNXSPayConfig jxnxsPayConfig;
|
|
|
@@ -398,7 +401,8 @@ public class HotelOrderServiceImpl extends ServiceImpl<HotelOrderDao, HotelOrder
|
|
|
detailVO.setRoomTypeDiscountPrice(roomType.getDiscountPrice());
|
|
|
|
|
|
// 订单状态为已入住之后,查询水电等相关信息
|
|
|
- if (Integer.valueOf(orderEntity.getOrderStatu()).intValue() >= Integer.valueOf(OrderStatuEnum.HOLD_ON.getCode()).intValue()) {
|
|
|
+ String orderStatu = orderEntity.getOrderStatu();
|
|
|
+ if (Integer.valueOf(orderStatu).intValue() >= Integer.valueOf(OrderStatuEnum.HOLD_ON.getCode()).intValue()) {
|
|
|
HotelOrderBillEntity orderBill = orderBillService.findByOrderId(orderId);
|
|
|
if (orderBill == null) {
|
|
|
throw new RRException(BizCodeEnume.UNKNOW_EXCEPTION, "用户订单详情-订单状态错误");
|
|
|
@@ -406,6 +410,17 @@ public class HotelOrderServiceImpl extends ServiceImpl<HotelOrderDao, HotelOrder
|
|
|
BeanUtils.copyProperties(orderBill, detailVO);
|
|
|
}
|
|
|
|
|
|
+ // 订单状态为已入住,查询密码锁等相关信息
|
|
|
+ if (OrderStatuEnum.HOLD_ON.getCode().equals(orderStatu)) {
|
|
|
+ RoomDoorLockDataEntity lockData = roomDoorLockDataService.queryByOrderId(orderId);
|
|
|
+ if (lockData == null) {
|
|
|
+ throw new RRException(BizCodeEnume.UNKNOW_EXCEPTION, "用户订单详情-锁密码获取失败");
|
|
|
+ }
|
|
|
+ detailVO.setLockRealtimePassword(lockData.getLockRealtimePassword());
|
|
|
+ detailVO.setPasswordStartTime(lockData.getStartTime());
|
|
|
+ detailVO.setPasswordEndTime(lockData.getEndTime());
|
|
|
+ }
|
|
|
+
|
|
|
return detailVO;
|
|
|
}
|
|
|
|