This commit is contained in:
wangjinlei
2022-09-29 07:50:12 +08:00
parent 63d4ffffaf
commit 949fa3f9b3
5 changed files with 121 additions and 9 deletions

View File

@@ -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);