<?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="com.zkqy.system.mapper.DragTableFormMapper">
    
    <resultMap type="com.zkqy.system.entity.DragTableForm" id="DragTableFormResult">
        <result property="id" column="id"/>
        <result property="dtId" column="dt_id"/>
        <result property="dfId" column="df_id"/>
    </resultMap>

    <insert id="insertDragTableForm" parameterType="com.zkqy.system.entity.DragTableForm" useGeneratedKeys="true" keyProperty="id">
        insert into drag_table_form(dt_id,df_id)
        values (#{dtId},#{dfId})
    </insert>


    <select id="selectDtIdCount" resultType="int">
        select count(1) from drag_table_form where dt_id = #{dtId}
    </select>

    <select id="selectDragTableForm" resultMap="DragTableFormResult">
        select id,dt_id,df_id from drag_table_form where df_id = #{dfId}
    </select>

    <delete id="deleteDragTableFormByDfId">
        delete from drag_table_form where df_id = #{dfId}
    </delete>



</mapper>