修改排序
This commit is contained in:
parent
6977442b05
commit
13d3734dba
@ -38,7 +38,7 @@ class Department extends CatchModel
|
||||
return $this->withoutField(['department_name'])
|
||||
->addFields(['department_name as title'])
|
||||
->catchSearch()
|
||||
->order()
|
||||
->catchOrder()
|
||||
->select()->toArray();
|
||||
}
|
||||
}
|
||||
|
@ -44,8 +44,7 @@ class Permissions extends CatchModel
|
||||
public function getList($isMenu = false)
|
||||
{
|
||||
return $this->catchSearch()
|
||||
->order('sort', 'desc')
|
||||
->order('id', 'desc')
|
||||
->catchOrder()
|
||||
->when($isMenu, function ($query){
|
||||
$query->where('type', self::MENU_TYPE);
|
||||
})
|
||||
@ -74,7 +73,7 @@ class Permissions extends CatchModel
|
||||
'route', 'icon', 'component', 'redirect',
|
||||
'keepalive as keepAlive', 'hide_children_in_menu', 'type', 'permission_mark', 'status'
|
||||
])
|
||||
->order()
|
||||
->catchOrder()
|
||||
->select();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user