|
|
@@ -18,6 +18,7 @@ use app\api\lists\BaseApiDataLists;
|
|
|
use app\common\enum\YesNoEnum;
|
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
use app\common\model\article\Article;
|
|
|
+use app\common\model\asset\AssetArea;
|
|
|
use app\common\model\article\ArticleCollect;
|
|
|
use app\common\model\agricultural_machinery\UserService;
|
|
|
|
|
|
@@ -61,8 +62,12 @@ class ServiceLists extends BaseApiDataLists implements ListsSearchInterface
|
|
|
}
|
|
|
|
|
|
if (!empty($this->params['area_id'])) {
|
|
|
-
|
|
|
- $where[] = ['area_id', 'like', '%' . ',' .$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];
|
|
|
}
|
|
|
|
|
|
return $where;
|