发布 2.3.0

This commit is contained in:
疯狂的狮子li
2021-06-01 10:53:30 +08:00
parent 76aa006db5
commit 59ef30b156
73 changed files with 3789 additions and 429 deletions

View File

@ -40,7 +40,9 @@
AND status = #{status}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
order by d.parent_id, d.order_num
</select>
@ -55,4 +57,17 @@
order by d.parent_id, d.order_num
</select>
<update id="updateDeptChildren" parameterType="java.util.List">
update sys_dept set ancestors =
<foreach collection="depts" item="item" index="index"
separator=" " open="case dept_id" close="end">
when #{item.deptId} then #{item.ancestors}
</foreach>
where dept_id in
<foreach collection="depts" item="item" index="index"
separator="," open="(" close=")">
#{item.deptId}
</foreach>
</update>
</mapper>

View File

@ -9,4 +9,11 @@
<result property="deptId" column="dept_id"/>
</resultMap>
</mapper>
<insert id="batchRoleDept">
insert into sys_role_dept(role_id, dept_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.deptId})
</foreach>
</insert>
</mapper>

View File

@ -58,7 +58,9 @@
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{role.params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
${role.params.dataScope}
<if test="role.params.dataScope != null and role.params.dataScope != ''">
AND ( ${role.params.dataScope} )
</if>
order by r.role_sort
</select>
@ -81,7 +83,9 @@
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
order by r.role_sort
</select>

View File

@ -9,4 +9,11 @@
<result property="menuId" column="menu_id"/>
</resultMap>
</mapper>
<insert id="batchRoleMenu">
insert into sys_role_menu(role_id, menu_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.roleId},#{item.menuId})
</foreach>
</insert>
</mapper>

View File

@ -106,7 +106,9 @@
ancestors) ))
</if>
<!-- 数据范围过滤 -->
${user.params.dataScope}
<if test="user.params.dataScope != null and user.params.dataScope != ''">
AND ( ${user.params.dataScope} )
</if>
</select>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@ -135,7 +137,9 @@
ancestors) ))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
</select>
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">

View File

@ -9,4 +9,11 @@
<result property="postId" column="post_id"/>
</resultMap>
</mapper>
<insert id="batchUserPost">
insert into sys_user_post(user_id, post_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.postId})
</foreach>
</insert>
</mapper>

View File

@ -9,4 +9,11 @@
<result property="roleId" column="role_id"/>
</resultMap>
</mapper>
<insert id="batchUserRole">
insert into sys_user_role(user_id, role_id) values
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.roleId})
</foreach>
</insert>
</mapper>