管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-25 4ddfd502023662f6d25c4be416d88751e206d91a
src/main/java/com/lf/server/controller/sys/RoleController.java
@@ -5,6 +5,7 @@
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.sys.RoleEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.sys.RoleService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -31,6 +32,9 @@
    @Autowired
    TokenService tokenService;
    @Autowired
    PermsService permsService;
    @SysLog()
    @ApiOperation(value = "查询记录数")
@@ -114,6 +118,9 @@
            }
            int count = roleService.insertRole(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -137,6 +144,9 @@
            }
            int count = roleService.insertRoles(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -153,6 +163,9 @@
    public ResponseMsg<Integer> deleteRole(int id) {
        try {
            int count = roleService.deleteRole(id);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -173,6 +186,9 @@
            }
            int count = roleService.deleteRoles(ids);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -195,6 +211,9 @@
            }
            int count = roleService.updateRole(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {