Browse Source

添加菜单、字典字段 客户端类型

new
zzc 1 week ago
parent
commit
99a6dbadfc
  1. 10
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java
  2. 11
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java
  3. 9
      acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml
  4. 9
      acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml

10
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysMenu.java

@ -68,6 +68,16 @@ public class SysMenu extends BaseEntity
/** 子菜单 */ /** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>(); private List<SysMenu> children = new ArrayList<SysMenu>();
/** 客户端类型 */
private Integer clientType;
public Integer getClientType() {
return clientType;
}
public void setClientType(Integer clientType) {
this.clientType = clientType;
}
public Long getMenuId() public Long getMenuId()
{ {

11
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysRole.java

@ -64,6 +64,17 @@ public class SysRole extends BaseEntity
/** 角色菜单权限 */ /** 角色菜单权限 */
private Set<String> permissions; private Set<String> permissions;
/** 客户端类型 */
private Integer clientType;
public Integer getClientType() {
return clientType;
}
public void setClientType(Integer clientType) {
this.clientType = clientType;
}
public SysRole() public SysRole()
{ {

9
acupuncture-system/src/main/resources/mapper/system/SysMenuMapper.xml

@ -26,10 +26,11 @@
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="clientType" column="client_type" />
</resultMap> </resultMap>
<sql id="selectMenuVo"> <sql id="selectMenuVo">
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 from sys_menu
</sql> </sql>
@ -45,6 +46,9 @@
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="clientType != null">
AND client_type = #{clientType}
</if>
</where> </where>
order by parent_id, order_num order by parent_id, order_num
</select> </select>
@ -152,6 +156,7 @@
<if test="icon !=null and icon != ''">icon = #{icon},</if> <if test="icon !=null and icon != ''">icon = #{icon},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if> <if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="clientType != null">client_type = #{clientType},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where menu_id = #{menuId} where menu_id = #{menuId}
@ -176,6 +181,7 @@
<if test="icon != null and icon != ''">icon,</if> <if test="icon != null and icon != ''">icon,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="clientType != null">client_type,</if>
create_time create_time
)values( )values(
<if test="menuId != null and menuId != 0">#{menuId},</if> <if test="menuId != null and menuId != 0">#{menuId},</if>
@ -195,6 +201,7 @@
<if test="icon != null and icon != ''">#{icon},</if> <if test="icon != null and icon != ''">#{icon},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="clientType != null">#{clientType},</if>
sysdate() sysdate()
) )
</insert> </insert>

9
acupuncture-system/src/main/resources/mapper/system/SysRoleMapper.xml

@ -19,11 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="clientType" column="client_type" />
</resultMap> </resultMap>
<sql id="selectRoleVo"> <sql id="selectRoleVo">
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, 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 from sys_role r
left join sys_user_role ur on ur.role_id = r.role_id 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 left join sys_user u on u.user_id = ur.user_id
@ -51,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d') and date_format(r.create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
</if> </if>
<if test="clientType != null">
AND r.client_type = #{clientType}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
order by r.role_sort order by r.role_sort
@ -105,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="clientType != null">client_type,</if>
create_time create_time
)values( )values(
<if test="roleId != null and roleId != 0">#{roleId},</if> <if test="roleId != null and roleId != 0">#{roleId},</if>
@ -117,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="clientType != null">#{clientType},</if>
sysdate() sysdate()
) )
</insert> </insert>
@ -133,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="clientType != null">client_type = #{clientType},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where role_id = #{roleId} where role_id = #{roleId}

Loading…
Cancel
Save