<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">


<mapper namespace="cn.cslg.report.mapper.AvoidDesignWholeDirectionMapper">
    <!--插入回避设计总体方向表数据-->
    <!--int insert(AvoidDesignWholeDirection avoidDesignWholeDirection);-->
    <insert id="insert" useGeneratedKeys="true" keyProperty="id">
        insert into AVOIDDESIGN_WHOLE_DIRECTION (REPORT_ID, WHOLE_DIRECTION)
        values (#{reportId}, #{wholeDirection});
    </insert>

    <!--根据报告id删除回避设计总体方向表数据-->
    <!--int deleteByReportId(Integer reportId);-->
    <delete id="deleteByReportId">
        delete
        from AVOIDDESIGN_WHOLE_DIRECTION
        where REPORT_ID = #{reportId}
    </delete>

    <!--根据报告id查询回避设计总体方向-->
    <!--String selectWholeDirectionByReportId(Integer reportId);-->
    <select id="selectWholeDirectionByReportId" resultType="String">
        select WHOLE_DIRECTION
        from AVOIDDESIGN_WHOLE_DIRECTION
        where REPORT_ID = #{reportId}
    </select>

</mapper>
