|
@@ -559,161 +559,7 @@ class MarketController extends AdminBaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- //显示子级用户显示
|
|
|
|
|
- public function Markettwouser(){
|
|
|
|
|
-
|
|
|
|
|
- $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('user')->field('u.id,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,last_login_time,up.idcard,
|
|
|
|
|
- up.idcard_check,up.position_check,up.education_check')
|
|
|
|
|
- ->alias('u')
|
|
|
|
|
- ->join('user_profile up','u.id=up.userid','left')
|
|
|
|
|
-
|
|
|
|
|
- ->where(function (Query $query) use($data){
|
|
|
|
|
- $query->where('u.user_type', 2);
|
|
|
|
|
- $query->where('u.openid', 'not in','');
|
|
|
|
|
- $query->where('u.agent_type',1);
|
|
|
|
|
-
|
|
|
|
|
- //代表是否付费定制
|
|
|
|
|
- ($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);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //$data = $this->request->param();
|
|
|
|
|
- if (!empty($data['uid'])) {
|
|
|
|
|
- $query->where('u.id', intval($data['uid']));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!empty($data['keyword'])) {
|
|
|
|
|
- $keyword = $data['keyword'];
|
|
|
|
|
- $query->where('u.user_nickname|u.real_name|u.mobile', 'like', "%$keyword%");
|
|
|
|
|
- }
|
|
|
|
|
- //年龄区间查询
|
|
|
|
|
- if((!empty($data['age1']) && $data['age1']!='none') && (!empty($data['age2']) && $data['age2']!='none')){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('u.birthday',['>',strtotime($data['age1'])],['<',strtotime($data['age2'])],'and');
|
|
|
|
|
- $query->whereNotNull('u.birthday');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // //只有第一个年龄的情况下
|
|
|
|
|
- if((!empty($data['age1']) && $data['age1']!='none') && (empty($data['age2']) || $data['age2']=='none')){
|
|
|
|
|
- $birthday = $data['age1'];
|
|
|
|
|
- $query->whereRaw("YEAR(from_unixtime(u.`birthday`))=$birthday and u.birthday is not null ");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // //只有第二个年龄的情况下
|
|
|
|
|
- if((empty($data['age1']) || $data['age1']=='none') && (!empty($data['age2']) && $data['age2']!='none')){
|
|
|
|
|
- $birthday = $data['age2'];
|
|
|
|
|
- $query->whereRaw("YEAR(from_unixtime(u.`birthday`))=$birthday and u.birthday is not null ");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //身高区间查询
|
|
|
|
|
-
|
|
|
|
|
- if((!empty(input('height')) && input('height')!='none') && (!empty(input('heightt')) && input('heightt')!='none')){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.height',['>',input('height')],['<',input('heightt')],'and');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //身高第一个查找
|
|
|
|
|
- if((!empty(input('height')) && input('height')!='none') && (empty(input('heightt')) || input('heightt')=='none')){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.height',input('height'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //身高第二个查找
|
|
|
|
|
- if((empty(input('height')) ||input('height')=='none') && (!empty(input('heightt')) && input('heightt')!='none')){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.height',input('heightt'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //学历
|
|
|
|
|
- if((!empty(input('education')) && input('education')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.education',input('education'));
|
|
|
|
|
- }
|
|
|
|
|
- //职位
|
|
|
|
|
- if((!empty(input('occupation')) && input('occupation')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.occupation',input('occupation'));
|
|
|
|
|
- }
|
|
|
|
|
- //收入
|
|
|
|
|
- if((!empty(input('salary')) && input('salary')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.salary',input('salary'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //资产
|
|
|
|
|
- if((!empty(input('property')) && input('property')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.property',input('property'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //家乡
|
|
|
|
|
- if((!empty(input('home_city')) && input('home_city')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.home_province|up.home_city','like','%'.input('home_city').'%','or');
|
|
|
|
|
- }
|
|
|
|
|
- //居住地(市)
|
|
|
|
|
-
|
|
|
|
|
- if((!empty(input('city')) && input('city')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.city','like','%'.input('city').'%');
|
|
|
|
|
- }
|
|
|
|
|
- //婚姻状况
|
|
|
|
|
- if((!empty(input('married')) && input('married')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('up.married',input('married'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //性别
|
|
|
|
|
- if((!empty(input('sex')) && input('sex')!='none') ){
|
|
|
|
|
-
|
|
|
|
|
- $query->where('u.sex',input('sex'));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- //待审核
|
|
|
|
|
- ->order("u.create_time DESC")
|
|
|
|
|
- ->paginate(10,false,['query'=>request()->param()]);
|
|
|
|
|
- // echo Db::name('user')->getLastSql();die;
|
|
|
|
|
- // 获取分页显示
|
|
|
|
|
- $page = $list->render();
|
|
|
|
|
- $this->assign('list', $list);
|
|
|
|
|
- $this->assign('page', $page);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- return $this->fetch();
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -831,10 +677,13 @@ class MarketController extends AdminBaseController
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
- ->field('blog.*,u.user_nickname')
|
|
|
|
|
|
|
+ ->field('blog.*,u.user_nickname,u.real_name')
|
|
|
->find();
|
|
->find();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $source_username= Db::name('user')->where(['id'=> $balance_log['source_uid'], 'user_type'=> 2])->field('user_nickname')->find();
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ $this->assign('source_username',$source_username['user_nickname']);
|
|
|
$this->assign($balance_log);
|
|
$this->assign($balance_log);
|
|
|
return $this->fetch();
|
|
return $this->fetch();
|
|
|
|
|
|
|
@@ -1170,6 +1019,57 @@ class MarketController extends AdminBaseController
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //显示分销员提现记录
|
|
|
|
|
+ public function withdrawrecord(){
|
|
|
|
|
+
|
|
|
|
|
+ $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
|
|
|
|
|
+
|
|
|
|
|
+ $list = Db::name('user_balance_log')
|
|
|
|
|
+
|
|
|
|
|
+ ->alias('ub')
|
|
|
|
|
+ ->join('user u','u.id = ub.user_id','left')
|
|
|
|
|
+ ->where(function (Query $query) use($data){
|
|
|
|
|
+
|
|
|
|
|
+ $query->where('ub.type', 1);
|
|
|
|
|
+ $query->where('ub.status',2); //已审核
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ ->field('ub.*,u.user_nickname,u.real_name')
|
|
|
|
|
+
|
|
|
|
|
+ //待审核
|
|
|
|
|
+ ->order("ub.create_time DESC")
|
|
|
|
|
+ ->paginate(10,false,['query'=>request()->param()])
|
|
|
|
|
+ ->each(function($item,$key){
|
|
|
|
|
+
|
|
|
|
|
+ $item['source_username'] = Db::name('user')->where(['id'=> $item['source_uid'], 'user_type'=> 2])->field('real_name,user_nickname')->find();
|
|
|
|
|
+
|
|
|
|
|
+ return $item;
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ ;
|
|
|
|
|
+ //echo Db::name('user')->getLastSql();die;
|
|
|
|
|
+ // 获取分页显示
|
|
|
|
|
+ $page = $list->render();
|
|
|
|
|
+ $this->assign('list', $list);
|
|
|
|
|
+ $this->assign('page', $page);
|
|
|
|
|
+
|
|
|
|
|
+ return $this->fetch('marketwithdraw');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|