From d03013efe0a255f2669b222dfeadace323d7f5d1 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Mon, 24 Mar 2025 08:33:47 +0800 Subject: [PATCH] 111 --- .../com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java | 6 ++++-- .../com/ruoyi/ss/order/service/impl/OrderServiceImpl.java | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/share-space-system/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java b/share-space-system/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java index db84725..02cbc77 100644 --- a/share-space-system/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java +++ b/share-space-system/src/main/java/com/ruoyi/ss/device/service/impl/DeviceServiceImpl.java @@ -1033,8 +1033,10 @@ public class DeviceServiceImpl implements DeviceService // 房间门单独打开 EquipmentVO roomDoor = equipmentService.selectDoorByRoomId(roomId, FACILITY_TYPE_ROOM_DOOR); - boolean b = controlDoor(roomDoor.getDeviceId(), roomDoor.getUnlockTime(), roomDoor.getUnlockMode(),true, reason,false); - log.info("【下单成功后房间全开】打开房间门{}", b ? "成功" : "失败"); + if(roomDoor != null){ + boolean b = controlDoor(roomDoor.getDeviceId(), roomDoor.getUnlockTime(), roomDoor.getUnlockMode(),true, reason,false); + log.info("【下单成功后房间全开】打开房间门{}", b ? "成功" : "失败"); + } return 1; } diff --git a/share-space-system/src/main/java/com/ruoyi/ss/order/service/impl/OrderServiceImpl.java b/share-space-system/src/main/java/com/ruoyi/ss/order/service/impl/OrderServiceImpl.java index a089d44..fa0c29e 100644 --- a/share-space-system/src/main/java/com/ruoyi/ss/order/service/impl/OrderServiceImpl.java +++ b/share-space-system/src/main/java/com/ruoyi/ss/order/service/impl/OrderServiceImpl.java @@ -1504,7 +1504,9 @@ public class OrderServiceImpl implements IOrderService adminIndexDataVO.setStoreCount(storeCount); // 订单金额 - BigDecimal orderAmount = orderMapper.getOrderFee(new OrderQuery()); + OrderQuery orderQuery = new OrderQuery(); + orderQuery.setPaid(ServiceConstants.ORDER_PAY_STATUS_PAID); + BigDecimal orderAmount = orderMapper.getOrderFee(orderQuery); adminIndexDataVO.setOrderAmount(orderAmount); // 订单数