修改用户
This commit is contained in:
parent
08aee72ab9
commit
7f72784bfb
@ -26,10 +26,10 @@ class User extends CatchController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @time 2019年12月04日
|
* @time 2020年04月24日
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @return string
|
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
|
@ -44,17 +44,16 @@ class Users extends CatchModel
|
|||||||
* 用户列表
|
* 用户列表
|
||||||
*
|
*
|
||||||
* @time 2019年12月08日
|
* @time 2019年12月08日
|
||||||
* @param $search
|
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
* @return \think\Paginator
|
* @return \think\Paginator
|
||||||
*/
|
*/
|
||||||
public function getList($search): \think\Paginator
|
public function getList(): \think\Paginator
|
||||||
{
|
{
|
||||||
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->getTable() . '.id', 'desc')
|
||||||
->paginate($search['limit'] ?? parent::LIMIT);
|
->paginate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user