Selaa lähdekoodia

feat(order): 添加商品状态参数支持

- 在订单退款原因列表接口中新增 goods_status 参数
- 服务层传递 goods_status 参数到业务参数中
- 更新参数验证和处理逻辑以支持货物状态过滤
shichen 2 kuukautta sitten
vanhempi
commit
68b5f309d2

+ 4 - 0
app/controller/api/store/order/AlibabaOrder.php

@@ -68,6 +68,7 @@ class AlibabaOrder
68 68
     {
69 69
         $orderId = request()->param('order_id');
70 70
         $orderEntryIds = request()->param('order_entry_ids', '');
71
+        $goodsStatus = request()->param('goods_status', '');
71 72
 
72 73
         if (empty($orderId)) {
73 74
             return app('json')->fail('订单号不能为空');
@@ -78,6 +79,9 @@ class AlibabaOrder
78 79
         if (!empty($orderEntryIds)) {
79 80
             $params['orderEntryIds'] = $orderEntryIds;
80 81
         }
82
+        if (!empty($goodsStatus)) {
83
+            $params['goodsStatus'] = $goodsStatus;
84
+        }
81 85
 
82 86
         $result = $orderService->getRefundReasonList($params);
83 87
         if ($result === false) {

+ 6 - 1
app/services/ThirdParty/AlibabaAgent/OrderService.php

@@ -552,11 +552,16 @@ class OrderService extends AlibabaAgentBaseService
552 552
             'orderId' => (string)$params['orderId'],
553 553
         ];
554 554
 
555
-        // 可选参数:子订单号
555
+        // 子订单号
556 556
         if (!empty($params['orderEntryIds'])) {
557 557
             $businessParams['orderEntryIds'] = (string)$params['orderEntryIds'];
558 558
         }
559 559
 
560
+        // 货物状态
561
+        if (!empty($params['goodsStatus'])) {
562
+            $businessParams['goodsStatus'] = (string)$params['goodsStatus'];
563
+        }
564
+
560 565
         // --- 调用API ---
561 566
         $result = $this->executeParam2(
562 567
             self::NAMESPACE,