问题:删除之后的,同样名称的机构也添加不上,因为checkDeptNameUnique在做校验的时候没有考虑到数据已经被删除需要排除掉
解决:校验的时候只校验未被删除的
This commit is contained in:
parent
578d65dfb4
commit
6e57dc84cb
@ -82,7 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||||
<include refid="selectDeptVo"/>
|
<include refid="selectDeptVo"/>
|
||||||
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
|
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag='0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertDept" parameterType="SysDept">
|
<insert id="insertDept" parameterType="SysDept">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user