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