huliguo
2025-07-31 7b1772169b274e87fe441923f0dbf5e25ee30a72
pt-errand/src/main/java/com/ruoyi/errand/service/impl/OrderServiceImpl.java
@@ -267,6 +267,7 @@
        message.put("orderId", order.getId());
        message.put("orderTime", order.getOrderTime());
        deliveryWebSocket.sendNotification(deliveryPersonId.toString(), message.toJSONString());
        deliveryWebSocket.sendWaitOrderNum(deliveryPersonId.toString());
    }
    @Override
@@ -353,11 +354,16 @@
        if (order==null
                ||order.getDelFlag().equals(DelFlagConstant.DELETE)
                ||!Objects.equals(order.getAppUserId(), appuser.getId())){
            throw new ServiceException("订单id错误");
            throw new ServiceException("该订单不存在");
        }
        if (order.getOrderStatus()!=1 && order.getOrderStatus()!=2){
            throw new ServiceException("订单状态错误");
        if (order.getOrderStatus()==3){
            throw new ServiceException("订单已被取消");
        }else if (order.getOrderStatus()==4){
            throw new ServiceException("订单已完成,不可修改");
        }else if (order.getOrderStatus()==5){
            throw new ServiceException("订单已完成,不可修改");
        }
        //判断地址簿id是否存在
        if (setConfirmOrderDTO.getAddressBookId()!=null){
            AddressBook addressBook = addressBookMapper.selectById(setConfirmOrderDTO.getAddressBookId());