Java Code Examples for org.jeecg.modules.system.entity.SysPermission#isRoute()
The following examples show how to use
org.jeecg.modules.system.entity.SysPermission#isRoute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysPermissionTree.java From jeecg-cloud with Apache License 2.0 | 5 votes |
public SysPermissionTree(SysPermission permission) { this.key = permission.getId(); this.id = permission.getId(); this.perms = permission.getPerms(); this.permsType = permission.getPermsType(); this.component = permission.getComponent(); this.createBy = permission.getCreateBy(); this.createTime = permission.getCreateTime(); this.delFlag = permission.getDelFlag(); this.description = permission.getDescription(); this.icon = permission.getIcon(); this.isLeaf = permission.isLeaf(); this.menuType = permission.getMenuType(); this.name = permission.getName(); this.parentId = permission.getParentId(); this.sortNo = permission.getSortNo(); this.updateBy = permission.getUpdateBy(); this.updateTime = permission.getUpdateTime(); this.redirect = permission.getRedirect(); this.url = permission.getUrl(); this.hidden = permission.isHidden(); this.route = permission.isRoute(); this.keepAlive = permission.isKeepAlive(); this.alwaysShow= permission.isAlwaysShow(); /*update_begin author:wuxianquan date:20190908 for:赋值 */ this.internalOrExternal = permission.isInternalOrExternal(); /*update_end author:wuxianquan date:20190908 for:赋值 */ this.title=permission.getName(); if (!permission.isLeaf()) { this.children = new ArrayList<SysPermissionTree>(); } this.status = permission.getStatus(); }
Example 2
Source File: SysPermissionTree.java From jeecg-boot-with-activiti with MIT License | 5 votes |
public SysPermissionTree(SysPermission permission) { this.key = permission.getId(); this.id = permission.getId(); this.perms = permission.getPerms(); this.permsType = permission.getPermsType(); this.component = permission.getComponent(); this.createBy = permission.getCreateBy(); this.createTime = permission.getCreateTime(); this.delFlag = permission.getDelFlag(); this.description = permission.getDescription(); this.icon = permission.getIcon(); this.isLeaf = permission.isLeaf(); this.menuType = permission.getMenuType(); this.name = permission.getName(); this.parentId = permission.getParentId(); this.sortNo = permission.getSortNo(); this.updateBy = permission.getUpdateBy(); this.updateTime = permission.getUpdateTime(); this.redirect = permission.getRedirect(); this.url = permission.getUrl(); this.hidden = permission.isHidden(); this.route = permission.isRoute(); this.keepAlive = permission.isKeepAlive(); this.alwaysShow= permission.isAlwaysShow(); /*update_begin author:wuxianquan date:20190908 for:赋值 */ this.internalOrExternal = permission.isInternalOrExternal(); /*update_end author:wuxianquan date:20190908 for:赋值 */ this.title=permission.getName(); if (!permission.isLeaf()) { this.children = new ArrayList<SysPermissionTree>(); } this.status = permission.getStatus(); }
Example 3
Source File: SysPermissionTree.java From teaching with Apache License 2.0 | 5 votes |
public SysPermissionTree(SysPermission permission) { this.key = permission.getId(); this.id = permission.getId(); this.perms = permission.getPerms(); this.permsType = permission.getPermsType(); this.component = permission.getComponent(); this.createBy = permission.getCreateBy(); this.createTime = permission.getCreateTime(); this.delFlag = permission.getDelFlag(); this.description = permission.getDescription(); this.icon = permission.getIcon(); this.isLeaf = permission.isLeaf(); this.menuType = permission.getMenuType(); this.name = permission.getName(); this.parentId = permission.getParentId(); this.sortNo = permission.getSortNo(); this.updateBy = permission.getUpdateBy(); this.updateTime = permission.getUpdateTime(); this.redirect = permission.getRedirect(); this.url = permission.getUrl(); this.hidden = permission.isHidden(); this.route = permission.isRoute(); this.keepAlive = permission.isKeepAlive(); this.alwaysShow= permission.isAlwaysShow(); /*update_begin author:wuxianquan date:20190908 for:赋值 */ this.internalOrExternal = permission.isInternalOrExternal(); /*update_end author:wuxianquan date:20190908 for:赋值 */ this.title=permission.getName(); if (!permission.isLeaf()) { this.children = new ArrayList<SysPermissionTree>(); } this.status = permission.getStatus(); }
Example 4
Source File: SysPermissionTree.java From jeecg-boot with Apache License 2.0 | 5 votes |
public SysPermissionTree(SysPermission permission) { this.key = permission.getId(); this.id = permission.getId(); this.perms = permission.getPerms(); this.permsType = permission.getPermsType(); this.component = permission.getComponent(); this.createBy = permission.getCreateBy(); this.createTime = permission.getCreateTime(); this.delFlag = permission.getDelFlag(); this.description = permission.getDescription(); this.icon = permission.getIcon(); this.isLeaf = permission.isLeaf(); this.menuType = permission.getMenuType(); this.name = permission.getName(); this.parentId = permission.getParentId(); this.sortNo = permission.getSortNo(); this.updateBy = permission.getUpdateBy(); this.updateTime = permission.getUpdateTime(); this.redirect = permission.getRedirect(); this.url = permission.getUrl(); this.hidden = permission.isHidden(); this.route = permission.isRoute(); this.keepAlive = permission.isKeepAlive(); this.alwaysShow= permission.isAlwaysShow(); /*update_begin author:wuxianquan date:20190908 for:赋值 */ this.internalOrExternal = permission.isInternalOrExternal(); /*update_end author:wuxianquan date:20190908 for:赋值 */ this.title=permission.getName(); if (!permission.isLeaf()) { this.children = new ArrayList<SysPermissionTree>(); } this.status = permission.getStatus(); }
Example 5
Source File: SysPermissionController.java From jeecg-cloud with Apache License 2.0 | 4 votes |
/** * 根据菜单配置生成路由json * @param permission * @return */ private JSONObject getPermissionJsonObject(SysPermission permission) { JSONObject json = new JSONObject(); // 类型(0:一级菜单 1:子菜单 2:按钮) if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) { //json.put("action", permission.getPerms()); //json.put("type", permission.getPermsType()); //json.put("describe", permission.getName()); return null; } else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) { json.put("id", permission.getId()); if (permission.isRoute()) { json.put("route", "1");// 表示生成路由 } else { json.put("route", "0");// 表示不生成路由 } if (isWWWHttpUrl(permission.getUrl())) { json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8")); } else { json.put("path", permission.getUrl()); } // 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用) if (oConvertUtils.isNotEmpty(permission.getComponentName())) { json.put("name", permission.getComponentName()); } else { json.put("name", urlToRouteName(permission.getUrl())); } // 是否隐藏路由,默认都是显示的 if (permission.isHidden()) { json.put("hidden", true); } // 聚合路由 if (permission.isAlwaysShow()) { json.put("alwaysShow", true); } json.put("component", permission.getComponent()); JSONObject meta = new JSONObject(); // 由用户设置是否缓存页面 用布尔值 if (permission.isKeepAlive()) { meta.put("keepAlive", true); } else { meta.put("keepAlive", false); } /*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */ //外链菜单打开方式 if (permission.isInternalOrExternal()) { meta.put("internalOrExternal", true); } else { meta.put("internalOrExternal", false); } /* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/ meta.put("title", permission.getName()); if (oConvertUtils.isEmpty(permission.getParentId())) { // 一级菜单跳转地址 json.put("redirect", permission.getRedirect()); if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } else { if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } if (isWWWHttpUrl(permission.getUrl())) { meta.put("url", permission.getUrl()); } json.put("meta", meta); } return json; }
Example 6
Source File: SysPermissionController.java From jeecg-boot-with-activiti with MIT License | 4 votes |
private JSONObject getPermissionJsonObject(SysPermission permission) { JSONObject json = new JSONObject(); // 类型(0:一级菜单 1:子菜单 2:按钮) if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) { //json.put("action", permission.getPerms()); //json.put("type", permission.getPermsType()); //json.put("describe", permission.getName()); return null; } else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) { json.put("id", permission.getId()); if (permission.isRoute()) { json.put("route", "1");// 表示生成路由 } else { json.put("route", "0");// 表示不生成路由 } if (isWWWHttpUrl(permission.getUrl())) { json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8")); } else { json.put("path", permission.getUrl()); } // 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用) if (oConvertUtils.isNotEmpty(permission.getComponentName())) { json.put("name", permission.getComponentName()); } else { json.put("name", urlToRouteName(permission.getUrl())); } // 是否隐藏路由,默认都是显示的 if (permission.isHidden()) { json.put("hidden", true); } // 聚合路由 if (permission.isAlwaysShow()) { json.put("alwaysShow", true); } json.put("component", permission.getComponent()); JSONObject meta = new JSONObject(); // 由用户设置是否缓存页面 用布尔值 if (permission.isKeepAlive()) { meta.put("keepAlive", true); } else { meta.put("keepAlive", false); } /*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */ //外链菜单打开方式 if (permission.isInternalOrExternal()) { meta.put("internalOrExternal", true); } else { meta.put("internalOrExternal", false); } /* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/ meta.put("title", permission.getName()); if (oConvertUtils.isEmpty(permission.getParentId())) { // 一级菜单跳转地址 json.put("redirect", permission.getRedirect()); if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } else { if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } if (isWWWHttpUrl(permission.getUrl())) { meta.put("url", permission.getUrl()); } json.put("meta", meta); } return json; }
Example 7
Source File: SysPermissionController.java From teaching with Apache License 2.0 | 4 votes |
/** * 根据菜单配置生成路由json * @param permission * @return */ private JSONObject getPermissionJsonObject(SysPermission permission) { JSONObject json = new JSONObject(); // 类型(0:一级菜单 1:子菜单 2:按钮) if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) { //json.put("action", permission.getPerms()); //json.put("type", permission.getPermsType()); //json.put("describe", permission.getName()); return null; } else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) { json.put("id", permission.getId()); if (permission.isRoute()) { json.put("route", "1");// 表示生成路由 } else { json.put("route", "0");// 表示不生成路由 } if (isWWWHttpUrl(permission.getUrl())) { json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8")); } else { json.put("path", permission.getUrl()); } // 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用) if (oConvertUtils.isNotEmpty(permission.getComponentName())) { json.put("name", permission.getComponentName()); } else { json.put("name", urlToRouteName(permission.getUrl())); } // 是否隐藏路由,默认都是显示的 if (permission.isHidden()) { json.put("hidden", true); } // 聚合路由 if (permission.isAlwaysShow()) { json.put("alwaysShow", true); } json.put("component", permission.getComponent()); JSONObject meta = new JSONObject(); // 由用户设置是否缓存页面 用布尔值 if (permission.isKeepAlive()) { meta.put("keepAlive", true); } else { meta.put("keepAlive", false); } /*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */ //外链菜单打开方式 if (permission.isInternalOrExternal()) { meta.put("internalOrExternal", true); } else { meta.put("internalOrExternal", false); } /* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/ meta.put("title", permission.getName()); if (oConvertUtils.isEmpty(permission.getParentId())) { // 一级菜单跳转地址 json.put("redirect", permission.getRedirect()); if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } else { if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } if (isWWWHttpUrl(permission.getUrl())) { meta.put("url", permission.getUrl()); } json.put("meta", meta); } return json; }
Example 8
Source File: SysPermissionController.java From jeecg-boot with Apache License 2.0 | 4 votes |
/** * 根据菜单配置生成路由json * @param permission * @return */ private JSONObject getPermissionJsonObject(SysPermission permission) { JSONObject json = new JSONObject(); // 类型(0:一级菜单 1:子菜单 2:按钮) if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_2)) { //json.put("action", permission.getPerms()); //json.put("type", permission.getPermsType()); //json.put("describe", permission.getName()); return null; } else if (permission.getMenuType().equals(CommonConstant.MENU_TYPE_0) || permission.getMenuType().equals(CommonConstant.MENU_TYPE_1)) { json.put("id", permission.getId()); if (permission.isRoute()) { json.put("route", "1");// 表示生成路由 } else { json.put("route", "0");// 表示不生成路由 } if (isWWWHttpUrl(permission.getUrl())) { json.put("path", MD5Util.MD5Encode(permission.getUrl(), "utf-8")); } else { json.put("path", permission.getUrl()); } // 重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用) if (oConvertUtils.isNotEmpty(permission.getComponentName())) { json.put("name", permission.getComponentName()); } else { json.put("name", urlToRouteName(permission.getUrl())); } // 是否隐藏路由,默认都是显示的 if (permission.isHidden()) { json.put("hidden", true); } // 聚合路由 if (permission.isAlwaysShow()) { json.put("alwaysShow", true); } json.put("component", permission.getComponent()); JSONObject meta = new JSONObject(); // 由用户设置是否缓存页面 用布尔值 if (permission.isKeepAlive()) { meta.put("keepAlive", true); } else { meta.put("keepAlive", false); } /*update_begin author:wuxianquan date:20190908 for:往菜单信息里添加外链菜单打开方式 */ //外链菜单打开方式 if (permission.isInternalOrExternal()) { meta.put("internalOrExternal", true); } else { meta.put("internalOrExternal", false); } /* update_end author:wuxianquan date:20190908 for: 往菜单信息里添加外链菜单打开方式*/ meta.put("title", permission.getName()); if (oConvertUtils.isEmpty(permission.getParentId())) { // 一级菜单跳转地址 json.put("redirect", permission.getRedirect()); if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } else { if (oConvertUtils.isNotEmpty(permission.getIcon())) { meta.put("icon", permission.getIcon()); } } if (isWWWHttpUrl(permission.getUrl())) { meta.put("url", permission.getUrl()); } json.put("meta", meta); } return json; }