Browse Source

老角色管理

shiqian 3 years ago
parent
commit
0d13ddcd01
22 changed files with 314 additions and 12 deletions
  1. 16 0
      boman-api/boman-api-gen/src/main/resources/rebel.xml
  2. 16 0
      boman-api/boman-api-jflow/src/main/resources/rebel.xml
  3. 16 0
      boman-api/boman-api-system/src/main/resources/rebel.xml
  4. 16 0
      boman-api/boman-api-web-core/src/main/resources/rebel.xml
  5. 16 0
      boman-api/boman-domain/src/main/resources/rebel.xml
  6. 16 0
      boman-auth/src/main/resources/rebel.xml
  7. 16 0
      boman-common/boman-common-core/src/main/resources/rebel.xml
  8. 16 0
      boman-common/boman-common-datascope/src/main/resources/rebel.xml
  9. 16 0
      boman-common/boman-common-datasource/src/main/resources/rebel.xml
  10. 16 0
      boman-common/boman-common-log/src/main/resources/rebel.xml
  11. 16 0
      boman-common/boman-common-redis/src/main/resources/rebel.xml
  12. 16 0
      boman-common/boman-common-security/src/main/resources/rebel.xml
  13. 16 0
      boman-common/boman-common-swagger/src/main/resources/rebel.xml
  14. 16 0
      boman-gateway/src/main/resources/rebel.xml
  15. 16 0
      boman-modules/boman-file/src/main/resources/rebel.xml
  16. 16 0
      boman-modules/boman-gen/src/main/resources/rebel.xml
  17. 16 0
      boman-modules/boman-job/src/main/resources/rebel.xml
  18. 14 0
      boman-modules/boman-system/src/main/java/com/boman/system/controller/SysMenuController.java
  19. 10 11
      boman-modules/boman-system/src/main/java/com/boman/system/controller/SysRoleController.java
  20. 1 0
      boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysMenuServiceImpl.java
  21. 16 0
      boman-visual/boman-monitor/src/main/resources/rebel.xml
  22. 1 1
      boman-web-core/src/main/java/com/boman/web/core/controller/VaccineInfoController.java

+ 16 - 0
boman-api/boman-api-gen/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-api-gen</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-api/boman-api-gen/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-api/boman-api-jflow/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-api-jflow</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-api/boman-api-jflow/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-api/boman-api-system/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-api-system</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-api/boman-api-system/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-api/boman-api-web-core/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-api-web-core</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-api/boman-api-web-core/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-api/boman-domain/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-domain</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-api/boman-domain/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-auth/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>shujuju-auth</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-auth/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-core/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-core</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-core/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-datascope/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-datascope</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-datascope/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-datasource/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-datasource</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-datasource/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-log/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-log</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-log/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-redis/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-redis</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-redis/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-security/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-security</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-security/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-common/boman-common-swagger/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-common-swagger</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-common/boman-common-swagger/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-gateway/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>shujuju-gateway</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-gateway/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-modules/boman-file/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>shujuju-file</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-modules/boman-file/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-modules/boman-gen/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>shujuju-gen</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-modules/boman-gen/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 16 - 0
boman-modules/boman-job/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-modules-job</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-modules/boman-job/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 14 - 0
boman-modules/boman-system/src/main/java/com/boman/system/controller/SysMenuController.java

@@ -250,4 +250,18 @@ public class SysMenuController extends BaseController
         return menuService.listBtnByUserId(userId);
     }
 
+    /**
+     * 加载对应角色菜单列表树
+     */
+    @GetMapping(value = "/roleMenuTreeselect/{roleId}")
+    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
+    {
+        Long userId = SecurityUtils.getUserId();
+        List<SysMenu> menus = menuService.selectMenuList(userId);
+        AjaxResult ajax = AjaxResult.success();
+        ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
+        ajax.put("menus", menuService.buildMenuTreeSelect(menus));
+        return ajax;
+    }
+
 }

+ 10 - 11
boman-modules/boman-system/src/main/java/com/boman/system/controller/SysRoleController.java

@@ -72,19 +72,18 @@ public class SysRoleController extends BaseController
     @PreAuthorize(hasPermi = "system:role:add")
     @Log(title = "角色管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysRole role)
-    {
-        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
-        {
-            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
-        }
-        else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
-        {
-            return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+    public AjaxResult add(@Validated @RequestBody SysRole role) {
+        if (null == role.getId()) {
+            if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
+                return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
+            } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
+                return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
+            }
+            role.setCreateBy(SecurityUtils.getUsername());
+            return toAjax(roleService.insertRole(role));
         }
-        role.setCreateBy(SecurityUtils.getUsername());
-        return toAjax(roleService.insertRole(role));
 
+        return edit(role);
     }
 
     /**

+ 1 - 0
boman-modules/boman-system/src/main/java/com/boman/system/service/impl/SysMenuServiceImpl.java

@@ -204,6 +204,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
             router.setName(getRouteName(menu));
             router.setPath(getRouterPath(menu));
             router.setComponent(getComponent(menu));
+            router.setExtraParam("{\"username\": \"张三\"}");
             router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache())));
             if (menu.getSysTableName() != null) {
                 router.setSysTableName(menu.getSysTableName());

+ 16 - 0
boman-visual/boman-monitor/src/main/resources/rebel.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
+  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
+-->
+<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
+
+	<id>boman-visual-monitor</id>
+
+	<classpath>
+		<dir name="D:/project/shujuju/boman-visual/boman-monitor/target/classes">
+		</dir>
+	</classpath>
+
+</application>

+ 1 - 1
boman-web-core/src/main/java/com/boman/web/core/controller/VaccineInfoController.java

@@ -39,7 +39,7 @@ public class VaccineInfoController extends BaseController {
     /**
      * 查询疫苗信息列表
      */
-    @PreAuthorize(hasPermi = "@ss.hasPermi('core:info:list')")
+//    @PreAuthorize(hasPermi = "@ss.hasPermi('core:info:list')")
     @GetMapping("/list")
     public TableDataInfo list(VaccineInfoOperation vaccineInfo) {
         startPage();