|
@@ -96,10 +96,22 @@ class Sub extends Backend
|
|
|
}
|
|
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
|
|
|
+ // $list = $this->model
|
|
|
+ // ->where($where)
|
|
|
+ // ->where('sub',1)
|
|
|
+ // ->where('id', 'in', $this->childrenAdminIds)
|
|
|
+ // ->field(['password', 'salt', 'token'], true)
|
|
|
+ // ->order($sort, $order)
|
|
|
+ // ->paginate($limit);
|
|
|
+
|
|
|
$list = $this->model
|
|
|
+ ->alias('a')
|
|
|
->where($where)
|
|
|
- ->where('sub',1)
|
|
|
- ->where('id', 'in', $this->childrenAdminIds)
|
|
|
+ ->where('a.sub',1)
|
|
|
+ ->join('auth_group_access aga', 'a.id = aga.uid', 'LEFT')
|
|
|
+ ->group('a.id')
|
|
|
+ ->where('aga.group_id', 'in', $childrenGroupIds)
|
|
|
+ // ->where('id', 'in', $this->childrenAdminIds)
|
|
|
->field(['password', 'salt', 'token'], true)
|
|
|
->order($sort, $order)
|
|
|
->paginate($limit);
|