<?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.ruoyi.system.mapper.task.TkCommonDiaoduMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.task.TkCommonDiaodu">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="dd_name" jdbcType="VARCHAR" property="ddName" />
    <result column="dd_youxianji" jdbcType="VARCHAR" property="ddYouxianji" />
    <result column="dd_address" jdbcType="VARCHAR" property="ddAddress" />
    <result column="dd_zhipaidanwei" jdbcType="VARCHAR" property="ddZhipaidanwei" />
    <result column="dd_chulishixian" jdbcType="DATE" property="ddChulishixian" />
    <result column="dd_tkid" jdbcType="VARCHAR" property="ddTkid" />
    <result column="dd_status" jdbcType="VARCHAR" property="ddStatus" />
    <result column="dd_createtime" jdbcType="TIMESTAMP" property="ddCreatetime" />
    <result column="dd_tkstatus" jdbcType="VARCHAR" property="ddTkstatus" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.ruoyi.system.domain.task.TkCommonDiaodu">
    <result column="dd_detail" jdbcType="LONGVARCHAR" property="ddDetail" />
    <result column="dd_file" jdbcType="LONGVARCHAR" property="ddFile" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, dd_name, dd_youxianji, dd_address, dd_zhipaidanwei, dd_chulishixian,
    dd_tkid, dd_status, dd_createtime, dd_tkstatus
  </sql>
  <sql id="Blob_Column_List">
    dd_detail, dd_file
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.ruoyi.system.domain.task.TkCommonDiaoduExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tk_common_diaodu
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.task.TkCommonDiaoduExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tk_common_diaodu
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tk_common_diaodu
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from tk_common_diaodu
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.task.TkCommonDiaoduExample">
    delete from tk_common_diaodu
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.task.TkCommonDiaodu">
    insert into tk_common_diaodu (id,  dd_name,
      dd_youxianji, dd_address, dd_zhipaidanwei, 
      dd_chulishixian, dd_tkid, dd_status, 
      dd_createtime, dd_tkstatus, dd_detail, 
      dd_file)
    values (#{id,jdbcType=VARCHAR},#{ddName,jdbcType=VARCHAR},
      #{ddYouxianji,jdbcType=VARCHAR}, #{ddAddress,jdbcType=VARCHAR}, #{ddZhipaidanwei,jdbcType=VARCHAR}, 
      #{ddChulishixian,jdbcType=DATE}, #{ddTkid,jdbcType=VARCHAR}, #{ddStatus,jdbcType=VARCHAR}, 
      #{ddCreatetime,jdbcType=TIMESTAMP}, #{ddTkstatus,jdbcType=VARCHAR}, #{ddDetail,jdbcType=LONGVARCHAR}, 
      #{ddFile,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.task.TkCommonDiaodu">
    insert into tk_common_diaodu
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="ddName != null">
        dd_name,
      </if>
      <if test="ddYouxianji != null">
        dd_youxianji,
      </if>
      <if test="ddAddress != null">
        dd_address,
      </if>
      <if test="ddZhipaidanwei != null">
        dd_zhipaidanwei,
      </if>
      <if test="ddChulishixian != null">
        dd_chulishixian,
      </if>
      <if test="ddTkid != null">
        dd_tkid,
      </if>
      <if test="ddStatus != null">
        dd_status,
      </if>
      <if test="ddCreatetime != null">
        dd_createtime,
      </if>
      <if test="ddTkstatus != null">
        dd_tkstatus,
      </if>
      <if test="ddDetail != null">
        dd_detail,
      </if>
      <if test="ddFile != null">
        dd_file,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="ddName != null">
        #{ddName,jdbcType=VARCHAR},
      </if>
      <if test="ddYouxianji != null">
        #{ddYouxianji,jdbcType=VARCHAR},
      </if>
      <if test="ddAddress != null">
        #{ddAddress,jdbcType=VARCHAR},
      </if>
      <if test="ddZhipaidanwei != null">
        #{ddZhipaidanwei,jdbcType=VARCHAR},
      </if>
      <if test="ddChulishixian != null">
        #{ddChulishixian,jdbcType=DATE},
      </if>
      <if test="ddTkid != null">
        #{ddTkid,jdbcType=VARCHAR},
      </if>
      <if test="ddStatus != null">
        #{ddStatus,jdbcType=VARCHAR},
      </if>
      <if test="ddCreatetime != null">
        #{ddCreatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="ddTkstatus != null">
        #{ddTkstatus,jdbcType=VARCHAR},
      </if>
      <if test="ddDetail != null">
        #{ddDetail,jdbcType=LONGVARCHAR},
      </if>
      <if test="ddFile != null">
        #{ddFile,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.task.TkCommonDiaoduExample" resultType="java.lang.Long">
    select count(*) from tk_common_diaodu
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tk_common_diaodu
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.ddName != null">
        dd_name = #{record.ddName,jdbcType=VARCHAR},
      </if>
      <if test="record.ddYouxianji != null">
        dd_youxianji = #{record.ddYouxianji,jdbcType=VARCHAR},
      </if>
      <if test="record.ddAddress != null">
        dd_address = #{record.ddAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.ddZhipaidanwei != null">
        dd_zhipaidanwei = #{record.ddZhipaidanwei,jdbcType=VARCHAR},
      </if>
      <if test="record.ddChulishixian != null">
        dd_chulishixian = #{record.ddChulishixian,jdbcType=DATE},
      </if>
      <if test="record.ddTkid != null">
        dd_tkid = #{record.ddTkid,jdbcType=VARCHAR},
      </if>
      <if test="record.ddStatus != null">
        dd_status = #{record.ddStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.ddCreatetime != null">
        dd_createtime = #{record.ddCreatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.ddTkstatus != null">
        dd_tkstatus = #{record.ddTkstatus,jdbcType=VARCHAR},
      </if>
      <if test="record.ddDetail != null">
        dd_detail = #{record.ddDetail,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.ddFile != null">
        dd_file = #{record.ddFile,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update tk_common_diaodu
    set id = #{record.id,jdbcType=VARCHAR},
      dd_name = #{record.ddName,jdbcType=VARCHAR},
      dd_youxianji = #{record.ddYouxianji,jdbcType=VARCHAR},
      dd_address = #{record.ddAddress,jdbcType=VARCHAR},
      dd_zhipaidanwei = #{record.ddZhipaidanwei,jdbcType=VARCHAR},
      dd_chulishixian = #{record.ddChulishixian,jdbcType=DATE},
      dd_tkid = #{record.ddTkid,jdbcType=VARCHAR},
      dd_status = #{record.ddStatus,jdbcType=VARCHAR},
      dd_createtime = #{record.ddCreatetime,jdbcType=TIMESTAMP},
      dd_tkstatus = #{record.ddTkstatus,jdbcType=VARCHAR},
      dd_detail = #{record.ddDetail,jdbcType=LONGVARCHAR},
      dd_file = #{record.ddFile,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tk_common_diaodu
    set id = #{record.id,jdbcType=VARCHAR},
      dd_name = #{record.ddName,jdbcType=VARCHAR},
      dd_youxianji = #{record.ddYouxianji,jdbcType=VARCHAR},
      dd_address = #{record.ddAddress,jdbcType=VARCHAR},
      dd_zhipaidanwei = #{record.ddZhipaidanwei,jdbcType=VARCHAR},
      dd_chulishixian = #{record.ddChulishixian,jdbcType=DATE},
      dd_tkid = #{record.ddTkid,jdbcType=VARCHAR},
      dd_status = #{record.ddStatus,jdbcType=VARCHAR},
      dd_createtime = #{record.ddCreatetime,jdbcType=TIMESTAMP},
      dd_tkstatus = #{record.ddTkstatus,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.task.TkCommonDiaodu">
    update tk_common_diaodu
    <set>
      <if test="ddName != null">
        dd_name = #{ddName,jdbcType=VARCHAR},
      </if>
      <if test="ddYouxianji != null">
        dd_youxianji = #{ddYouxianji,jdbcType=VARCHAR},
      </if>
      <if test="ddAddress != null">
        dd_address = #{ddAddress,jdbcType=VARCHAR},
      </if>
      <if test="ddZhipaidanwei != null">
        dd_zhipaidanwei = #{ddZhipaidanwei,jdbcType=VARCHAR},
      </if>
      <if test="ddChulishixian != null">
        dd_chulishixian = #{ddChulishixian,jdbcType=DATE},
      </if>
      <if test="ddTkid != null">
        dd_tkid = #{ddTkid,jdbcType=VARCHAR},
      </if>
      <if test="ddStatus != null">
        dd_status = #{ddStatus,jdbcType=VARCHAR},
      </if>
      <if test="ddCreatetime != null">
        dd_createtime = #{ddCreatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="ddTkstatus != null">
        dd_tkstatus = #{ddTkstatus,jdbcType=VARCHAR},
      </if>
      <if test="ddDetail != null">
        dd_detail = #{ddDetail,jdbcType=LONGVARCHAR},
      </if>
      <if test="ddFile != null">
        dd_file = #{ddFile,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.ruoyi.system.domain.task.TkCommonDiaodu">
    update tk_common_diaodu
    set
      dd_name = #{ddName,jdbcType=VARCHAR},
      dd_youxianji = #{ddYouxianji,jdbcType=VARCHAR},
      dd_address = #{ddAddress,jdbcType=VARCHAR},
      dd_zhipaidanwei = #{ddZhipaidanwei,jdbcType=VARCHAR},
      dd_chulishixian = #{ddChulishixian,jdbcType=DATE},
      dd_tkid = #{ddTkid,jdbcType=VARCHAR},
      dd_status = #{ddStatus,jdbcType=VARCHAR},
      dd_createtime = #{ddCreatetime,jdbcType=TIMESTAMP},
      dd_tkstatus = #{ddTkstatus,jdbcType=VARCHAR},
      dd_detail = #{ddDetail,jdbcType=LONGVARCHAR},
      dd_file = #{ddFile,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.task.TkCommonDiaodu">
    update tk_common_diaodu
    set
      dd_name = #{ddName,jdbcType=VARCHAR},
      dd_youxianji = #{ddYouxianji,jdbcType=VARCHAR},
      dd_address = #{ddAddress,jdbcType=VARCHAR},
      dd_zhipaidanwei = #{ddZhipaidanwei,jdbcType=VARCHAR},
      dd_chulishixian = #{ddChulishixian,jdbcType=DATE},
      dd_tkid = #{ddTkid,jdbcType=VARCHAR},
      dd_status = #{ddStatus,jdbcType=VARCHAR},
      dd_createtime = #{ddCreatetime,jdbcType=TIMESTAMP},
      dd_tkstatus = #{ddTkstatus,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>