This commit is contained in:
wangjinlei
2021-09-06 14:10:10 +08:00
parent a01308bf14
commit b4f5cd59bb
5 changed files with 344 additions and 7 deletions

View File

@@ -299,7 +299,10 @@ class Chief extends Controller {
*/
public function addChiefHas(){
$data = $this->request->post();
$check = $this->chief_to_journal_obj->where('user_id',$data['user_id'])->where('journal_id',$data['journal_id'])->where('state',0)->find();
$check = $this->chief_to_journal_obj
->where('user_id',$data['user_id'])
->where('journal_id',$data['journal_id'])
->where('state',0)->find();
if($check!=null){
return jsonError('has register!');
}
@@ -731,10 +734,12 @@ class Chief extends Controller {
* @method POST
*
* @param name:article_id type:int require:1 desc:文章id
*
* @return boards:编委列表#
*/
public function getArticleBoard(){
$data = $this->request->post();
$list = $this->article_to_board_obj->where('article_id',$data['article_id'])->where('state',0)->select();
$list = $this->article_to_board_obj->join('t_user','t_user.user_id = t_article_to_board.board_id','left')->where('t_article_to_board.article_id',$data['article_id'])->where('t_article_to_board.state',0)->select();
$re['boards'] = $list;
return jsonSuccess($re);