作者 郭静帆
1 个管道 的构建 通过 耗费 10 秒

本月额外收入

... ... @@ -8,6 +8,7 @@ use app\api\model\Job;
use app\api\model\JobCollect;
use app\api\model\JobKeyword;
use app\common\model\Inform;
use app\common\model\Label;
use app\common\model\User;
use fast\Tree;
use app\common\controller\Wechat;
... ... @@ -187,6 +188,17 @@ class Index extends Api
}
}
$where .= "job_name like '%{$keyword}%'";
$wherela = "title like '%{$keyword}%'";
$ids = Label::where($wherela)->field('id')->column('id'); //标签所有id
if(!empty($ids)){
// 标签搜索
$label_findinset = [];
foreach ($ids as $label_id){
$label_findinset[] = "find_in_set({$label_id},label_ids)";
}
$label_where = implode(' or ',$label_findinset);
$where = "($where or ($label_where))";
}
}
$where .= $where ? ' and ' : '';
$where .= "putdata = '0'";
... ...