|
@@ -22,7 +22,6 @@ use app\admin\model\AccountLogModel;
|
|
|
use app\admin\model\UserModel;
|
|
use app\admin\model\UserModel;
|
|
|
use app\weixin\service\Member;
|
|
use app\weixin\service\Member;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* Class AdminIndexController
|
|
* Class AdminIndexController
|
|
|
* @package app\user\controller
|
|
* @package app\user\controller
|
|
@@ -353,68 +352,6 @@ class AdminIndexController extends AdminBaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 本站用户拉黑
|
|
|
|
|
- * @adminMenu(
|
|
|
|
|
- * 'name' => '本站用户拉黑',
|
|
|
|
|
- * 'parent' => 'index',
|
|
|
|
|
- * 'display'=> false,
|
|
|
|
|
- * 'hasView'=> false,
|
|
|
|
|
- * 'order' => 10000,
|
|
|
|
|
- * 'icon' => '',
|
|
|
|
|
- * 'remark' => '本站用户拉黑',
|
|
|
|
|
- * 'param' => ''
|
|
|
|
|
- * )
|
|
|
|
|
- */
|
|
|
|
|
- public function bant()
|
|
|
|
|
- {
|
|
|
|
|
- $doban=input('dobant');
|
|
|
|
|
- if(isset($doban)){
|
|
|
|
|
- $param = $this->request->param();
|
|
|
|
|
-
|
|
|
|
|
- if (isset($param['id'])) {
|
|
|
|
|
-
|
|
|
|
|
- //通过id来获取举报页面
|
|
|
|
|
- // Db::startTrans();
|
|
|
|
|
- $result=Db::name('complain')->where('id',$param['id'])->find();
|
|
|
|
|
-
|
|
|
|
|
- // var_dump($result);die;
|
|
|
|
|
- if($result){
|
|
|
|
|
- $result['freezing_choose']=$param['freezing_choose'];
|
|
|
|
|
- //进行奖励
|
|
|
|
|
- // $result = Db::name("user")->where(["id" => $id, "user_type" => 2])->setField(array('user_status'=>0,'freezing'=>input('freezing'),'freezing_choose'=>input('freezing_choose')));
|
|
|
|
|
- $result=Member::checkComplain($result['uid'],$result);
|
|
|
|
|
-
|
|
|
|
|
- if ($result) {
|
|
|
|
|
-
|
|
|
|
|
- if($param['freezing_choose']==3){
|
|
|
|
|
- $complain=Db::name('complain')->where('id', 'in', $param['id'])->update(['status' => 2]);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //发送给客户具体冻结的原因。
|
|
|
|
|
- // $this->success("会员冻结成功!", "adminIndex/index");
|
|
|
|
|
- echo 1;die;
|
|
|
|
|
- } else {
|
|
|
|
|
- //$this->error('会员冻结失败,会员不存在,或者是管理员!');
|
|
|
|
|
- echo 0;die;
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- // $this->error('数据传入失败!');
|
|
|
|
|
- echo 0;die;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
-
|
|
|
|
|
- $this->assign('id',input('id'));
|
|
|
|
|
- $this->assign('uid',input('uid'));
|
|
|
|
|
- $this->assign('c_uid',input('cuid'));
|
|
|
|
|
- return $this->fetch('bant');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
* 本站用户启用
|
|
* 本站用户启用
|
|
|
* @adminMenu(
|
|
* @adminMenu(
|
|
|
* 'name' => '本站用户启用',
|
|
* 'name' => '本站用户启用',
|
|
@@ -799,87 +736,6 @@ class AdminIndexController extends AdminBaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 已处理完的举报用户
|
|
|
|
|
- *
|
|
|
|
|
- */
|
|
|
|
|
-
|
|
|
|
|
- public function docomplain(){
|
|
|
|
|
-
|
|
|
|
|
- $data = $this->request->param();
|
|
|
|
|
- session('search',[
|
|
|
|
|
- 'uid' => isset($data['uid'])? intval($data['uid']) : 0,
|
|
|
|
|
- 'keyword' => isset($data['keyword'])? trim($data['keyword']) : '',
|
|
|
|
|
- ]);
|
|
|
|
|
- // 添加返回历史修改 by wesmiler 2020-02-16
|
|
|
|
|
- $history = isset($data['history'])? intval($data['history']) : 0;
|
|
|
|
|
- if($history){
|
|
|
|
|
- $data = session('user_search');
|
|
|
|
|
- }else{
|
|
|
|
|
- session('user_search', $data);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 修改 end
|
|
|
|
|
-
|
|
|
|
|
- //var_dump($data);die;
|
|
|
|
|
- $list = Db::name('complain')->field('u.id as ids,u.user_login,u.user_nickname,u.real_name,u.redheart,u.is_tuijian,u.create_time,u.is_heart,u.user_status,u.mobile,u.freezing,u.updated_at,u.last_login_time,c.id,c.type,c.c_uid,
|
|
|
|
|
- c.remark,c.image,c.created_time,c.status')
|
|
|
|
|
- ->alias('c')
|
|
|
|
|
- ->join('user u','u.id=c.uid','left')
|
|
|
|
|
-
|
|
|
|
|
- ->where(function (Query $query) use($data){
|
|
|
|
|
- $query->where('u.user_type', 2);
|
|
|
|
|
- $query->where('u.openid', 'not in','');
|
|
|
|
|
- $query->where('c.status', 2);
|
|
|
|
|
-
|
|
|
|
|
- //代表是否付费定制
|
|
|
|
|
- ($this->request->action()=='custom' || $this->request->param('u')==2)?$query->where('u.is_vip', 1):$query->where('u.is_vip', 0);
|
|
|
|
|
-
|
|
|
|
|
- //代表是否冻结
|
|
|
|
|
- if($this->request->action()!='userlogout' && $this->request->param('u')!=5){
|
|
|
|
|
- ($this->request->action()=='userban' || $this->request->param('u')==3)?$query->where('u.user_status', 0):$query->where('u.user_status', 1);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //代表是否筛选
|
|
|
|
|
- ($this->request->action()=='screen' || $this->request->param('u')==4)?$query->where('u.is_screen', 1):$query->where('u.is_screen', 0);
|
|
|
|
|
-
|
|
|
|
|
- //代表是否注销
|
|
|
|
|
- if($this->request->action()!='userban' && $this->request->param('u')!=3){
|
|
|
|
|
- ($this->request->action()=='userlogout' || $this->request->param('u')==5)?$query->where('u.user_status', -1):$query->where('u.user_status', 1);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- $this->screenpublic();
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- //待审核
|
|
|
|
|
- ->order("u.create_time DESC")
|
|
|
|
|
- ->paginate(10,false,['query'=>request()->param()])
|
|
|
|
|
- ->each(function($item,$key){
|
|
|
|
|
- //查询出报名人数,通过活动id
|
|
|
|
|
- $item['user_nicknamet']=Db::name('user')
|
|
|
|
|
- ->where(['id'=> $item['c_uid']])
|
|
|
|
|
- ->field('user_nickname')
|
|
|
|
|
- ->find();
|
|
|
|
|
- ;
|
|
|
|
|
-
|
|
|
|
|
- return $item;
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- ;
|
|
|
|
|
-
|
|
|
|
|
- // var_dump($data);die;
|
|
|
|
|
- //echo Db::name('user')->getLastSql();die;
|
|
|
|
|
- // 获取分页显示
|
|
|
|
|
- $page = $list->render();
|
|
|
|
|
- $this->assign('list', $list);
|
|
|
|
|
- $this->assign('page', $page);
|
|
|
|
|
- return $this->fetch('complain');
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
* 职位认证
|
|
* 职位认证
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
@@ -1765,72 +1621,6 @@ class AdminIndexController extends AdminBaseController
|
|
|
$this->fetch();
|
|
$this->fetch();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //下架处理
|
|
|
|
|
- public function unshelf(){
|
|
|
|
|
- $data=$this->request->param();
|
|
|
|
|
- if($data){
|
|
|
|
|
- Db::startTrans();
|
|
|
|
|
- $result1=Db::name('complain')->where("id",$data['ids'])->update(['status'=>1]);
|
|
|
|
|
- if($result1){
|
|
|
|
|
-
|
|
|
|
|
- $result2=Db::name('user')->where('id',$data['c_uid'])->update(['user_status'=>1]);
|
|
|
|
|
- if($result2){
|
|
|
|
|
- Db::commit();
|
|
|
|
|
- $this->success("下架成功!", url('/user/Admin_index/complain'));
|
|
|
|
|
- }else{
|
|
|
|
|
- Db::rollback();
|
|
|
|
|
- $this->error("下架失败!");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }else{
|
|
|
|
|
- Db::rollback();
|
|
|
|
|
- $this->error("下架失败!");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //进行显示反馈显示用户。
|
|
|
|
|
- public function feedback(){
|
|
|
|
|
-
|
|
|
|
|
- $list=Db::name('advices')
|
|
|
|
|
- ->alias('ad')
|
|
|
|
|
- // ->where('status',1)
|
|
|
|
|
- ->order("ad.created_time DESC")
|
|
|
|
|
- ->paginate(10,false,['query'=>request()->param()])
|
|
|
|
|
- ->each(function($item,$key){
|
|
|
|
|
- //查询出被举报名人昵称和状态。
|
|
|
|
|
- $item['user_nicknamet']=Db::name('user')
|
|
|
|
|
- ->where(['id'=> $item['uid']])
|
|
|
|
|
- ->field('user_nickname,user_status')
|
|
|
|
|
- ->find();
|
|
|
|
|
- ;
|
|
|
|
|
-
|
|
|
|
|
- return $item;
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- ;
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // 获取分页显示
|
|
|
|
|
- $page = $list->render();
|
|
|
|
|
- $this->assign('list', $list);
|
|
|
|
|
- $this->assign('page', $page);
|
|
|
|
|
- return $this->fetch('feedback');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //处理审核
|
|
|
|
|
- public function feedbackedit(){
|
|
|
|
|
- $result=Db::name('advices')->where("id",input('id'))->update(['status'=>2]);
|
|
|
|
|
- if($result){
|
|
|
|
|
- $this->success("审核处理成功!");
|
|
|
|
|
- }else{
|
|
|
|
|
- $this->error("审核处理失败!");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
//投诉举报页面
|
|
//投诉举报页面
|
|
|
public function complain(){
|
|
public function complain(){
|
|
|
$data = $this->request->param();
|
|
$data = $this->request->param();
|
|
@@ -1857,7 +1647,6 @@ class AdminIndexController extends AdminBaseController
|
|
|
->where(function (Query $query) use($data){
|
|
->where(function (Query $query) use($data){
|
|
|
$query->where('u.user_type', 2);
|
|
$query->where('u.user_type', 2);
|
|
|
$query->where('u.openid', 'not in','');
|
|
$query->where('u.openid', 'not in','');
|
|
|
- $query->where('c.status', 1);
|
|
|
|
|
|
|
|
|
|
//代表是否付费定制
|
|
//代表是否付费定制
|
|
|
($this->request->action()=='custom' || $this->request->param('u')==2)?$query->where('u.is_vip', 1):$query->where('u.is_vip', 0);
|
|
($this->request->action()=='custom' || $this->request->param('u')==2)?$query->where('u.is_vip', 1):$query->where('u.is_vip', 0);
|
|
@@ -1885,10 +1674,10 @@ class AdminIndexController extends AdminBaseController
|
|
|
->order("u.create_time DESC")
|
|
->order("u.create_time DESC")
|
|
|
->paginate(10,false,['query'=>request()->param()])
|
|
->paginate(10,false,['query'=>request()->param()])
|
|
|
->each(function($item,$key){
|
|
->each(function($item,$key){
|
|
|
- //查询出被举报名人昵称和状态。
|
|
|
|
|
|
|
+ //查询出报名人数,通过活动id
|
|
|
$item['user_nicknamet']=Db::name('user')
|
|
$item['user_nicknamet']=Db::name('user')
|
|
|
->where(['id'=> $item['c_uid']])
|
|
->where(['id'=> $item['c_uid']])
|
|
|
- ->field('user_nickname,user_status')
|
|
|
|
|
|
|
+ ->field('user_nickname')
|
|
|
->find();
|
|
->find();
|
|
|
;
|
|
;
|
|
|
|
|
|