This commit is contained in:
@@ -40,6 +40,79 @@ class Auto extends Controller {
|
||||
$this->user_log_obj = Db::name('user_log');
|
||||
$this->reviewer_info_obj = Db::name('user_reviewer_info');
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送邮件给审稿人提醒审稿人
|
||||
*/
|
||||
public function pushEmailForReviewer(){
|
||||
//筛选数据
|
||||
$list = $this->article_reviewer_obj->where("state","in",[0,5])->select();
|
||||
foreach ($list as $v){
|
||||
$cache_article = $this->article_obj->where("article_id",$v['article_id'])->find();
|
||||
if($cache_article["state"]!=2){
|
||||
continue;
|
||||
}
|
||||
$cache_t = intval((time()-$v["ctime"])/86400);
|
||||
if($cache_t==14||$cache_t==21||$cache_t==28){
|
||||
$cache_journal = $this->journal_obj->where("journal_id",$cache_article['journal_id'])->find();
|
||||
//查找审稿人信息
|
||||
$cache_reviewer = $this->user_obj
|
||||
->join("t_user_reviewer_info","t_user_reviewer_info.reviewer_id = t_user.user_id","left")
|
||||
->where("t_user.user_id",$v['reviewer_id'])->find();
|
||||
|
||||
$tt = "Manuscript ID: ".$cache_article['accept_sn']."<br>";
|
||||
$tt .= "Title:".$cache_article['title']."<br>";
|
||||
$tt .= "Dear ".($cache_reviewer['technical']==""||$cache_reviewer['technical']=="Others"?"Dr.":$cache_reviewer['technical'])." ".($cache_reviewer["realname"]==""?$cache_reviewer["account"]:$cache_reviewer["realname"])."<br><br>";
|
||||
$tt .= "On ".date("d D Y",$v["ctime"])." we sent you a request to review a paper title ".$cache_article['title'].".<br><br>";
|
||||
$tt .= "We have not yet received a response from you, possibly because the original invitation went astray. We would be grateful if you could let us know if you can carry out this review.<br><br>";
|
||||
$tt .= "If you would like to review this paper, please click <a href='https://submission.tmrjournals.com/'>this link</a>.<br><br>";
|
||||
$tt .= "If you do not wish to review this paper, please click <a href='http://api.tmrjournals.com/public/index.php/api/Reviewer/refusereview/aid/".$v['art_rev_id']."'>this link</a>.<br><br>";
|
||||
$tt .= 'Sincerely,<br>Editorial Office<br>'.$cache_journal['title'].'<br>';
|
||||
$tt .= 'Email: '.$cache_journal['email'].'<br>';
|
||||
$tt .= 'Website:<a href="'.$cache_journal['website'].'">'.$cache_journal['website'].'</a>';
|
||||
|
||||
$maidata['email'] = $cache_reviewer['email'];
|
||||
$maidata['title'] = "Invitation to review manuscript for ".$cache_journal['title']." - Reminder";
|
||||
$maidata['content'] = $tt;
|
||||
$maidata['tmail'] = $cache_journal['email'];
|
||||
$maidata['tpassword'] = $cache_journal['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送邮件提醒作者修回稿件
|
||||
*/
|
||||
public function pushEmailForAuthor(){
|
||||
//筛选数据
|
||||
$list = $this->article_obj->where("state",4)->select();
|
||||
foreach ($list as $v){
|
||||
$cache_t = intval((time()-$v["ttime"])/86400);
|
||||
if($cache_t==14||$cache_t==21||$cache_t==28){
|
||||
//查找文章内容
|
||||
$cache_journal = $this->journal_obj->where("journal_id",$v['journal_id'])->find();
|
||||
//查找作者信息
|
||||
$cache_author = $this->user_obj->where("user_id",$v['user_id'])->find();
|
||||
|
||||
$tt = "Dear Author,<br>";
|
||||
$tt .= "We have send you the email about revision of your manuscript. According to our records you are almost reaching the deadline now. We look forward to receiving your revised article.<br><br>";
|
||||
$tt .= "When preparing your revised manuscript, you are asked to carefully consider the reviewers' comments which are attached, and submit a revised versionand a list of responses to the comments before deadline. The revised parts in the manuscript should be highlighted with blue color.<br><br>";
|
||||
$tt .= "If you feel that you will require more time to complete your revision, please let me know and I will update our records accordingly. If I can provide any further advice or assistance, please do not hesitate to contact me.<br><br><br>";
|
||||
$tt .= 'Sincerely,<br>Editorial Office<br>'.$cache_journal['title'].'<br>';
|
||||
$tt .= 'Email: '.$cache_journal['email'].'<br>';
|
||||
$tt .= 'Website:<a href="'.$cache_journal['website'].'">'.$cache_journal['website'].'</a>';
|
||||
|
||||
$maidata['email'] = $cache_author['email'];
|
||||
$maidata['title'] = "Deadline for your revision of ".$cache_journal['title']." -Reminder";
|
||||
$maidata['content'] = $tt;
|
||||
$maidata['tmail'] = $cache_journal['email'];
|
||||
$maidata['tpassword'] = $cache_journal['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "tmail");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动审稿主方法
|
||||
|
||||
Reference in New Issue
Block a user