月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2024-11-11 fee67ca8a0760315047a52fc4101a8f4f80b7a7f
src/main/java/com/moon/server/controller/sys/RoleController.java
@@ -18,11 +18,7 @@
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
 *角色表
 * @author SWS
 * @date 2022-09.28
 */
@SuppressWarnings("ALL")
@Api(tags = "运维管理\\角色管理")
@RestController
@RequestMapping("/role")
@@ -117,10 +113,8 @@
                entity.setCreateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = roleService.insertRole(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -143,10 +137,8 @@
                }
            }
            permsService.clearPermsCache();
            int count = roleService.insertRoles(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -162,10 +154,8 @@
    @GetMapping(value = "/deleteRole")
    public ResponseMsg<Integer> deleteRole(int id) {
        try {
            permsService.clearPermsCache();
            int count = roleService.deleteRole(id);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -185,10 +175,8 @@
                return fail("id数组不能为空", -1);
            }
            permsService.clearPermsCache();
            int count = roleService.deleteRoles(ids);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -210,10 +198,8 @@
                entity.setUpdateUser(ue.getId());
            }
            permsService.clearPermsCache();
            int count = roleService.updateRole(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {