根据登录用户查询对应仓库

This commit is contained in:
2026-03-27 09:47:01 +08:00
parent fb4cffbe2a
commit 3ee2ca5eb7
5 changed files with 64 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
</select>
<insert id="insertDept" parameterType="SysDept">
insert into sys_dept(
<if test="deptId != null and deptId != 0">dept_id,</if>
@@ -156,4 +156,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dept set del_flag = '2' where dept_id = #{deptId}
</delete>
<select id="selectDeptAndChildren" resultType="com.shzg.project.system.domain.SysDept">
SELECT *
FROM sys_dept
WHERE
(dept_id = #{deptId}
OR FIND_IN_SET(#{deptId}, ancestors))
AND del_flag = '0'
<if test="keyword != null and keyword != ''">
AND dept_name LIKE CONCAT('%', #{keyword}, '%')
</if>
</select>
</mapper>