diff --git a/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java b/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java index 2f347192..c367e898 100644 --- a/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java +++ b/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java @@ -68,6 +68,16 @@ public class SysMenu extends BaseEntity /** 子菜单 */ private List children = new ArrayList(); + /** 客户端类型 */ + private Integer clientType; + + public Integer getClientType() { + return clientType; + } + + public void setClientType(Integer clientType) { + this.clientType = clientType; + } public Long getMenuId() { diff --git a/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java b/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java index 63031848..7660b8da 100644 --- a/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java +++ b/acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java @@ -64,6 +64,17 @@ public class SysRole extends BaseEntity /** 角色菜单权限 */ private Set permissions; + /** 客户端类型 */ + private Integer clientType; + + public Integer getClientType() { + return clientType; + } + + public void setClientType(Integer clientType) { + this.clientType = clientType; + } + public SysRole() { diff --git a/acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml b/acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml index 6b01b942..bd41cf39 100644 --- a/acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -26,10 +26,11 @@ + - select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time + select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time , client_type from sys_menu @@ -45,6 +46,9 @@ AND status = #{status} + + AND client_type = #{clientType} + order by parent_id, order_num @@ -152,6 +156,7 @@ icon = #{icon}, remark = #{remark}, update_by = #{updateBy}, + client_type = #{clientType}, update_time = sysdate() where menu_id = #{menuId} @@ -176,6 +181,7 @@ icon, remark, create_by, + client_type, create_time )values( #{menuId}, @@ -195,6 +201,7 @@ #{icon}, #{remark}, #{createBy}, + #{clientType}, sysdate() ) diff --git a/acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml b/acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml index 160a79e3..f46f22f8 100644 --- a/acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, - r.status, r.del_flag, r.create_time, r.remark + r.status, r.del_flag, r.create_time, r.remark , r.client_type from sys_role r left join sys_user_role ur on ur.role_id = r.role_id left join sys_user u on u.user_id = ur.user_id @@ -51,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and date_format(r.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') + + AND r.client_type = #{clientType} + ${params.dataScope} order by r.role_sort @@ -105,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status, remark, create_by, + client_type, create_time )values( #{roleId}, @@ -117,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{status}, #{remark}, #{createBy}, + #{clientType}, sysdate() ) @@ -133,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, remark = #{remark}, update_by = #{updateBy}, + client_type = #{clientType}, update_time = sysdate() where role_id = #{roleId}