shish 4 лет назад
Родитель
Сommit
08fac0d336
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      app-ghs/controllers/RefundController.php

+ 4 - 2
app-ghs/controllers/RefundController.php

@@ -64,8 +64,7 @@ class RefundController extends BaseController
             if ($refundType != RefundOrderClass::REFUND_TYPE_MONEY_GOOD && $refundType != RefundOrderClass::REFUND_TYPE_MONEY) {
                 util::fail("请选择退款类型");
             }
-            //仅退款花材直接设置为空
-            $post['product'] = '';
+
             if ($refundType == RefundOrderClass::REFUND_TYPE_MONEY_GOOD) {
                 $infoProduct = $order['product'];
                 $productIds = array_unique(array_filter(array_column($infoProduct, 'productId')));
@@ -108,6 +107,9 @@ class RefundController extends BaseController
                     }
                 }
                 $post['product'] = $productList;
+            } else {
+                //仅退款花材直接设置为空
+                $post['product'] = '';
             }
             $post['price'] = $post['price'] ?? 0;
             if ($post['price'] <= 0) {