mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
发布 2.3.0
This commit is contained in:
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -58,7 +58,9 @@
|
||||
and date_format(r.create_time,'%y%m%d') <= 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') <= 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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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">
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user