1
This commit is contained in:
@@ -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!<br/>Thank you for your attention to TMR Publishing Group and your active participation.<br/><br/>';
|
||||
$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<br/><br/><br/>";
|
||||
|
||||
$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 .= "<a href='https://www.tmrjournals.com/article.html?J_num=1&a_id=" . $v['article_id'] . "'>" . $v['title'] . "</a><br>";
|
||||
$tt .= "Traditional Medicine Research. " . $v['stage_year'] . " " . $v['stage_vol'] . "(" . $v['stage_no'] . ")<br>";
|
||||
$tt .= "<a href='https://www.tmrjournals.com/public/articlePDF/" . $v['file_pdf'] . "'>Download pdf</a><br><br><br>";
|
||||
}
|
||||
|
||||
|
||||
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([]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送邮件至审稿人
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user