【menu】更新获取antdv的所有菜单接口,删除菜单表path字段

pull/3/head
fengshuonan 2021-01-08 15:45:33 +08:00
parent 6473ee7479
commit 9d3a780a20
6 changed files with 280 additions and 278 deletions

File diff suppressed because one or more lines are too long

View File

@ -34,11 +34,6 @@ public class AntdSysMenuResponse {
*/
private String antdvRouter;
/**
* antdvue
*/
private String antdvPath;
/**
* antd vue
*/

View File

@ -100,12 +100,6 @@ public class SysMenu extends BaseEntity implements AbstractTreeNode {
@TableField("antdv_router")
private String antdvRouter;
/**
* antdvue
*/
@TableField("antdv_path")
private String antdvPath;
/**
* antd vue
*/

View File

@ -43,7 +43,6 @@ public class AntdMenusFactory {
// 填充路由等信息
antdvMenuItem.setRouter(antdSysMenuResponse.getAntdvRouter());
antdvMenuItem.setIcon(antdSysMenuResponse.getAntdvIcon());
antdvMenuItem.setPath(antdSysMenuResponse.getAntdvPath());
// 填充哪个角色绑定了这个菜单
List<SimpleRoleInfo> roles = antdSysMenuResponse.getRoles();
@ -61,10 +60,32 @@ public class AntdMenusFactory {
antdvMenuItems.add(antdvMenuItem);
}
// 加入根节点
antdvMenuItems.add(createAntdVMenuRoot());
// 构造菜单树
return new DefaultTreeBuildFactory<AntdvMenuItem>().doTreeBuild(antdvMenuItems);
return new DefaultTreeBuildFactory<AntdvMenuItem>(SystemConstants.VIRTUAL_ROOT_PARENT_ID.toString()).doTreeBuild(antdvMenuItems);
}
/**
*
*
* @author fengshuonan
* @date 2020/12/30 20:38
*/
private static AntdvMenuItem createAntdVMenuRoot() {
AntdvMenuItem antdvMenuItem = new AntdvMenuItem();
antdvMenuItem.setRouter("root");
antdvMenuItem.setName("根节点");
antdvMenuItem.setMenuId(SystemConstants.DEFAULT_PARENT_ID);
antdvMenuItem.setMenuParentId(SystemConstants.VIRTUAL_ROOT_PARENT_ID);
antdvMenuItem.setAuthority(null);
return antdvMenuItem;
}
/**
* vue antd admin
*

View File

@ -7,7 +7,6 @@
<result column="menu_parent_id" property="menuParentId"/>
<result column="menu_name" property="menuName"/>
<result column="antdv_router" property="antdvRouter"/>
<result column="antdv_path" property="antdvPath"/>
<result column="antdv_icon" property="antdvIcon"/>
<collection property="roles" ofType="cn.stylefeng.roses.kernel.auth.api.pojo.login.basic.SimpleRoleInfo">
<id column="role_id" property="roleId"/>
@ -21,7 +20,6 @@
sm.menu_parent_id,
sm.menu_name,
sm.antdv_router,
sm.antdv_path,
sm.antdv_icon,
sr.role_id,
sr.role_name,

View File

@ -34,11 +34,6 @@ public class AntdvMenuItem implements AbstractTreeNode {
*/
private String icon;
/**
*
*/
private String path;
/**
*
*/