@@ -36,7 +36,11 @@ class UserService
|
||||
{
|
||||
$page = (int)$params['page'] ?: 1;
|
||||
$limit = (int)$params['limit'] ?: 10;
|
||||
$status = !empty($params['status']) ? $params['status']-1:1;
|
||||
|
||||
if(!empty($params['status']))
|
||||
{
|
||||
$where[]=['status','=',$params['status']==1?0:1];
|
||||
}
|
||||
|
||||
if (!empty($params['nickname'])) {
|
||||
$where[] = ['nickname','like','%'.$params['nickname'].'%'];
|
||||
@@ -45,7 +49,7 @@ class UserService
|
||||
if (!empty($params['group_id'])) {
|
||||
$where[] = ['group_id','find in set',$params['group_id']];
|
||||
}
|
||||
$where[]=['status','=',$status];
|
||||
|
||||
$conditions = array_merge($conditions, $where ?? []);
|
||||
|
||||
$model = new User();
|
||||
|
||||
Reference in New Issue
Block a user