Commit fb19dd3e4e7e99f3c11d91a35b5eccfb64bd4dc0
Committed by
Gitee
1 parent
cbf4795f
update ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml.
解决如果导入多个同名部门dept_name,parent_id相同,但是删除状态(del_flag)不同,导致查询结果为多条,mybatis不能映射为一条数据的问题.
Showing
1 changed file
with
1 additions
and
0 deletions
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
| ... | ... | @@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| 78 | 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| 79 | 79 | <include refid="selectDeptVo"/> |
| 80 | 80 | where dept_name=#{deptName} and parent_id = #{parentId} |
| 81 | + limit 1 | |
| 81 | 82 | </select> |
| 82 | 83 | |
| 83 | 84 | <insert id="insertDept" parameterType="SysDept"> | ... | ... |