|
|
@@ -635,25 +635,26 @@ class MemberService extends BaseService
|
|
|
];
|
|
|
}
|
|
|
|
|
|
- $list = $this->model->with(['account'])
|
|
|
- ->where(['parent_id'=>$userId,'mark'=>1])
|
|
|
+ $list = $this->model->with(['account'])->from('member as a')
|
|
|
+ ->leftJoin('account_statistics as b','b.user_id','=','a.id')
|
|
|
+ ->where(['a.parent_id'=>$userId,'b.state'=>1,'a.mark'=>1])
|
|
|
->where(function($query) use($params){
|
|
|
$keyword = isset($params['keyword'])? $params['keyword'] : '';
|
|
|
if($keyword){
|
|
|
$query->where(function($query) use($keyword){
|
|
|
- $query->where('realname','like',"%{$keyword}%")
|
|
|
- ->orWhere('nickname','like',"%{$keyword}%")
|
|
|
- ->orWhere('mobile','like',"%{$keyword}%");
|
|
|
+ $query->where('a.realname','like',"%{$keyword}%")
|
|
|
+ ->orWhere('a.nickname','like',"%{$keyword}%")
|
|
|
+ ->orWhere('a.mobile','like',"%{$keyword}%");
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
- ->select(['id','realname','mobile','nickname','parent_id','avatar','is_auth','create_time','status'])
|
|
|
- ->orderBy('id','desc')
|
|
|
+ ->select(['a.id','a.realname','a.mobile','a.nickname','a.parent_id','a.avatar','a.is_auth','a.status'])
|
|
|
+ ->orderBy('a.id','desc')
|
|
|
->paginate($pageSize > 0 ? $pageSize : 9999999);
|
|
|
$list = $list? $list->toArray() :[];
|
|
|
$total = isset($list['total'])? $list['total'] : 0;
|
|
|
if($total){
|
|
|
- RedisService::set($cacheKey, $list, rand(10,20));
|
|
|
+ RedisService::set($cacheKey, $list, rand(5,10));
|
|
|
}
|
|
|
return [
|
|
|
'pageSize'=> $pageSize,
|
|
|
@@ -663,6 +664,11 @@ class MemberService extends BaseService
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public function settingPoint($userId, $params)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 账号注销
|
|
|
* @param $userId
|