From a078f6e7530a67d75e17ed1ad0d8d0f01c5d681e Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Tue, 8 Nov 2022 18:23:25 +0800 Subject: [PATCH] 1 --- application/master/controller/Journal.php | 44 +++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/application/master/controller/Journal.php b/application/master/controller/Journal.php index d5c0fc8..f9baad9 100644 --- a/application/master/controller/Journal.php +++ b/application/master/controller/Journal.php @@ -867,6 +867,50 @@ class Journal extends Controller return jsonSuccess([]); } + + public function pushEmailToUser(){ + // die('stop'); + $data = $this->request->post(); + $rule = new Validate([ + 'num'=>'require' + ]); + if(!$rule->check($data)){ + return jsonError($rule->getError()); + } + $url = "http://api.tmrjournals.com/public/index.php/api/user/getUserForJournal"; + $pag = []; + $pag['num'] = $data['num']; + $res = object_to_array(json_decode(myPost($url, $pag))); + $tt = 'Greetings!
Thank you for your attention to TMR Publishing Group and your active participation.

'; + $tt .= "According to Clarivate's latest policy (https://clarivate.com/news/clarivate-announces-changes-to-the-2023-journal-citation-reports/), Traditional Medicine Research (ISSN 2413-3973) will get the first Impact Factor in 2023. You are welcome to pay attention to the journal and submit manuscripts. You are always welcome to read and share the articles and encourage you to submit your manuscripts to us through the following channels: www.tmrjournals.com/tmr


"; + + $articles = $this->article_obj + ->field('j_article.*,j_journal_stage.stage_year,j_journal_stage.stage_vol,j_journal_stage.stage_no') + ->join('j_journal_stage', 'j_journal_stage.journal_stage_id = j_article.journal_stage_id', 'left') + ->where('j_journal_stage.stage_year', '>=', '2021') + ->where('j_article.journal_id', 1) + ->where('j_article.state', 0) + ->orderRaw("(j_article.abs_num+j_article.pdf_num) desc") + ->limit(10) + ->select(); + + foreach ($articles as $v) { + $tt .= "" . $v['title'] . "
"; + $tt .= "Traditional Medicine Research. " . $v['stage_year'] . " " . $v['stage_vol'] . "(" . $v['stage_no'] . ")
"; + $tt .= "Download pdf


"; + } + + + foreach($res['data']['list'] as $v){ + $maidata['email'] = $v['email']; + $maidata['title'] = "TOP10 popular papers|Traditional Medicine Research (2021-2022)"; + $maidata['content'] = $tt; + Queue::push('app\api\job\mail@propa', $maidata, "mail"); + } + return jsonSuccess([]); + + } + /** * 发送邮件至审稿人 */