根据登录用户查询对应仓库
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user