优化用户立标
This commit is contained in:
parent
00a37a05f2
commit
0df821d1a4
@ -27,13 +27,12 @@ class User extends CatchController
|
||||
/**
|
||||
*
|
||||
* @time 2020年04月24日
|
||||
* @param Request $request
|
||||
* @throws \think\db\exception\DbException
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function index(Request $request)
|
||||
public function index()
|
||||
{
|
||||
return CatchResponse::paginate($this->user->getList($request->param()));
|
||||
return CatchResponse::paginate($this->user->getList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ namespace catchAdmin\permissions\model;
|
||||
|
||||
use catchAdmin\permissions\model\search\UserSearch;
|
||||
use catcher\base\CatchModel;
|
||||
use catcher\exceptions\FailedException;
|
||||
|
||||
class Users extends CatchModel
|
||||
{
|
||||
@ -52,7 +53,7 @@ class Users extends CatchModel
|
||||
return $this->withoutField(['updated_at'], true)
|
||||
->catchSearch()
|
||||
->catchLeftJoin(Department::class, 'id', 'department_id', ['department_name'])
|
||||
->order($this->getTable() . '.id', 'desc')
|
||||
->order($this->aliasField('id'), 'desc')
|
||||
->paginate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user