From e9e65d538e7b70b019a9764ad3d30866130d72f3 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Wed, 16 Jul 2025 11:41:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E7=94=A8=E8=87=AA=E5=8A=A8=E9=87=87?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Article.php | 4 ++-- application/api/controller/Main.php | 2 +- application/common.php | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/api/controller/Article.php b/application/api/controller/Article.php index fceec27..a832c42 100644 --- a/application/api/controller/Article.php +++ b/application/api/controller/Article.php @@ -168,7 +168,7 @@ class Article extends Controller { // $stack = []; // } -// grabCiteFromCrossref($data['article_id']); + grabCiteFromCrossref($data['article_id']); $re["track"] = $stack; return jsonSuccess($re); @@ -178,7 +178,7 @@ class Article extends Controller { public function mmmm(){ - grabCiteFromCrossref(3243); + grabCiteFromCrossref(3244); } diff --git a/application/api/controller/Main.php b/application/api/controller/Main.php index 27bcee3..6d8027e 100644 --- a/application/api/controller/Main.php +++ b/application/api/controller/Main.php @@ -142,7 +142,7 @@ class Main extends Controller { $list_tmr = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',1)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); $list_zh = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',2)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); $list_life = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',8)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); - $list_fyw = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',19)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); + $list_fyw = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',25)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); $list_ywlh = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',11)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); $list_zy = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title,j_journal.jabbr journal_short,j_journal.usx usx')->join(array(['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT'],['j_journal','j_article.journal_id = j_journal.journal_id','LEFT']))->where('j_article.journal_id',17)->where('j_journal_stage.is_publish',1)->where('j_article.state',0)->order('j_article.article_id desc')->limit(1)->select(); $list = $list_tmr; diff --git a/application/common.php b/application/common.php index 45af960..e68aa9f 100644 --- a/application/common.php +++ b/application/common.php @@ -118,6 +118,7 @@ function grabCiteFromCrossref($article_id,$act="zd"){ if($act=="zd"&&$cite_days<7){ return ; } + try { $rr = pCrossrefCite($article_id); foreach ($rr as $v){ $c = $article_cite_obj->where("doi",$v['doi'])->find(); @@ -134,7 +135,9 @@ function grabCiteFromCrossref($article_id,$act="zd"){ $article_cite_obj->insert($articleEntity); } $article_obj->where("article_id",$article_id)->update(['cite_time'=>time()]); - + }catch (\think\Exception $e){ + echo $e->getMessage(); + } } function formateVol($v){