From b0835c7ad1cd14b90d371dfaca5f4df59eba5955 Mon Sep 17 00:00:00 2001 From: chengxl Date: Fri, 6 Jun 2025 10:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/JournalArticle.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/application/common/JournalArticle.php b/application/common/JournalArticle.php index 9f4d49f..ec17403 100644 --- a/application/common/JournalArticle.php +++ b/application/common/JournalArticle.php @@ -7,7 +7,7 @@ class JournalArticle { //官网接口地址 - protected static $sApiUrl = 'http://zmzm.journal.dev.com/'; + protected static $sApiUrl = 'http://journalapi.tmrjournals.com/public/index.php/';//'http://zmzm.journal.dev.com/'; //期刊官网 protected static $sJournalUsx = 'https://www.tmrjournals.com/'; @@ -215,5 +215,29 @@ class JournalArticle return $result; } + /** + * 查询邮件日志是否发送 + * + * @return void + */ + static function getLog($aParam = []) { + + //查询条件判断 + if(empty($aParam['article_id']) || empty($aParam['article_author_id']) || empty($aParam['related_article_id'])){ + return json_encode(['status' => 2,'msg' => 'Missing parameter']); + } + + //数据处理 + $aField = self::$aField; + $aWhere = []; + foreach ($aField as $key => $value) { + if(!empty($aParam[$value])){ + $aWhere[$value] = is_array($aParam[$value]) ? ['in',$aParam[$value]] : $aParam[$value]; + } + } + $aResult = DB::name('email_related_article')->field('article_id,related_article_id,article_author_id,is_success,create_time')->where($aWhere)->find(); + return json_encode(['status' => 1,'msg' => 'success','data' => $aResult]); + } + } ?> \ No newline at end of file