20201112
This commit is contained in:
@@ -112,7 +112,6 @@ class Special extends Controller {
|
||||
*
|
||||
* @param name:journal_special_id type:int require:1 desc:客座期刊id
|
||||
* @param name:state type:int require:1 desc:状态(0:初始1:拒绝2:通过)
|
||||
*
|
||||
*/
|
||||
public function changeSpecialState(){
|
||||
$data = $this->request->post();
|
||||
@@ -147,18 +146,133 @@ class Special extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊(获取详情信息)
|
||||
* @description 客座期刊(获取详情信息)
|
||||
* @title 客座期刊(编辑客座期刊基础信息)
|
||||
* @description 客座期刊(编辑客座期刊基础信息)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/getSpecialDetail
|
||||
* @url /master/Special/editSpecialBasic
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_special_id type:int require:1 desc:客座期刊id
|
||||
* @param name:title type:string require:1 desc:标题
|
||||
* @param name:intro type:string require:1 desc:简介
|
||||
* @param name:abstract type:string require:1 desc:描述
|
||||
* @param name:keywords type:string require:1 desc:关键字
|
||||
* @param name:deadline type:int require:1 desc:截止日期
|
||||
*
|
||||
* @return special:客座期刊信息
|
||||
* @return editors:作者array#
|
||||
*/
|
||||
public function editSpecial(){
|
||||
public function editSpecialBasic(){
|
||||
$data = $this->request->post();
|
||||
$update['title'] = $data['title'];
|
||||
$update['intro'] = $data['intro'];
|
||||
$update['abstract'] = $data['abstract'];
|
||||
$update['keywords'] = $data['keywords'];
|
||||
$update['deadline'] = $data['deadline'];
|
||||
$this->journal_special_obj->where('journal_special_id',$data['journal_special_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(添加编辑)
|
||||
* @description 客座期刊编辑(添加编辑)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/addSpecialEditor
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:email type:string require:1 desc:邮箱
|
||||
* @param name:first_name type:string require:1 desc:名字
|
||||
* @param name:last_name type:string require:1 desc:名字
|
||||
* @param name:address type:string require:1 desc:地址
|
||||
* @param name:interests type:string require:0 desc:兴趣
|
||||
* @param name:website type:string require:0 desc:编辑主页
|
||||
* @param name:orcid type:string require:0 desc:orcid
|
||||
*/
|
||||
public function addSpecialEditor(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_id'] = $data['journal_id'];
|
||||
$insert['email'] = $data['email'];
|
||||
$insert['first_name'] = $data['first_name'];
|
||||
$insert['last_name'] = $data['last_name'];
|
||||
$insert['address'] = $data['address'];
|
||||
$insert['interests'] = $data['interests'];
|
||||
$insert['website'] = $data['website'];
|
||||
$insert['orcid'] = $data['orcid'];
|
||||
$this->journal_special_editor_obj->insert();
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(更改编辑)
|
||||
* @description 客座期刊编辑(更改编辑)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/editSpecialEditor
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_special_editor_id type:int require:1 desc:客座期刊编辑id
|
||||
* @param name:email type:string require:1 desc:邮箱
|
||||
* @param name:first_name type:string require:1 desc:名字
|
||||
* @param name:last_name type:string require:1 desc:名字
|
||||
* @param name:address type:string require:1 desc:地址
|
||||
* @param name:interests type:string require:0 desc:兴趣
|
||||
* @param name:website type:string require:0 desc:编辑主页
|
||||
* @param name:orcid type:string require:0 desc:orcid
|
||||
*/
|
||||
public function editSpecialEditor(){
|
||||
$data = $this->request->post();
|
||||
$update['email'] = $data['email'];
|
||||
$update['first_name'] = $data['first_name'];
|
||||
$update['last_name'] = $data['last_name'];
|
||||
$update['address'] = $data['address'];
|
||||
$update['interests'] = $data['interests'];
|
||||
$update['website'] = $data['website'];
|
||||
$update['orcid'] = $data['orcid'];
|
||||
$this->journal_special_editor_obj->where('journal_special_editor_id',$data['journal_special_editor_id'])->update($update);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(获取编辑列表,除去已经建立联系的)
|
||||
* @description 客座期刊编辑(获取编辑列表,除去已经建立联系的)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/getSpecialEditors
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:journal_special_id type:int require:1 desc:客座期刊编辑id
|
||||
*
|
||||
* @return editors:编辑列表array#
|
||||
*/
|
||||
public function getSpecialEditors(){
|
||||
$data = $this->request->post();
|
||||
$cids = $this->journal_special_to_editor_obj->where('journal_special_id',$data['journal_special_id'])->where('state',0)->column('journal_special_editor_id');
|
||||
$list = $this->journal_special_editor_obj->where('journal_special_editor_id','not in',$cids)->where('state',0)->select();
|
||||
|
||||
$re['editors'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(添加客座期刊与作者的对应关系)
|
||||
* @description 客座期刊编辑(添加客座期刊与作者的对应关系)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/addSpecialToEditor
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
* @param name:journal_special_id type:int require:1 desc:客座期刊编辑id
|
||||
* @param name:journal_special_editor_id type:int require:1 desc:客座期刊编辑id
|
||||
*/
|
||||
public function addSpecialToEditor(){
|
||||
$data = $this->request->post();
|
||||
$insert['journal_special_id'] = $data['journal_special_id'];
|
||||
$insert['journal_special_editor_id'] = $data['journal_special_editor_id'];
|
||||
$insert['journal_id'] = $data['journal_id'];
|
||||
|
||||
$this->journal_special_to_editor_obj->insert($insert);
|
||||
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user