提交 fb19dd3e authored 作者: yongdaidai's avatar yongdaidai 提交者: Gitee

update ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml.

解决如果导入多个同名部门dept_name,parent_id相同,但是删除状态(del_flag)不同,导致查询结果为多条,mybatis不能映射为一条数据的问题.
上级 cbf4795f
...@@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +78,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} where dept_name=#{deptName} and parent_id = #{parentId}
limit 1
</select> </select>
<insert id="insertDept" parameterType="SysDept"> <insert id="insertDept" parameterType="SysDept">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论