1
0
liugc 1 жил өмнө
parent
commit
c1f28ee49c

+ 8 - 1
app/adminapi/lists/goods/GoodsLists.php

@@ -42,7 +42,7 @@ class GoodsLists extends BaseAdminDataLists implements ListsSearchInterface
     public function setSearch(): array
     {
         return [
-            '=' => ['goods_status','is_agent','is_activity','goods_payment_type','platform_value'],
+            '=' => ['goods_status','is_agent','is_activity','platform_value'],
             '%like%' => ['goods_name','goods_brand'],
             'between' => ['service_total', 'service_fee'],
         ];
@@ -81,6 +81,13 @@ class GoodsLists extends BaseAdminDataLists implements ListsSearchInterface
         if (isset($this->params['platforms']) && !empty($this->params['platforms'])) {
             $where[] = [ 'platform_value','>',0];
         }
+        if (isset($this->params['goods_payment_type']) && !empty($this->params['goods_payment_type'])) {
+            if(is_array($this->params['goods_payment_type'])){
+                $where[] = [ 'goods_payment_type','IN',$this->params['goods_payment_type']];
+            }else{
+                $where[] = [ 'goods_payment_type','=' ,$this->params['goods_payment_type']];
+            }
+        }
         return $where;
     }