1
This commit is contained in:
@@ -36,6 +36,8 @@ class User extends Controller
|
||||
protected $user_to_special_obj = '';
|
||||
protected $user_register_check_obj = '';
|
||||
protected $user_cert_obj = '';
|
||||
protected $apply_board_obj = '';
|
||||
protected $apply_yboard_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null)
|
||||
{
|
||||
@@ -58,6 +60,8 @@ class User extends Controller
|
||||
$this->user_to_special_obj = Db::name('user_to_special');
|
||||
$this->user_register_check_obj = Db::name('user_register_check');
|
||||
$this->user_cert_obj = Db::name('user_cert');
|
||||
$this->apply_board_obj = Db::name('apply_board');
|
||||
$this->apply_yboard_obj = Db::name('apply_yboard');
|
||||
}
|
||||
|
||||
public function pstest(){
|
||||
@@ -125,6 +129,22 @@ class User extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户评价
|
||||
*/
|
||||
public function userScore(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'user_id'=>'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 为所有用户发送邮件
|
||||
*/
|
||||
@@ -302,6 +322,66 @@ class User extends Controller
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function getBoardApplys(){
|
||||
$data = $this->request->post();
|
||||
$rules = new Validate([
|
||||
'editor_id' => 'require'
|
||||
]);
|
||||
if (!$rules->check($data)) {
|
||||
return jsonError($rules->getError());
|
||||
}
|
||||
$ids = $this->journal_obj->where('editor_id',$data['editor_id'])->column('journal_id');
|
||||
$list = $this->apply_board_obj
|
||||
->field("t_journal.title,t_apply_board.*,t_user.account,t_user.email,t_user.realname")
|
||||
->join("t_journal",'t_journal.journal_id = t_apply_board.journal_id','left')
|
||||
->join("t_user","t_user.user_id = t_apply_board.user_id",'left')
|
||||
->where('t_apply_board.journal_id','in',$ids)->where('t_apply_board.state',0)->select();
|
||||
$re['applys'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function delBoardApply(){
|
||||
$data = $this->request->post();
|
||||
$rules = new Validate([
|
||||
'ap_board_id' => 'require'
|
||||
]);
|
||||
if (!$rules->check($data)) {
|
||||
return jsonError($rules->getError());
|
||||
}
|
||||
$this->apply_board_obj->where('ap_board_id',$data['ap_board_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
public function getYboardApplys(){
|
||||
$data = $this->request->post();
|
||||
$rules = new Validate([
|
||||
'editor_id' => 'require'
|
||||
]);
|
||||
if (!$rules->check($data)) {
|
||||
return jsonError($rules->getError());
|
||||
}
|
||||
$ids = $this->journal_obj->where('editor_id',$data['editor_id'])->column('journal_id');
|
||||
$list = $this->apply_yboard_obj
|
||||
->field("t_journal.title,t_apply_yboard.*,t_user.account,t_user.email,t_user.realname")
|
||||
->join("t_journal",'t_journal.journal_id = t_apply_yboard.journal_id','left')
|
||||
->join("t_user","t_user.user_id = t_apply_yboard.user_id",'left')
|
||||
->where('t_apply_yboard.journal_id','in',$ids)->where('t_apply_yboard.state',0)->select();
|
||||
$re['applys'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
public function delYboardApply(){
|
||||
$data = $this->request->post();
|
||||
$rules = new Validate([
|
||||
'ap_yboard_id' => 'require'
|
||||
]);
|
||||
if (!$rules->check($data)) {
|
||||
return jsonError($rules->getError());
|
||||
}
|
||||
$this->apply_yboard_obj->where('ap_yboard_id',$data['ap_yboard_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加用户
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user