|
|
@@ -46,7 +46,13 @@ class Role extends RoleModel
|
|
|
private function getAll()
|
|
|
{
|
|
|
// 获取列表数据
|
|
|
+ $type = input('type', 0);
|
|
|
$list = $this->addHidden(['roleMenu'])
|
|
|
+ ->where(function ($query) use($type){
|
|
|
+ if($type>0){
|
|
|
+ $query->where('type', $type);
|
|
|
+ }
|
|
|
+ })
|
|
|
->with(['roleMenu'])
|
|
|
->order(['sort' => 'asc', 'create_time' => 'asc'])
|
|
|
->select();
|