|
@@ -47,32 +47,64 @@ class Member extends Controller
|
|
|
public function index()
|
|
|
{
|
|
|
$this->title = '会员信息管理';
|
|
|
- $query = $this->_query($this->table)->alias('a')->field('a.*')
|
|
|
- ->where('a.is_deleted',0)
|
|
|
- ->leftJoin('store_order_info b','a.id=b.mid');
|
|
|
- if (isset($_GET['name']) && $_GET['name']){
|
|
|
- $query->where('a.name','like','%'.$_GET['name'].'%');
|
|
|
- }
|
|
|
- if (isset($_GET['phone']) && $_GET['phone']){
|
|
|
- $query->where('a.phone','like','%'.$_GET['phone'].'%');
|
|
|
- }
|
|
|
- if (isset($_GET['status']) && $_GET['status']!=''){
|
|
|
- $query->where('a.status',$_GET['status']);
|
|
|
- }
|
|
|
- if (isset($_GET['create_at']) && $_GET['create_at']){
|
|
|
- $time = explode(' - ',$_GET['create_at']);
|
|
|
- $start_date_time = $time[0].' 00:00:00';
|
|
|
- $end_date_time = $time[1].' 23:59:59';
|
|
|
- $query->whereBetweenTime('a.create_at',$start_date_time,$end_date_time);
|
|
|
- }
|
|
|
if (isset($_GET['coll_id']) && $_GET['coll_id']!=''){
|
|
|
- $query->where('b.c_id','in',$_GET['coll_id']);
|
|
|
- }
|
|
|
+ $query = $this->_query($this->table)->alias('a')->field('a.*')
|
|
|
+ ->where('a.is_deleted',0)
|
|
|
+ ->leftJoin('store_order_info b','a.id=b.mid');
|
|
|
+ if (isset($_GET['name']) && $_GET['name']){
|
|
|
+ $query->where('a.name','like','%'.$_GET['name'].'%');
|
|
|
+ }
|
|
|
+ if (isset($_GET['phone']) && $_GET['phone']){
|
|
|
+ $query->where('a.phone','like','%'.$_GET['phone'].'%');
|
|
|
+ }
|
|
|
+ if (isset($_GET['status']) && $_GET['status']!=''){
|
|
|
+ $query->where('a.status',$_GET['status']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['is_auth']) && $_GET['is_auth']!=''){
|
|
|
+ $query->where('a.is_auth',$_GET['is_auth']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['yeepay_wallet']) && $_GET['yeepay_wallet']!=''){
|
|
|
+ $query->where('a.yeepay_wallet',$_GET['yeepay_wallet']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['create_at']) && $_GET['create_at']){
|
|
|
+ $time = explode(' - ',$_GET['create_at']);
|
|
|
+ $start_date_time = $time[0].' 00:00:00';
|
|
|
+ $end_date_time = $time[1].' 23:59:59';
|
|
|
+ $query->whereBetweenTime('a.create_at',$start_date_time,$end_date_time);
|
|
|
+ }
|
|
|
+ if (isset($_GET['coll_id']) && $_GET['coll_id']!=''){
|
|
|
+ $query->where('b.c_id','in',$_GET['coll_id']);
|
|
|
+ }
|
|
|
|
|
|
- $query->where('b.is_destruction',1)
|
|
|
- ->where('b.status','neq',2)
|
|
|
- ->group('b.mid')
|
|
|
- ->page();
|
|
|
+ $query->where('b.is_destruction',1)
|
|
|
+ ->where('b.status','neq',2)
|
|
|
+ ->group('b.mid')
|
|
|
+ ->page();
|
|
|
+ }else{
|
|
|
+ $query = $this->_query($this->table)->where('is_deleted',0);
|
|
|
+ if (isset($_GET['name']) && $_GET['name']){
|
|
|
+ $query->where('name','like','%'.$_GET['name'].'%');
|
|
|
+ }
|
|
|
+ if (isset($_GET['phone']) && $_GET['phone']){
|
|
|
+ $query->where('phone','like','%'.$_GET['phone'].'%');
|
|
|
+ }
|
|
|
+ if (isset($_GET['status']) && $_GET['status']!=''){
|
|
|
+ $query->where('status',$_GET['status']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['is_auth']) && $_GET['is_auth']!=''){
|
|
|
+ $query->where('is_auth',$_GET['is_auth']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['yeepay_wallet']) && $_GET['yeepay_wallet']!=''){
|
|
|
+ $query->where('yeepay_wallet',$_GET['yeepay_wallet']);
|
|
|
+ }
|
|
|
+ if (isset($_GET['create_at']) && $_GET['create_at']){
|
|
|
+ $time = explode(' - ',$_GET['create_at']);
|
|
|
+ $start_date_time = $time[0].' 00:00:00';
|
|
|
+ $end_date_time = $time[1].' 23:59:59';
|
|
|
+ $query->whereBetweenTime('create_at',$start_date_time,$end_date_time);
|
|
|
+ }
|
|
|
+ $query->page();
|
|
|
+ }
|
|
|
}
|
|
|
/**
|
|
|
* 数据列表处理
|