优化用户立标

This commit is contained in:
JaguarJack 2020-05-22 15:21:05 +08:00
parent 00a37a05f2
commit 0df821d1a4
2 changed files with 4 additions and 4 deletions

View File

@ -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());
}
/**

View File

@ -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();
}