1
This commit is contained in:
@@ -70,9 +70,12 @@ class Publish extends Base
|
||||
}
|
||||
$pro_info = $this->production_article_obj->where('doi',$a[1])->where('state',2)->find();
|
||||
if (!$pro_info){
|
||||
$pid = $this->createEmptyProduction($v);
|
||||
$articles[$k]['refers'] = [];
|
||||
$articles[$k]['p_article_id'] = $pid;
|
||||
continue;
|
||||
}
|
||||
$articles[$k]['p_article_id'] = $pro_info['p_article_id'];
|
||||
$articles[$k]['refers'] = $this->production_article_refer_obj->where("p_article_id",$pro_info['p_article_id'])->where('state',0)->order("index")->select();
|
||||
}
|
||||
|
||||
@@ -159,6 +162,29 @@ class Publish extends Base
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**添加refer通过拷贝word的形式
|
||||
* @return void
|
||||
*/
|
||||
public function addRefersByWord(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"p_article_id"=>"require",
|
||||
"contents"=>"require|array"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
foreach ($data['contents'] as $k => $v){
|
||||
$insert['p_article_id'] = $data['p_article_id'];
|
||||
$insert['refer_frag'] = $v;
|
||||
$insert['refer_type'] = "other";
|
||||
$insert['cs'] = 0;
|
||||
$insert['index'] = $k;
|
||||
$this->production_article_refer_obj->insert($insert);
|
||||
}
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章的客座期刊信息
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user