This commit is contained in:
wangjinlei
2024-09-24 10:46:45 +08:00
parent 4f44b5d839
commit 1e13b9c21b
2 changed files with 9 additions and 2 deletions

View File

@@ -576,7 +576,14 @@ class Journal extends Controller {
->order($order)
->select();
$stage_info = $this->journal_stage_obj->where('journal_stage_id', $journal_info['publish_stage_id'])->find();
return json(['code' => 0, 'msg' => 'success', 'data' => ['stage' => $stage_info, 'articleList' => strongArticleList($list)]]);
$list = strongArticleList($list);
foreach ($list as $k => $v){
$cache_topic = $this->article_to_topic_obj->field('j_journal_topic.*')->join('j_journal_topic', 'j_journal_topic.journal_topic_id = j_article_to_topic.topic_id', 'left')->where('j_article_to_topic.article_id', $v['article_id'])->where('j_article_to_topic.state', 0)->select();
$list[$k]['topic'] = $cache_topic;
}
return json(['code' => 0, 'msg' => 'success', 'data' => ['stage' => $stage_info, 'articleList' => $list]]);
}
private function getAuthor($article) {