1
This commit is contained in:
@@ -1629,10 +1629,51 @@ class Article extends Controller {
|
||||
// die;
|
||||
}
|
||||
|
||||
public function met() {
|
||||
$s = '11';
|
||||
$arr = explode('-', $s);
|
||||
echo $arr[0];
|
||||
public function cccc(){
|
||||
die;
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'num'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
$limit_start = ($data['num'] - 1) * 20;
|
||||
$list = $this->article_obj->where('doi','like',"10.12032%")->where('state',0)->limit($limit_start,20)->select();
|
||||
foreach($list as $v){
|
||||
$c = explode('/',$v['doi']);
|
||||
|
||||
|
||||
$author = $this->article_author_obj->where('article_id', $v['article_id'])->where('state', 0)->find();
|
||||
if ($author == null) {
|
||||
continue;
|
||||
}
|
||||
$article_info = $this->article_obj->where('article_id', $v['article_id'])->find();
|
||||
if ($article_info['npp'] == '') {
|
||||
continue;
|
||||
}
|
||||
$url = 'https://doi.crossref.org/servlet/deposit';
|
||||
$file = ROOT_PATH . 'public' . DS . 'xml' . DS . $v['article_id'] . '.xml';
|
||||
|
||||
$d['article_id'] = $v['article_id'];
|
||||
$d['doi_num'] = $c[1];
|
||||
$this->crossRef($d);
|
||||
|
||||
//存储
|
||||
$this->article_obj->where('article_id', $v['article_id'])->update(['doi' => '10.53388/' . $c[1]]);
|
||||
|
||||
//发送请求
|
||||
$par['login_id'] = 'books@tmrjournals.com/tmrp';
|
||||
$par['login_passwd'] = '849192806pnX';
|
||||
$par['fname'] = new \CURLFile($file);
|
||||
|
||||
$this->myPost($url, $par);
|
||||
// echo '10.53388/'.$c[1];
|
||||
// echo '<br/>';
|
||||
}
|
||||
|
||||
// dump($list);
|
||||
}
|
||||
|
||||
public function crossRef($data) {
|
||||
|
||||
@@ -473,6 +473,7 @@ class Datebase extends Controller
|
||||
echo 'success !';
|
||||
}
|
||||
|
||||
|
||||
private function createEmailFile($journal_stage_id)
|
||||
{
|
||||
$url = "http://ts.tmrjournals.com/api/dataApi/createTemplate";
|
||||
@@ -651,7 +652,6 @@ class Datebase extends Controller
|
||||
|
||||
public function phpinfo()
|
||||
{
|
||||
|
||||
phpinfo();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user