From c57077e35f8c6b4141babd2f4f74532730617bb0 Mon Sep 17 00:00:00 2001
From: wangjinlei <751475802@qq.com>
Date: Wed, 17 Jul 2024 17:02:49 +0800
Subject: [PATCH] 1
---
application/api/controller/Article.php | 3 +-
application/api/controller/Auto.php | 2 +-
application/api/controller/Email.php | 42 +++++++++++++++++++++++++
application/api/controller/Reviewer.php | 2 +-
application/api/controller/Web.php | 2 +-
application/api/job/review.php | 4 +--
6 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/application/api/controller/Article.php b/application/api/controller/Article.php
index bf626e7..d9386f1 100644
--- a/application/api/controller/Article.php
+++ b/application/api/controller/Article.php
@@ -3480,7 +3480,8 @@ class Article extends Base
$res = $this->user_obj->where('user_id', $user_id)->find();
if ($res['type'] == 1) { // 作者 - 修改author_act,并发送给编辑发邮件
$this->article_obj->where('article_id', $article_id)->update(['author_act' => 1]);
- $editor = $this->user_obj->where('user_id', $article['editor_id'])->find();
+ $journal_info = $this->journal_obj->where("journal_id",$article['journal_id'])->find();
+ $editor = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
// 发邮件
$content = 'Dear editor,
please check the new feedback.';
sendEmail($editor['email'], $article['title'], $article['title'], $content, $article['email'], $article['epassword']);
diff --git a/application/api/controller/Auto.php b/application/api/controller/Auto.php
index 8374b5f..ad25316 100644
--- a/application/api/controller/Auto.php
+++ b/application/api/controller/Auto.php
@@ -683,7 +683,7 @@ class Auto extends Base
public function add_reviewer($article)
{
$journal_info = $this->journal_obj->where('journal_id', $article['journal_id'])->find();
- $editor_info = $this->user_obj->where('user_id', $article['editor_id'])->find();
+ $editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
//根据文章筛选候选人
$reviewer = $this->chose_reviewer($article);
diff --git a/application/api/controller/Email.php b/application/api/controller/Email.php
index dfc7b80..57b15ca 100644
--- a/application/api/controller/Email.php
+++ b/application/api/controller/Email.php
@@ -233,6 +233,48 @@ class Email extends Controller
}
+ public function pushEmailForBMEC1(){
+ $a = readExcel("/home/wwwroot/api.tmrjournals.com/public/system/2.xlsx");
+
+ $a[] = ["wangjinlei","testtesttest","13662001490@126.com"];
+// $a[] = ["wangjinlei1","testtesttest1","751475802@qq.com"];
+// $a[] = ["Aubree Zhu","testtesttest2","1300364247@qq.com"];
+
+echo "
";
+var_dump($a);
+echo "
";
+die;
+
+ $journal_info = $this->journal_obj->where("journal_id",23)->find();
+// $email = "1300364247@qq.com";
+// $email = "751475802@qq.com";
+
+ foreach ($a as $k=>$v){
+ $content = "Dear Dr. ".trim($v['0']).",
";
+ $content .= 'We recently read your article "'.trim($v[1]).'", and we consider your research interests and expertise to be aligned well with the scope of the journal Biomedical Engineering Communications(https://www.tmrjournals.com/bmec/).
';
+ $content .= "Thus, on behalf of the editorial team of BMEC, we would like to invite you to publish a feature paper in BMEC, and please note that standard article processing charge of 0 CHF.
";
+ $content .= "If you plan to contribute, please kindly send us a short abstract via e-mail in advance.
";
+ $content .= "Biomedical Engineering Communications (ISSN: 2815-9063) is a peer-reviewed, open-access journal managed by TMR Publishing Group. Biomedical engineering is an interdisciplinary discipline that combines the principles of physics, chemistry, mathematics, computer and engineering, to study biomedicine and develop innovative biological products, materials, processing methods, implants, devices and informatics.
";
+ $content .= "The aim of Biomedical Engineering Communications is to promote the integration of new technologies, new ideas, new methods and life sciences in the field of engineering, and to enhance the digitization, automation and intelligence of biomedical engineering technology.
";
+ $content .= "You may find more information about the journal, including the editorial board and Special Issues, at https://www.tmrjournals.com/bmec/
";
+ $content .= "If you have any questions, please feel free to contact me.
We look forward to hearing from you.
Best regards,
Aubree zhu
Journal Editor
WeChat: 15620305727
";
+ $content .= "Recruiting reviewers
https://submission.tmrjournals.com/reviewer
Biomedical Engineering Communications
Email: bmec@tmrjournals.com
Website: https://www.tmrjournals.com/bmec/
";
+ $pre = Env::get('emailtemplete.pre');
+ $net = Env::get('emailtemplete.net');
+ $net1 = str_replace("{{email}}",trim($v[2]),$net);
+ $mailbody=$pre.$content.$net1;
+
+ $edata['email'] = trim($v[2]);
+ $edata['title'] = "[Biomedical Engineering Communications] Invitation for More Academic Cooperation";
+ $edata['content'] = $mailbody;
+ $edata['tmail'] = $journal_info['email'];
+ $edata['tpassword'] = $journal_info['epassword'];
+ Queue::push('app\api\job\mail@fire', $edata, "tmail");
+ }
+
+ }
+
+
public function lsPushEmail()
{
// $journal_info = $this->journal_obj->where("journal_id", 4)->find();
diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php
index 7187410..f2e04fd 100644
--- a/application/api/controller/Reviewer.php
+++ b/application/api/controller/Reviewer.php
@@ -478,8 +478,8 @@ class Reviewer extends Base
$data = $this->request->post();
$artrev_info = $this->article_reviewer_obj->where('art_rev_id', $data['artrevid'])->find();
$article_info = $this->article_obj->where('article_id', $artrev_info['article_id'])->find();
- $editor_info = $this->user_obj->where('user_id', $article_info['editor_id'])->find();
$journal_info = $this->journal_obj->where('journal_id', $article_info['journal_id'])->find();
+ $editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
if ($type == 'editor') {
$up_data['editor_act'] = 1;
$user_msg_url = '/reviewerArticleDetail?id=' . $data['artrevid'];
diff --git a/application/api/controller/Web.php b/application/api/controller/Web.php
index fb32ba4..f0a4d9c 100644
--- a/application/api/controller/Web.php
+++ b/application/api/controller/Web.php
@@ -201,7 +201,7 @@ class Web extends Base
||($article_info['journal_id']==6&&$p_info['journal_stage_id']>=515)
||($article_info['journal_id']==15&&($article_info['article_id']>=4465||$article_info['article_id']==4349))
||($article_info['journal_id']==10&&$p_info['journal_stage_id']>=534)
- ||($article_info['journal_id']==3&&$article_info['article_id']>=4552)
+ ||($article_info['journal_id']==3&&($article_info['article_id']>=4523||$article_info['article_id']==4094))
||($article_info['journal_id']==2&&$article_info['article_id']>=4361)
||$article_info['journal_id']==23){
//添加初审问卷
diff --git a/application/api/job/review.php b/application/api/job/review.php
index 141625a..09d3fda 100644
--- a/application/api/job/review.php
+++ b/application/api/job/review.php
@@ -72,7 +72,7 @@ class review {
$rev_list = $this->reviewer_obj->where('article_id', $data['article_id'])->where('state','<>',4)->select();
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
$user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
- $editor_info = $this->user_obj->where('user_id',$data['editor_id'])->find();
+ $editor_info = $this->user_obj->where('user_id',$journal_info['editor_id'])->find();
//分析审稿人状况
$all = count($rev_list);
$s_num = 0; //初始数量
@@ -233,7 +233,7 @@ class review {
*/
public function add_reviewer($article) {
$journal_info = $this->journal_obj->where('journal_id', $article['journal_id'])->find();
- $editor_info = $this->user_obj->where('user_id', $article['editor_id'])->find();
+ $editor_info = $this->user_obj->where('user_id', $journal_info['editor_id'])->find();
//根据文章筛选候选人
$reviewer = $this->chose_reviewer($article);
// 发送邮件