|
|
@@ -3,7 +3,9 @@ namespace app\adminapi\lists\master_worker;
|
|
|
|
|
|
use app\adminapi\lists\BaseAdminDataLists;
|
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
+use app\common\model\master_worker\MasterWorker;
|
|
|
use think\facade\Db;
|
|
|
+use think\facade\Log;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -39,6 +41,27 @@ class MasterWorkerServiceOrderLists extends BaseAdminDataLists implements ListsS
|
|
|
if (isset($this->params['recruiting_behalf']) && !empty($this->params['recruiting_behalf'])) {
|
|
|
$where[] = ['a.recruiting_behalf','like' ,"%".$this->params['recruiting_behalf']."%"];
|
|
|
}
|
|
|
+ if (isset($this->params['is_recruiting_behalf']) && !empty($this->params['is_recruiting_behalf'])) {
|
|
|
+ if ($this->params['is_recruiting_behalf'] == 1)
|
|
|
+ $where[] = ['a.recruiting_behalf','<>' ,""];
|
|
|
+ else
|
|
|
+ $where[] = ['a.recruiting_behalf','=' ,""];
|
|
|
+ }
|
|
|
+ if(isset($this->params['category_ids']) && !empty($this->params['category_ids'])){
|
|
|
+ $sqls = [];
|
|
|
+ $category_ids =[];
|
|
|
+ foreach ($this->params['category_ids'] as $val){
|
|
|
+ ($val = json_decode($val,true))?($category_ids[] = end($val)):($category_ids[] = $val);
|
|
|
+ }
|
|
|
+ foreach ($category_ids as $item) {
|
|
|
+ $sqls[] = "FIND_IN_SET({$item}, category_ids) > 0";
|
|
|
+ }
|
|
|
+ $query_sql = implode(' OR ', $sqls);
|
|
|
+ Log::write('query_sql:'.$query_sql);
|
|
|
+
|
|
|
+ $period_ids = MasterWorker::where('category_ids','<>', '')->whereRaw($query_sql)->column('id');
|
|
|
+ $where[] = [ 'a.id','IN',$period_ids?:[0]];
|
|
|
+ }
|
|
|
if (isset($this->params['mobile']) && !empty($this->params['mobile'])) {
|
|
|
$where[] = ['a.mobile','=' ,$this->params['mobile']];
|
|
|
}
|