提交者
Gitee
update ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml.
解决如果导入多个同名部门dept_name,parent_id相同,但是删除状态(del_flag)不同,导致查询结果为多条,mybatis不能映射为一条数据的问题.
正在显示
1 个修改的文件
包含
1 行增加
和
0 行删除
| @@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> | 78 | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| 79 | <include refid="selectDeptVo"/> | 79 | <include refid="selectDeptVo"/> |
| 80 | where dept_name=#{deptName} and parent_id = #{parentId} | 80 | where dept_name=#{deptName} and parent_id = #{parentId} |
| 81 | + limit 1 | ||
| 81 | </select> | 82 | </select> |
| 82 | 83 | ||
| 83 | <insert id="insertDept" parameterType="SysDept"> | 84 | <insert id="insertDept" parameterType="SysDept"> |
-
请 注册 或 登录 后发表评论