数据权限基础

This commit is contained in:
yangzhengze 2018-07-28 22:16:56 +08:00
parent e1f8b12ba8
commit cf6493a2a1
4 changed files with 14 additions and 14 deletions

View File

@ -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;
/**
* 角色信息

View File

@ -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
*

View File

@ -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;
/**
* 角色业务层

View File

@ -168,6 +168,8 @@ public class RoleServiceImpl implements IRoleService
// 新增角色信息
roleMapper.insertRole(role);
ShiroUtils.clearCachedAuthorizationInfo();
//新增角色和部门信息数据权限
insertRoleDept(role);
return insertRoleMenu(role);
}