From dd11eaddbe1f2282f60bf557fa5ad7aeff69a0ce Mon Sep 17 00:00:00 2001 From: heshupeng <hsp@bronet.cn> Date: Wed, 25 Nov 2020 17:24:45 +0800 Subject: [PATCH] bug修改 --- application/api/controller/Index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/api/controller/Index.php b/application/api/controller/Index.php index e6f37d6..80d7a6c 100644 --- a/application/api/controller/Index.php +++ b/application/api/controller/Index.php @@ -311,8 +311,9 @@ class Index extends Api // 未设置哪些人及其下级可查看,默认所有人可以查看 $where .= " or j.user_ids = ''"; } + $collect = JobCollect::where('user_id',$this->auth->id)->limit(1)->buildSql(); $data = Job::alias('j') - ->join('job_collect jc','jc.job_id = j.id and jc.user_id = '.$this->auth->id) + ->join([$collect=>'jc'],'jc.job_id = j.id') ->where($where) ->field('j.*') ->order(['jc.createtime'=>'desc','createtime'=>'desc']) -- libgit2 0.24.0