1
This commit is contained in:
@@ -364,6 +364,134 @@ class Article extends Controller {
|
||||
return json(['code' => 0, 'msg' => 'success']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章通过投稿系统
|
||||
*/
|
||||
public function addArticleForSubmission(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'title' => 'require',
|
||||
'journal_stage_id' => 'require',
|
||||
'issn' => 'require',
|
||||
'type' => 'require',
|
||||
'doi' => 'require',
|
||||
'abstract' => 'require',
|
||||
'file_pdf' => 'require',
|
||||
'pub_date' => 'require',
|
||||
'keywords' => 'require',
|
||||
'npp'=>'require'
|
||||
]);
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||
if(!is_dir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'))){
|
||||
mkdir(ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd'));
|
||||
}
|
||||
$file_name = substr($data['file_pdf'],strripos($data['file_pdf'],'/')+1);
|
||||
$co = copy("http://api.tmrjournals.com/public/".$data['file_pdf'],ROOT_PATH.'public'.DS.'articlePDF'.DS.date('Ymd').DS.$file_name);
|
||||
if($co!=1){
|
||||
return jsonError('copy error!');
|
||||
}
|
||||
//处理基本信息
|
||||
$insert['title'] = trim($data['title']);
|
||||
$insert['journal_id'] = $journal_info['journal_id'];
|
||||
$insert['journal_stage_id'] = $data['journal_stage_id'];
|
||||
$insert['type'] = $data['type'];
|
||||
if(isset($data['icon'])&&$data['icon']!=''){
|
||||
$insert['icon'] = $data['icon'];
|
||||
}
|
||||
$insert['doi'] = $data['doi'];
|
||||
$insert['abstract'] = $data['abstract'];
|
||||
$insert['pub_date'] = $data['pub_date'];
|
||||
$insert['keywords'] = $data['keywords'];
|
||||
$insert['npp'] = $data['npp'];
|
||||
$insert['file_pdf'] = date('Ymd').DS.$file_name;
|
||||
$insert['ctime'] = time();
|
||||
|
||||
$aid = $this->article_obj->insertGetId($insert);
|
||||
|
||||
//处理作者
|
||||
|
||||
|
||||
$data['authors'] = "[{\"art_aut_id\":6474,\"article_id\":2065,\"firstname\":\"Tadele\",\"lastname\":\"Yadesa\",\"orcid\":\"https:\\/\\/orcid.org\\/ 0000-0001-5151-2610\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"maatiikoo4@gmail.com\",\"author_title\":\"Ph.D.\",\"country\":\"Uganda\",\"address\":\"Mbarara University of Science and Technology P.O.BOX 1410\",\"is_super\":1,\"is_report\":1,\"state\":0},{\"art_aut_id\":6475,\"article_id\":2065,\"firstname\":\"Oliver\",\"lastname\":\"Kushemererwa\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"Kusholiver@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6476,\"article_id\":2065,\"firstname\":\"Joshua\",\"lastname\":\"Kiptoo\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"KIPTOOKWALIA@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6477,\"article_id\":2065,\"firstname\":\"John\",\"lastname\":\"Isiiko\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"isiikojohn@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6478,\"article_id\":2065,\"firstname\":\"Bonny\",\"lastname\":\"Luzze\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"tottojrlz@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6479,\"article_id\":2065,\"firstname\":\"Jacinta\",\"lastname\":\"Ojia\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Internal medicine\",\"email\":\"ambark21@yahoo.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6480,\"article_id\":2065,\"firstname\":\"Mohamed\",\"lastname\":\"Abdirahman\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Internal medicine\",\"email\":\"dr.mma001838@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":1,\"is_report\":0,\"state\":0}]";
|
||||
|
||||
$authors = object_to_array(json_decode($data['authors']));
|
||||
|
||||
|
||||
$o = [];
|
||||
$orgs = [];
|
||||
foreach($authors as $k => $v){
|
||||
if(in_array($v['company'],$orgs)){
|
||||
continue;
|
||||
}
|
||||
$orgs[] = $v['company'];
|
||||
}
|
||||
foreach($orgs as $v){
|
||||
$insert_oo['article_id'] = $aid;
|
||||
$insert_oo['organ_name'] = $v;
|
||||
$ca_id = $this->article_organ_obj->insertGetId($insert_oo);
|
||||
$o[$v] = $ca_id;
|
||||
}
|
||||
foreach($authors as $v){
|
||||
$insert_author['article_id'] = $aid;
|
||||
$insert_author['author_name'] = $v['firstname'].' '.$v['lastname'];
|
||||
$insert_author['first_name'] = $v['firstname'];
|
||||
$insert_author['last_name'] = $v['lastname'];
|
||||
$insert_author['author_country'] = $v['country'];
|
||||
$insert_author['is_first'] = $v['is_super'];
|
||||
$insert_author['is_report'] = $v['is_report'];
|
||||
$insert_author['email'] = $v['email'];
|
||||
$ca_au_id = $this->article_author_obj->insertGetId($insert_author);
|
||||
$insert_orm['article_id'] = $aid;
|
||||
$insert_orm['article_author_id'] = $ca_au_id;
|
||||
$insert_orm['article_organ_id'] = $o[$v['company']];
|
||||
$this->author_to_organ_obj->insert($insert_orm);
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function authortest(){
|
||||
$str = "[{\"art_aut_id\":6474,\"article_id\":2065,\"firstname\":\"Tadele\",\"lastname\":\"Yadesa\",\"orcid\":\"https:\\/\\/orcid.org\\/ 0000-0001-5151-2610\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"maatiikoo4@gmail.com\",\"author_title\":\"Ph.D.\",\"country\":\"Uganda\",\"address\":\"Mbarara University of Science and Technology P.O.BOX 1410\",\"is_super\":1,\"is_report\":1,\"state\":0},{\"art_aut_id\":6475,\"article_id\":2065,\"firstname\":\"Oliver\",\"lastname\":\"Kushemererwa\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"Kusholiver@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6476,\"article_id\":2065,\"firstname\":\"Joshua\",\"lastname\":\"Kiptoo\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"KIPTOOKWALIA@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6477,\"article_id\":2065,\"firstname\":\"John\",\"lastname\":\"Isiiko\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"isiikojohn@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6478,\"article_id\":2065,\"firstname\":\"Bonny\",\"lastname\":\"Luzze\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Pharmacy\",\"email\":\"tottojrlz@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6479,\"article_id\":2065,\"firstname\":\"Jacinta\",\"lastname\":\"Ojia\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Internal medicine\",\"email\":\"ambark21@yahoo.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":0,\"is_report\":0,\"state\":0},{\"art_aut_id\":6480,\"article_id\":2065,\"firstname\":\"Mohamed\",\"lastname\":\"Abdirahman\",\"orcid\":\"\",\"company\":\"Mbarara University of Science and Technology\",\"department\":\"Internal medicine\",\"email\":\"dr.mma001838@gmail.com\",\"author_title\":\"Others\",\"country\":\"Uganda\",\"address\":\"\",\"is_super\":1,\"is_report\":0,\"state\":0}]";
|
||||
$authors = object_to_array(json_decode($str));
|
||||
$o = [];
|
||||
$orgs = [];
|
||||
foreach($authors as $k => $v){
|
||||
if(in_array($v['company'],$orgs)){
|
||||
continue;
|
||||
}
|
||||
$orgs[] = $v['company'];
|
||||
}
|
||||
foreach($orgs as $v){
|
||||
$insert['article_id'] = 8888;
|
||||
$insert['organ_name'] = $v;
|
||||
$ca_id = $this->article_organ_obj->insertGetId($insert);
|
||||
$o[$v] = $ca_id;
|
||||
}
|
||||
foreach($authors as $v){
|
||||
$insert_author['article_id'] = 8888;
|
||||
$insert_author['author_name'] = $v['firstname'].' '.$v['lastname'];
|
||||
$insert_author['first_name'] = $v['firstname'];
|
||||
$insert_author['last_name'] = $v['lastname'];
|
||||
$insert_author['author_country'] = $v['country'];
|
||||
$insert_author['is_first'] = $v['is_super'];
|
||||
$insert_author['is_report'] = $v['is_report'];
|
||||
$insert_author['email'] = $v['email'];
|
||||
$ca_au_id = $this->article_author_obj->insertGetId($insert_author);
|
||||
$insert_orm['article_id'] = 8888;
|
||||
$insert_orm['article_author_id'] = $ca_au_id;
|
||||
$insert_orm['article_organ_id'] = $o[$v['company']];
|
||||
$this->author_to_organ_obj->insert($insert_orm);
|
||||
}
|
||||
echo 'ok';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取文章基本信息
|
||||
* @description 获取文章基本信息
|
||||
|
||||
@@ -769,41 +769,42 @@ class Journal extends Controller
|
||||
/**
|
||||
* 推送邮件给编委
|
||||
*/
|
||||
private function pushEmailToBoardByJournal(){
|
||||
private function pushEmailToBoardByJournal()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'journal_id' => 'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$boards = $this->board_obj->where('journal_id',$data['journal_id'])->where('type',2)->where('state',0)->select();
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
|
||||
$boards = $this->board_obj->where('journal_id', $data['journal_id'])->where('type', 2)->where('state', 0)->select();
|
||||
$tt = "Life Research journal is currently applying for Web of Science Core Collection (SCI), and we have received modification comments from Web of Science Editorial Team. Life Research is expected to be indexed in SCI in two years. <br><br>";
|
||||
$tt .= "According to the opinions, the editorial board of Life Research journal needs to be reorganized. <strong>Please send the URL of your latest publication record (ORCID or ResearchGate) to this email address (liferes@tmrjournals.com)</strong>. We will choose new editorial board members based on the latest publication record. If you cannot respond within two weeks, you will be temporarily removed from the editorial board list until you send us the publication record.<br><br>";
|
||||
$tt .= "Thank you very much for your support.<br><br>";
|
||||
$tt .= "Life Research Editorial Team";
|
||||
|
||||
|
||||
// $name = 'haoRan Zhang';
|
||||
// // $maidata['email'] = 'liferes@tmrjournals.com';
|
||||
// $maidata['email'] = '751475802@qq.com';
|
||||
// $maidata['title'] = 'Please send the URL of your latest publication record (Life Research)';
|
||||
// $maidata['content'] = "Dear ".$name.",<br><br>".$tt;
|
||||
// // $maidata['tmail'] = $journal_info['email'];
|
||||
// // $maidata['tpassword'] = $journal_info['epassword'];
|
||||
// $maidata['tmail'] = 'liferes@tmrjournals.com';
|
||||
// $maidata['tpassword'] = 'Wu999999lifere';
|
||||
// Queue::push('app\api\job\mail@fire', $maidata, "mail");
|
||||
// $r = sendEmail($maidata['email'],$maidata['title'],$maidata['title'],$maidata['content'],$maidata['tmail'],$maidata['tpassword']);
|
||||
// $name = 'haoRan Zhang';
|
||||
// // $maidata['email'] = 'liferes@tmrjournals.com';
|
||||
// $maidata['email'] = '751475802@qq.com';
|
||||
// $maidata['title'] = 'Please send the URL of your latest publication record (Life Research)';
|
||||
// $maidata['content'] = "Dear ".$name.",<br><br>".$tt;
|
||||
// // $maidata['tmail'] = $journal_info['email'];
|
||||
// // $maidata['tpassword'] = $journal_info['epassword'];
|
||||
// $maidata['tmail'] = 'liferes@tmrjournals.com';
|
||||
// $maidata['tpassword'] = 'Wu999999lifere';
|
||||
// Queue::push('app\api\job\mail@fire', $maidata, "mail");
|
||||
// $r = sendEmail($maidata['email'],$maidata['title'],$maidata['title'],$maidata['content'],$maidata['tmail'],$maidata['tpassword']);
|
||||
|
||||
foreach($boards as $v){
|
||||
if($v['email']==''){
|
||||
foreach ($boards as $v) {
|
||||
if ($v['email'] == '') {
|
||||
continue;
|
||||
}
|
||||
$maidata['email'] = $v['email'];
|
||||
$maidata['title'] = 'Please send the URL of your latest publication record (Life Research)';
|
||||
$maidata['content'] = "Dear ".$v['name'].",<br><br>".$tt;
|
||||
$maidata['content'] = "Dear " . $v['name'] . ",<br><br>" . $tt;
|
||||
$maidata['tmail'] = $journal_info['email'];
|
||||
$maidata['tpassword'] = $journal_info['epassword'];
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "mail");
|
||||
@@ -816,40 +817,41 @@ class Journal extends Controller
|
||||
/**
|
||||
* 发送推广邮件到订阅者
|
||||
*/
|
||||
public function pushEmailToDY(){
|
||||
public function pushEmailToDY()
|
||||
{
|
||||
|
||||
$frag = $this->subscribe_journal_obj->where('journal_id',1)->where('state',0)->limit(0,1000)->select();
|
||||
$frag = $this->subscribe_journal_obj->where('journal_id', 1)->where('state', 0)->limit(0, 1000)->select();
|
||||
|
||||
$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_article.journal_id',1)
|
||||
->where('j_article.journal_stage_id','<',375)
|
||||
->limit(20)
|
||||
->order('pdf_num desc')->select();
|
||||
->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_article.journal_id', 1)
|
||||
->where('j_article.journal_stage_id', '<', 375)
|
||||
->limit(20)
|
||||
->order('pdf_num desc')->select();
|
||||
$tt = 'Greetings!<br>';
|
||||
$tt .= '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. <br><br>";
|
||||
$tt .= "Attached are some popular papers published in Traditional Medicine Research.<br><br>";
|
||||
$tt .= "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>";
|
||||
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 ($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>";
|
||||
}
|
||||
|
||||
$frag1 = [];
|
||||
$frag1[] = [
|
||||
'subscribe_journal_id'=>7,
|
||||
'email'=>'751475802@qq.com'
|
||||
'subscribe_journal_id' => 7,
|
||||
'email' => '751475802@qq.com'
|
||||
];
|
||||
$frag1[] = [
|
||||
'subscribe_journal_id'=>7,
|
||||
'email'=>'tmr@tmrjournals.com'
|
||||
'subscribe_journal_id' => 7,
|
||||
'email' => 'tmr@tmrjournals.com'
|
||||
];
|
||||
|
||||
foreach($frag as $v){
|
||||
$cache_tt = $tt.'<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeJournal/snum/' . $v['subscribe_journal_id'] . '">Unsubscribe</a>';
|
||||
foreach ($frag as $v) {
|
||||
$cache_tt = $tt . '<a href="http://journalapi.tmrjournals.com/public/index.php/api/Journal/UnsubscribeJournal/snum/' . $v['subscribe_journal_id'] . '">Unsubscribe</a>';
|
||||
$maidata['email'] = $v['email'];
|
||||
$maidata['title'] = "Traditional Medicine Research will get the first Impact Factor (WOS) in 2023";
|
||||
$maidata['content'] = $cache_tt;
|
||||
@@ -879,9 +881,9 @@ class Journal extends Controller
|
||||
$pag = [];
|
||||
$pag['topic'] = $v['p_title'];
|
||||
$cache_res = object_to_array(json_decode(myPost($url, $pag)));
|
||||
if($cache_res['code']==0){
|
||||
$emails =$cache_res['data']['reviewers'];
|
||||
foreach($emails as $val){
|
||||
if ($cache_res['code'] == 0) {
|
||||
$emails = $cache_res['data']['reviewers'];
|
||||
foreach ($emails as $val) {
|
||||
$frag[] = $val;
|
||||
}
|
||||
}
|
||||
@@ -892,32 +894,32 @@ class Journal extends Controller
|
||||
->join('j_journal_stage', 'j_journal_stage.journal_stage_id = j_article.journal_stage_id', 'left')
|
||||
->where('j_journal_stage.stage_year', '>=', '2020')
|
||||
->where('j_article.article_id', 'in', $article_ids)
|
||||
->where('j_article.journal_id',1)
|
||||
->where('j_article.journal_id', 1)
|
||||
->where('j_article.state', 0)
|
||||
->select();
|
||||
$tt = 'Greetings!<br>';
|
||||
$tt .= 'Thank you for your contribution to TMR Publishing Group and your active participation in the peer review process.<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.<br>Attached are some papers published in Traditional Medicine Research, which are related to your research field. You are always welcome to read and to share the articles and encourage you to submit your manuscripts to us through the following channels: www.tmrjournals.com/tmr <br><br>";
|
||||
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 ($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>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$frag1 = [];
|
||||
$frag1[] = [
|
||||
'user_id'=>54,
|
||||
'email'=>'751475802@qq.com'
|
||||
'user_id' => 54,
|
||||
'email' => '751475802@qq.com'
|
||||
];
|
||||
$frag1[] = [
|
||||
'user_id'=>28,
|
||||
'email'=>'tmr@tmrjournals.com'
|
||||
'user_id' => 28,
|
||||
'email' => 'tmr@tmrjournals.com'
|
||||
];
|
||||
|
||||
foreach($frag as $v){
|
||||
$cache_tt = $tt.'<a href="http://api.tmrjournals.com/public/index.php/api/User/unAdvertForUser/uid/' . $v['user_id'] . '">Unsubscribe</a>';
|
||||
foreach ($frag as $v) {
|
||||
$cache_tt = $tt . '<a href="http://api.tmrjournals.com/public/index.php/api/User/unAdvertForUser/uid/' . $v['user_id'] . '">Unsubscribe</a>';
|
||||
$maidata['email'] = $v['email'];
|
||||
$maidata['title'] = "Traditional Medicine Research will get the first Impact Factor (WOS) in 2023";
|
||||
$maidata['content'] = $cache_tt;
|
||||
@@ -929,7 +931,7 @@ class Journal extends Controller
|
||||
Queue::push('app\api\job\mail@propa', $maidata, "mail");
|
||||
// sendEmail($maidata['email'],$maidata['title'],$maidata['title'],$maidata['content'],$maidata['tmail'],$maidata['tpassword']);
|
||||
}
|
||||
return jsonSuccess(['num'=>count($frag)]);
|
||||
return jsonSuccess(['num' => count($frag)]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1444,6 +1446,31 @@ class Journal extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加分期应对投稿系统
|
||||
*/
|
||||
public function addStageForTG(){
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||
$insert_data['journal_id'] = $journal_info['journal_id'];
|
||||
$insert_data['stage_year'] = $data['stage_year'];
|
||||
$insert_data['stage_vol'] = $data['stage_vol'];
|
||||
$insert_data['stage_no'] = $data['stage_no'];
|
||||
$insert_data['stage_pagename'] = $data['stage_pagename'];
|
||||
$insert_data['stage_page'] = $data['stage_page'];
|
||||
$insert_data['issue_date'] = $data['issue_date'];
|
||||
if (isset($data['stage_icon']) && !empty($data['stage_icon'])) {
|
||||
$insert_data['stage_icon'] = $data['stage_icon'];
|
||||
}
|
||||
$res = $this->journal_stage_obj->insert($insert_data);
|
||||
if ($res) {
|
||||
return json(['code' => 0, 'msg' => 'success']);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => 'system error']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊分期
|
||||
* @description 获取期刊分期
|
||||
@@ -1464,6 +1491,25 @@ class Journal extends Controller
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['journal' => $journal_info, 'stage_list' => $stage_list]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取stages通过issn号
|
||||
*/
|
||||
public function getStageByISSN()
|
||||
{
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'issn' => 'require'
|
||||
]);
|
||||
if (!$rule->check($data)) {
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||
$stages = $this->journal_stage_obj->where('journal_id',$journal_info['journal_id'])->where('state',0)->order('journal_stage_id desc')->select();
|
||||
$re['stages'] = $stages;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除期刊分期
|
||||
* @description 删除期刊分期
|
||||
|
||||
Reference in New Issue
Block a user