20201112
This commit is contained in:
@@ -1131,7 +1131,7 @@ class Journal extends Controller {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$rearr = $journal_info['relate']==''?[]:explode(',',$journal_info['relate']);
|
||||
if(count($rearr)>3){
|
||||
if(count($rearr)>4){
|
||||
return jsonError('No more than four');
|
||||
}
|
||||
$rearr[] = $data['relat_id'];
|
||||
|
||||
@@ -94,6 +94,13 @@ class Special extends Controller {
|
||||
$frag = $frag == ''?$val['first_name'].' '.$val['last_name']:','.$val['first_name'].' '.$val['last_name'];
|
||||
}
|
||||
$list[$k]['editor'] = $frag;
|
||||
|
||||
$sq = $this->journal_special_to_editor_obj->where('journal_special_id',$v['journal_special_id'])->where('state',2)->select();
|
||||
if(count($sq)>0){
|
||||
$list[$k]['has_sq'] = 1;
|
||||
}else{
|
||||
$list[$k]['has_sq'] = 0;
|
||||
}
|
||||
}
|
||||
$count = $this->journal_special_obj->where($where)->count();
|
||||
|
||||
@@ -130,6 +137,7 @@ class Special extends Controller {
|
||||
*
|
||||
* @return special:客座期刊信息
|
||||
* @return editors:作者array#
|
||||
* @return applys:申请array#
|
||||
*/
|
||||
public function getSpecialDetail(){
|
||||
$data = $this->request->post();
|
||||
@@ -139,9 +147,15 @@ class Special extends Controller {
|
||||
->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id'])
|
||||
->where('j_journal_special_to_editor.state',0)
|
||||
->select();
|
||||
|
||||
$applys = $this->journal_special_to_editor_obj->field('j_journal_special_to_editor.journal_special_to_editor_id,j_journal_special_editor.*')
|
||||
->join('j_journal_special_editor','j_journal_special_editor.journal_special_editor_id = j_journal_special_to_editor.journal_special_editor_id','LEFT')
|
||||
->where('j_journal_special_to_editor.journal_special_id',$data['journal_special_id'])
|
||||
->where('j_journal_special_to_editor.state',2)
|
||||
->select();
|
||||
|
||||
$re['special'] = $special_info;
|
||||
$re['editors'] = $editor_list;
|
||||
$re['applys'] = $applys;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
@@ -252,7 +266,7 @@ class Special extends Controller {
|
||||
$data = $this->request->post();
|
||||
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
|
||||
|
||||
$cids = $this->journal_special_to_editor_obj->where('journal_special_id',$data['journal_special_id'])->where('state',0)->column('journal_special_editor_id');
|
||||
$cids = $this->journal_special_to_editor_obj->where('journal_special_id',$data['journal_special_id'])->where('state','<>',1)->column('journal_special_editor_id');
|
||||
$list = $this->journal_special_editor_obj->where('journal_special_editor_id','not in',$cids)->where('state',0)->limit($limit_start,$data['pageSize'])->select();
|
||||
$count = $this->journal_special_editor_obj->where('journal_special_editor_id','not in',$cids)->where('state',0)->count();
|
||||
|
||||
@@ -301,4 +315,34 @@ class Special extends Controller {
|
||||
->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(通过申请)
|
||||
* @description 客座期刊编辑(通过申请)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/adoptEditor
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_special_to_editor_id type:int require:1 desc:期刊编辑链接id
|
||||
*/
|
||||
public function adoptEditor(){
|
||||
$data = $this->request->post();
|
||||
$this->journal_special_to_editor_obj->where('journal_special_to_editor_id',$data['journal_special_to_editor_id'])->update(['state'=>0]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 客座期刊编辑(拒绝申请)
|
||||
* @description 客座期刊编辑(拒绝申请)
|
||||
* @author wangjinlei
|
||||
* @url /master/Special/refuseEditor
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_special_to_editor_id type:int require:1 desc:期刊编辑链接id
|
||||
*/
|
||||
public function refuseEditor(){
|
||||
$data = $this->request->post();
|
||||
$this->journal_special_to_editor_obj->where('journal_special_to_editor_id',$data['journal_special_to_editor_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user