Parcourir la source

红包 退款

shish il y a 4 ans
Parent
commit
08fac0d336
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  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) {