This commit is contained in:
wangjinlei
2022-01-09 08:57:19 +08:00
parent 49f170a778
commit cff82c6c25
7 changed files with 224 additions and 5 deletions

View File

@@ -390,7 +390,7 @@ class Journal extends Controller {
$data = $this->request->post();
$list = [];
if($data['journal_topic_id'] == 0){
$journals = $this->journal_obj->where('state',0)->select();
$journals = $this->journal_obj->where('state',0)->order("sort desc")->select();
foreach ($journals as $k => $v){
$topic_info = $this->journal_topic_obj->where('journal_id',$v['journal_id'])->where('title','Topics')->where('state',0)->find();
$cache = $this->journal_topic_obj->where('parent_id',$topic_info['journal_topic_id'])->where('state',0)->limit(5)->select();
@@ -406,6 +406,7 @@ class Journal extends Controller {
->where('j_journal_topic.parent_id','in',$tpids)
->where('j_journal_topic.title',$topic_info['title'])
->where('j_journal_topic.state',0)
->order("j_journal.sort desc")
->select();
$list = $journals;
}
@@ -443,7 +444,7 @@ class Journal extends Controller {
}
$ids = $this->article_to_topic_obj->where('topic_id','in',$topicids)->where('state',0)->column('article_id');
$list = $this->article_obj
->field('j_article.*,j_journal_stage.*,j_journal.title journal_title')
->field('j_article.*,j_journal_stage.*,j_journal.jabbr,j_journal.usx,j_journal.title journal_title')
->join('j_journal','j_article.journal_id = j_journal.journal_id','left')
->join('j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','left')
->where('j_article.article_id','in',$ids)