puzhibing
2024-12-26 fd2823afc771def7f9ea1f09d9c38ea8086aa395
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -230,9 +230,6 @@
        if (!check){
            throw new ServiceException("订单不存在");
        }
        order.setOrderStatus(OrderStatus.COMPLETED.getCode());
        orderMapper.updateById(order);
        Integer orderType = order.getOrderType();
        // 售后设置
        R<BaseSetting> baseSettingR = baseSettingClient.getBaseSetting(5);
@@ -246,9 +243,11 @@
        String content = baseSetting.getContent();
        JSONObject jsonObject = JSONObject.parseObject(content);
        Long days = jsonObject.getLong("days");
        if (days != null && days > 0){
            commissionService.addToCommissionDelayQueue(order.getId(), LocalDateTime.now().plusDays(days));
        }
        order.setOrderStatus(OrderStatus.COMPLETED.getCode());
        order.setIsCommission(0);
        order.setAfterSaleTime(LocalDateTime.now().plusDays(days));
        order.setEndTime(LocalDateTime.now());
        orderMapper.updateById(order);
    }