From f327e75e15f52fb407e1a9b45176bcc5efd6f78b Mon Sep 17 00:00:00 2001 From: tamguo Date: Thu, 26 Jul 2018 11:54:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/sys/model/SysRoleEntity.java | 10 +++++++ .../modules/sys/service/ISysRoleService.java | 3 +++ .../sys/service/impl/SysRoleServiceImpl.java | 27 ++++++++++++++++++- .../modules/sys/web/SysRoleController.java | 8 ++++++ .../templates/modules/sys/role/dataScope.html | 18 ++++++------- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java index a421556..ef4013d 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/model/SysRoleEntity.java @@ -36,6 +36,8 @@ public class SysRoleEntity implements Serializable { @TableField(exist=false) private String roleMenuListJson; + @TableField(exist=false) + private String roleDataScopeListJson; public SysRoleEntity() { } @@ -172,4 +174,12 @@ public class SysRoleEntity implements Serializable { this.roleMenuListJson = roleMenuListJson; } + public String getRoleDataScopeListJson() { + return roleDataScopeListJson; + } + + public void setRoleDataScopeListJson(String roleDataScopeListJson) { + this.roleDataScopeListJson = roleDataScopeListJson; + } + } \ No newline at end of file diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java index f37916c..0d958c3 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/ISysRoleService.java @@ -18,4 +18,7 @@ public interface ISysRoleService extends IService{ /** 分配功能权限*/ void allowMenuPermission(SysRoleEntity role); + /** 授权数据权限*/ + void allowDataScope(SysRoleEntity role); + } diff --git a/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java b/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java index e4fd726..f55580a 100644 --- a/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java +++ b/tamguo-oms/src/main/java/com/tamguo/modules/sys/service/impl/SysRoleServiceImpl.java @@ -14,9 +14,11 @@ import com.baomidou.mybatisplus.mapper.Condition; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.tamguo.modules.sys.dao.SysMenuMapper; +import com.tamguo.modules.sys.dao.SysRoleDataScopeMapper; import com.tamguo.modules.sys.dao.SysRoleMapper; import com.tamguo.modules.sys.dao.SysRoleMenuMapper; import com.tamguo.modules.sys.model.SysMenuEntity; +import com.tamguo.modules.sys.model.SysRoleDataScopeEntity; import com.tamguo.modules.sys.model.SysRoleEntity; import com.tamguo.modules.sys.model.SysRoleMenuEntity; import com.tamguo.modules.sys.model.condition.SysRoleCondition; @@ -31,6 +33,8 @@ public class SysRoleServiceImpl extends ServiceImpl -
+

@@ -118,7 +118,7 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/> - \ No newline at end of file