This commit is contained in:
wangjinlei
2021-01-14 18:03:29 +08:00
parent 0386c4b02f
commit 51e1fcb18e
2 changed files with 61 additions and 4 deletions

View File

@@ -242,14 +242,21 @@ class Special extends Controller {
*
* @param name:journal_id type:int require:1 desc:期刊id
* @param name:journal_special_id type:int require:1 desc:客座期刊编辑id
* @param name:pageIndex type:int require:1 desc:当前页码数
* @param name:pageSize type:int require:1 desc:单页数据条数
*
* @return count:总数
* @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();
$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');
$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();
$re['count'] = $count;
$re['editors'] = $list;
return jsonSuccess($re);
}