发送邮件任务

This commit is contained in:
chengxl
2025-06-06 10:11:12 +08:00
parent f4880d1846
commit b0835c7ad1

View File

@@ -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]);
}
}
?>