支持查询&统一样式(菜单管理,部门管理)
This commit is contained in:
@ -42,9 +42,9 @@ public class DeptController extends BaseController
|
||||
@RequiresPermissions("system:dept:list")
|
||||
@GetMapping("/list")
|
||||
@ResponseBody
|
||||
public List<Dept> list()
|
||||
public List<Dept> list(Dept dept)
|
||||
{
|
||||
List<Dept> deptList = deptService.selectDeptAll();
|
||||
List<Dept> deptList = deptService.selectDeptList(dept);
|
||||
return deptList;
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,16 @@ public interface DeptMapper
|
||||
public int checkDeptExistUser(Long deptId);
|
||||
|
||||
/**
|
||||
* 查询部门管理集合
|
||||
* 查询部门管理数据
|
||||
*
|
||||
* @return 所有部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<Dept> selectDeptList(Dept dept);
|
||||
|
||||
/**
|
||||
* 查询部门所有数据
|
||||
*
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<Dept> selectDeptAll();
|
||||
|
||||
|
@ -24,9 +24,20 @@ public class DeptServiceImpl implements IDeptService
|
||||
private DeptMapper deptMapper;
|
||||
|
||||
/**
|
||||
* 查询部门管理集合
|
||||
* 查询部门管理数据
|
||||
*
|
||||
* @return 所有部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> selectDeptList(Dept dept)
|
||||
{
|
||||
return deptMapper.selectDeptList(dept);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门所有数据
|
||||
*
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
@Override
|
||||
public List<Dept> selectDeptAll()
|
||||
|
@ -13,12 +13,19 @@ import com.ruoyi.project.system.dept.domain.Dept;
|
||||
public interface IDeptService
|
||||
{
|
||||
/**
|
||||
* 查询部门管理集合
|
||||
* 查询部门管理数据
|
||||
*
|
||||
* @return 所有部门信息
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<Dept> selectDeptList(Dept dept);
|
||||
|
||||
/**
|
||||
* 查询部门所有数据
|
||||
*
|
||||
* @return 部门信息集合
|
||||
*/
|
||||
public List<Dept> selectDeptAll();
|
||||
|
||||
|
||||
/**
|
||||
* 查询部门管理树
|
||||
*
|
||||
@ -65,7 +72,7 @@ public interface IDeptService
|
||||
* @return 部门信息
|
||||
*/
|
||||
public Dept selectDeptById(Long deptId);
|
||||
|
||||
|
||||
/**
|
||||
* 校验部门名称是否唯一
|
||||
*
|
||||
|
@ -44,9 +44,9 @@ public class MenuController extends BaseController
|
||||
@RequiresPermissions("system:menu:list")
|
||||
@GetMapping("/list")
|
||||
@ResponseBody
|
||||
public List<Menu> list()
|
||||
public List<Menu> list(Menu menu)
|
||||
{
|
||||
List<Menu> menuList = menuService.selectMenuAll();
|
||||
List<Menu> menuList = menuService.selectMenuList(menu);
|
||||
return menuList;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class Menu extends BaseEntity
|
||||
/** 类型:0目录,1菜单,2按钮 */
|
||||
private String menuType;
|
||||
/** 菜单状态:0显示,1隐藏 */
|
||||
private int visible;
|
||||
private Integer visible;
|
||||
/** 权限字符串 */
|
||||
private String perms;
|
||||
/** 菜单图标 */
|
||||
@ -105,12 +105,12 @@ public class Menu extends BaseEntity
|
||||
this.menuType = menuType;
|
||||
}
|
||||
|
||||
public int getVisible()
|
||||
public Integer getVisible()
|
||||
{
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(int visible)
|
||||
public void setVisible(Integer visible)
|
||||
{
|
||||
this.visible = visible;
|
||||
}
|
||||
|
@ -34,6 +34,13 @@ public interface MenuMapper
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<String> selectMenuTree(Long roleId);
|
||||
|
||||
/**
|
||||
* 查询系统菜单列表
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<Menu> selectMenuList(Menu menu);
|
||||
|
||||
/**
|
||||
* 查询系统所有菜单
|
||||
|
@ -23,6 +23,13 @@ public interface IMenuService
|
||||
*/
|
||||
public List<Menu> selectMenusByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询系统菜单列表
|
||||
*
|
||||
* @return 菜单列表
|
||||
*/
|
||||
public List<Menu> selectMenuList(Menu menu);
|
||||
|
||||
/**
|
||||
* 查询菜单集合
|
||||
*
|
||||
|
@ -49,6 +49,17 @@ public class MenuServiceImpl implements IMenuService
|
||||
return TreeUtils.getChildPerms(menus, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单集合
|
||||
*
|
||||
* @return 所有菜单信息
|
||||
*/
|
||||
@Override
|
||||
public List<Menu> selectMenuList(Menu menu)
|
||||
{
|
||||
return menuMapper.selectMenuList(menu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单集合
|
||||
*
|
||||
|
Reference in New Issue
Block a user