This commit is contained in:
wangjinlei
2024-08-12 15:51:30 +08:00
parent 0987a2ecbd
commit ff0942a615

View File

@@ -259,7 +259,13 @@ class Article extends Controller {
$data = $this->request->post();
$article_info = $this->article_obj->where('article_id', $data['article_id'])->find();
$res_key = [];
$res_rel = $this->article_obj->where("article_id", "in", object_to_array(json_decode($article_info['related'])))->where('state', 0)->select();
$res_rel = $this->article_obj
->field("j_article.*")
->join("j_journal_stage","j_journal_stage.journal_stage_id = j_article.journal_stage_id","left")
->where("j_article.article_id", "in", object_to_array(json_decode($article_info['related'])))
->where("j_journal_stage.stage_year",">",date("Y")-2)
->where('j_article.state', 0)
->select();
if ($article_info['keywords'] != '' && count($res_rel) < 5) {
$keywords = explode(',', $article_info['keywords']);
$where = '';