This commit is contained in:
王金磊
2023-04-07 16:46:21 +08:00
parent 7b473ffa5c
commit 996c082863
3 changed files with 12 additions and 7 deletions

View File

@@ -206,9 +206,12 @@ class Journal extends Controller {
return jsonError($rule->getError());
}
$noinjfa = $this->journal_for_author_yc_obj->where('journal_id',$data['journal_id'])->column('jfa_id');
$journals[]=0;
if($data['journal_id']!=22){
$journals[]=0;//0代表公共的项目
}
$journals[]=$data['journal_id'];
$list = $this->journal_for_author->where('journal_id','in',$journals)->where('pid',0)->where('jfa_state',0)->order("sort desc")->select();
// $list = $this->journal_for_author->where('journal_id','in',$journals)->where('pid',0)->where('jfa_state',0)->order("sort desc")->select();
$list = $this->journal_for_author->where('pid',0)->where('jfa_state',0)->order("sort desc")->select();
foreach($list as $k => $v){
$cache_list = $this->journal_for_author->where('journal_id','in',$journals)->where('jfa_id',"not in",$noinjfa)->where('pid',$v['jfa_id'])->where('jfa_state',0)->order("sort desc")->select();
$list[$k]['children'] = $cache_list;