防止如果导入多个同名部门dept_name,parent_id相同,但是删除状态(del_flag)不同,导致查询结果为多条,mybatis不能映射为一条数据的问题
已修改2个文件
3 ■■■■ 文件已修改
src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/system/SysDeptMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
@@ -233,7 +233,6 @@
    public static String getPermissionPrefix(String moduleName, String businessName)
    {
        return StringUtils.format("{}:{}", moduleName, businessName);
    }
    /**
src/main/resources/mybatis/system/SysDeptMapper.xml
@@ -77,7 +77,7 @@
    
    <select id="checkDeptNameUnique" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where dept_name=#{deptName} and parent_id = #{parentId}
        where dept_name=#{deptName} and parent_id = #{parentId} limit 1
    </select>
    
    <insert id="insertDept" parameterType="SysDept">