1
This commit is contained in:
@@ -34,6 +34,8 @@ class Chief extends Controller {
|
||||
protected $chief_msg_obj = '';
|
||||
protected $article_to_board_obj = '';
|
||||
protected $login_auto_obj = '';
|
||||
protected $user_index_obj = '';
|
||||
protected $user_email_index_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -59,6 +61,8 @@ class Chief extends Controller {
|
||||
$this->article_to_board_obj = Db::name('article_to_board');
|
||||
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
||||
$this->login_auto_obj = Db::name('login_auto');
|
||||
$this->user_index_obj = Db::name('user_index');
|
||||
$this->user_email_index_obj = Db::name('user_email_index');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -852,7 +856,18 @@ class Chief extends Controller {
|
||||
*/
|
||||
public function getJournalBoard(){
|
||||
$data = $this->request->post();
|
||||
$boards = $this->board_to_journal_obj->join('t_user','t_user.user_id = t_board_to_journal.user_id','LEFT')->where('t_board_to_journal.journal_id',$data['journal_id'])->where('t_board_to_journal.state',0)->select();
|
||||
$boards = $this->board_to_journal_obj
|
||||
->join('t_user','t_user.user_id = t_board_to_journal.user_id','LEFT')
|
||||
->where('t_board_to_journal.journal_id',$data['journal_id'])
|
||||
->where('t_board_to_journal.state',0)
|
||||
->select();
|
||||
|
||||
foreach($boards as $k => $v){
|
||||
$boards[$k]['indexs'] = $this->user_index_obj
|
||||
->where('user_id',$v['user_id'])
|
||||
->where('state',0)
|
||||
->order('year')->select();
|
||||
}
|
||||
|
||||
$re['boards']=$boards;
|
||||
return jsonSuccess($re);
|
||||
|
||||
Reference in New Issue
Block a user