moonsflyer 8 meses atrás
pai
commit
782ed7463b
1 arquivos alterados com 6 adições e 5 exclusões
  1. 6 5
      app/api/lists/service/ServiceLists.php

+ 6 - 5
app/api/lists/service/ServiceLists.php

@@ -63,11 +63,12 @@ class ServiceLists extends BaseApiDataLists implements ListsSearchInterface
 
         if (!empty($this->params['area_id'])) {
             $cwhere=[];
-            $cwhere[]=['pid','=',$this->params['area_id']];
-            $cate_list = AssetArea::where($cwhere)->select()->toArray();
-            $cate_ids = array_column($cate_list,'id');
-            $cate_ids = array_push($cate_ids,$this->params['area_id']);
-            $where[] = ['area_id', 'in', $cate_ids];
+//            $cwhere[]=['pid','=',$this->params['area_id']];
+//            $cate_list = AssetArea::where($cwhere)->select()->toArray();
+//            $cate_ids = array_column($cate_list,'id');
+//            $cate_ids = array_push($cate_ids,$this->params['area_id']);
+//            $where[] = ['area_id', 'in', $cate_ids];
+            $where[] = ['area_id', 'like', '%' . ',' .$this->params['area_id'].',' . '%'];
         }
 
         return $where;