1
This commit is contained in:
@@ -345,12 +345,18 @@ class Article extends Controller {
|
||||
$data = $this->request->post();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id', $data['stage_id'])->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id', $stage_info['journal_id'])->find();
|
||||
|
||||
|
||||
$order = "j_article.sort asc";
|
||||
if(($journal_info['journal_id']==2&&$stage_info['journal_stage_id']>=337)||($journal_info['journal_id']==17&&$stage_info['journal_stage_id']>=346)||($journal_info['journal_id']==18&&$stage_info['journal_stage_id']>=338)){
|
||||
$order = "j_article.sort desc";
|
||||
}
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*,j_journal.title journal_title')
|
||||
->join("j_journal", 'j_journal.journal_id = j_article.journal_id', 'left')
|
||||
->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||
->where('j_article.journal_stage_id', $data['stage_id'])
|
||||
->where('j_article.state', 0)
|
||||
->order('j_article.sort')
|
||||
->order($order)
|
||||
->select();
|
||||
//获取作者
|
||||
foreach ($list as $k => $v) {
|
||||
|
||||
@@ -606,9 +606,13 @@ class Journal extends Controller {
|
||||
public function getJournalArticles() {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
|
||||
$order = "sort asc";
|
||||
if(($journal_info['journal_id']==2&&$journal_info['publish_stage_id']>=337)||($journal_info['journal_id']==17&&$journal_info['publish_stage_id']>=346)||($journal_info['journal_id']==18&&$journal_info['publish_stage_id']>=338)){
|
||||
$order = "sort desc";
|
||||
}
|
||||
$list = $this->article_obj->where('journal_stage_id', $journal_info['publish_stage_id'])
|
||||
->where('state', 0)
|
||||
->order('sort asc')
|
||||
->order($order)
|
||||
->select();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id', $journal_info['publish_stage_id'])->find();
|
||||
//标题斜体
|
||||
|
||||
@@ -456,6 +456,13 @@ class Article extends Controller {
|
||||
$insert['tradition'] = isset($data['tradition'])?$data['tradition']:'';
|
||||
$insert['keywords'] = $data['keywords'];
|
||||
$insert['npp'] = $data['npp'];
|
||||
$sort = 0;
|
||||
if($journal_info['journal_id']==2||$journal_info['journal_id']==17||$journal_info['journal_id']==18){
|
||||
$sort = intval(substr($data['npp'],-2));
|
||||
}else{
|
||||
$sort = $data['npp'];
|
||||
}
|
||||
$insert['sort'] = $sort;
|
||||
$insert['file_pdf'] = date('Ymd').DS.$file_name;
|
||||
$insert['is_public'] = 1;
|
||||
$insert['ctime'] = time();
|
||||
@@ -477,7 +484,7 @@ class Article extends Controller {
|
||||
$ca_au_id = true;
|
||||
foreach($authors as $v){
|
||||
$insert_author['article_id'] = $aid;
|
||||
$insert_author['author_name'] = $v['first_name'].' '.$v['last_name'];
|
||||
$insert_author['author_name'] = $journal_info['journal_id']==22?$v['last_name'].$v['first_name']:$v['first_name'].' '.$v['last_name'];
|
||||
$insert_author['first_name'] = $v['first_name'];
|
||||
$insert_author['last_name'] = $v['last_name'];
|
||||
$insert_author['author_country'] = $v['author_country'];
|
||||
|
||||
@@ -868,6 +868,48 @@ class Journal extends Controller
|
||||
}
|
||||
|
||||
|
||||
public function pushEmailToUser1(){
|
||||
// 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([]);
|
||||
}
|
||||
|
||||
public function pushEmailToUser(){
|
||||
// die('stop');
|
||||
$data = $this->request->post();
|
||||
|
||||
@@ -20,6 +20,9 @@ class Mytest extends Controller
|
||||
parent::__construct($request);
|
||||
}
|
||||
|
||||
public function info(){
|
||||
phpinfo();
|
||||
}
|
||||
|
||||
public function getAllfile()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user