Browse Source

fix:最后修改

super-yimizi 1 month ago
parent
commit
e0aca39e8e

+ 2 - 2
application/api/controller/inspection/Order.php

@@ -133,7 +133,7 @@ class Order extends Base
           $expressName = trim($params['express_name'] ?? '');
           $expressName = trim($params['express_name'] ?? '');
           $expressNo = trim($params['express_no'] ?? '');
           $expressNo = trim($params['express_no'] ?? '');
           $expressImage = $params['express_image'] ?? [];
           $expressImage = $params['express_image'] ?? [];
-          
+          // 事务处理
           // 1. 更新订单商品发货状态
           // 1. 更新订单商品发货状态
           $result = OrderService::updateOrderGoodsDeliveryStatus($orderGoodsId, $expressName, $expressNo, $expressImage);
           $result = OrderService::updateOrderGoodsDeliveryStatus($orderGoodsId, $expressName, $expressNo, $expressImage);
           if (!$result) {
           if (!$result) {
@@ -141,7 +141,7 @@ class Order extends Base
           }
           }
           
           
           // 2. 检查并更新订单状态
           // 2. 检查并更新订单状态
-          OrderService::updateOrderStatusByDeliveryResult($orderId, $userId);
+          OrderService::updateOrderStatusByDeliveryResult($orderId);
           
           
           // 3. 记录操作日志
           // 3. 记录操作日志
           $orderActionService = new OrderActionService();
           $orderActionService = new OrderActionService();

+ 3 - 3
application/common/Service/OrderService.php

@@ -630,9 +630,9 @@ class OrderService
             throw new BusinessException('订单不存在!');
             throw new BusinessException('订单不存在!');
         }
         }
         // 验证状态
         // 验证状态
-        if (!OrderEnum::isValidOrderStatus($status)) {
-            throw new BusinessException('状态不合法!');
-        }
+        // if (!OrderEnum::isValidOrderStatus($status)) {
+        //     throw new BusinessException('状态不合法!');
+        // }
         //  要处理每个状态对应的时间字段在枚举类中
         //  要处理每个状态对应的时间字段在枚举类中
         $timeField = OrderEnum::STATUS_TIME_MAP[$status];
         $timeField = OrderEnum::STATUS_TIME_MAP[$status];
         $updateData = [
         $updateData = [

+ 3 - 3
application/common/service/OrderService.php

@@ -630,9 +630,9 @@ class OrderService
             throw new BusinessException('订单不存在!');
             throw new BusinessException('订单不存在!');
         }
         }
         // 验证状态
         // 验证状态
-        if (!OrderEnum::isValidOrderStatus($status)) {
-            throw new BusinessException('状态不合法!');
-        }
+        // if (!OrderEnum::isValidOrderStatus($status)) {
+        //     throw new BusinessException('状态不合法!');
+        // }
         //  要处理每个状态对应的时间字段在枚举类中
         //  要处理每个状态对应的时间字段在枚举类中
         $timeField = OrderEnum::STATUS_TIME_MAP[$status];
         $timeField = OrderEnum::STATUS_TIME_MAP[$status];
         $updateData = [
         $updateData = [