数据权限基础
This commit is contained in:
parent
e1f8b12ba8
commit
cf6493a2a1
|
|
@ -1,16 +1,5 @@
|
|||
package com.ruoyi.project.system.role.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.constant.BusinessType;
|
||||
|
|
@ -19,6 +8,14 @@ import com.ruoyi.framework.web.domain.AjaxResult;
|
|||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.system.role.domain.Role;
|
||||
import com.ruoyi.project.system.role.service.IRoleService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色信息
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package com.ruoyi.project.system.role.domain;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 角色对象 sys_role
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
package com.ruoyi.project.system.role.service;
|
||||
|
||||
import com.ruoyi.project.system.role.domain.Role;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import com.ruoyi.project.system.role.domain.Role;
|
||||
|
||||
/**
|
||||
* 角色业务层
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ public class RoleServiceImpl implements IRoleService
|
|||
// 新增角色信息
|
||||
roleMapper.insertRole(role);
|
||||
ShiroUtils.clearCachedAuthorizationInfo();
|
||||
//新增角色和部门信息(数据权限)
|
||||
insertRoleDept(role);
|
||||
return insertRoleMenu(role);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue