<?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.chinaitop.depot.intelligent.basicdata.mapper.TDcsqtinfoMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfo" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="VARCHAR" />
    <result column="v_dcs_code" property="vDcsCode" jdbcType="VARCHAR" />
    <result column="v_dcs_name" property="vDcsName" jdbcType="VARCHAR" />
    <result column="i_begin_tdh" property="iBeginTdh" jdbcType="INTEGER" />
    <result column="i_end_tdh" property="iEndTdh" jdbcType="INTEGER" />
    <result column="v_zd_code" property="vZdCode" jdbcType="VARCHAR" />
    <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
    <result column="v_remark" property="vRemark" jdbcType="VARCHAR" />
    <result column="v_update_time" property="vUpdateTime" jdbcType="TIMESTAMP" />
    <result column="v_update_person" property="vUpdatePerson" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, org_id, v_dcs_code, v_dcs_name, i_begin_tdh, i_end_tdh, v_zd_code, v_cf_code, 
    v_remark, v_update_time, v_update_person
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfoExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_dcsqtinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from t_dcsqtinfo
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_dcsqtinfo
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfoExample" >
    delete from t_dcsqtinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfo" >
    insert into t_dcsqtinfo (id, org_id, v_dcs_code, 
      v_dcs_name, i_begin_tdh, i_end_tdh, 
      v_zd_code, v_cf_code, v_remark, 
      v_update_time, v_update_person)
    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vDcsCode,jdbcType=VARCHAR}, 
      #{vDcsName,jdbcType=VARCHAR}, #{iBeginTdh,jdbcType=INTEGER}, #{iEndTdh,jdbcType=INTEGER}, 
      #{vZdCode,jdbcType=VARCHAR}, #{vCfCode,jdbcType=VARCHAR}, #{vRemark,jdbcType=VARCHAR}, 
      #{vUpdateTime,jdbcType=TIMESTAMP}, #{vUpdatePerson,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfo" >
    insert into t_dcsqtinfo
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="vDcsCode != null" >
        v_dcs_code,
      </if>
      <if test="vDcsName != null" >
        v_dcs_name,
      </if>
      <if test="iBeginTdh != null" >
        i_begin_tdh,
      </if>
      <if test="iEndTdh != null" >
        i_end_tdh,
      </if>
      <if test="vZdCode != null" >
        v_zd_code,
      </if>
      <if test="vCfCode != null" >
        v_cf_code,
      </if>
      <if test="vRemark != null" >
        v_remark,
      </if>
      <if test="vUpdateTime != null" >
        v_update_time,
      </if>
      <if test="vUpdatePerson != null" >
        v_update_person,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="vDcsCode != null" >
        #{vDcsCode,jdbcType=VARCHAR},
      </if>
      <if test="vDcsName != null" >
        #{vDcsName,jdbcType=VARCHAR},
      </if>
      <if test="iBeginTdh != null" >
        #{iBeginTdh,jdbcType=INTEGER},
      </if>
      <if test="iEndTdh != null" >
        #{iEndTdh,jdbcType=INTEGER},
      </if>
      <if test="vZdCode != null" >
        #{vZdCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        #{vRemark,jdbcType=VARCHAR},
      </if>
      <if test="vUpdateTime != null" >
        #{vUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="vUpdatePerson != null" >
        #{vUpdatePerson,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfoExample" resultType="java.lang.Integer" >
    select count(*) from t_dcsqtinfo
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_dcsqtinfo
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null" >
        org_id = #{record.orgId,jdbcType=VARCHAR},
      </if>
      <if test="record.vDcsCode != null" >
        v_dcs_code = #{record.vDcsCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vDcsName != null" >
        v_dcs_name = #{record.vDcsName,jdbcType=VARCHAR},
      </if>
      <if test="record.iBeginTdh != null" >
        i_begin_tdh = #{record.iBeginTdh,jdbcType=INTEGER},
      </if>
      <if test="record.iEndTdh != null" >
        i_end_tdh = #{record.iEndTdh,jdbcType=INTEGER},
      </if>
      <if test="record.vZdCode != null" >
        v_zd_code = #{record.vZdCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfCode != null" >
        v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vRemark != null" >
        v_remark = #{record.vRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.vUpdateTime != null" >
        v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.vUpdatePerson != null" >
        v_update_person = #{record.vUpdatePerson,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update t_dcsqtinfo
    set id = #{record.id,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      v_dcs_code = #{record.vDcsCode,jdbcType=VARCHAR},
      v_dcs_name = #{record.vDcsName,jdbcType=VARCHAR},
      i_begin_tdh = #{record.iBeginTdh,jdbcType=INTEGER},
      i_end_tdh = #{record.iEndTdh,jdbcType=INTEGER},
      v_zd_code = #{record.vZdCode,jdbcType=VARCHAR},
      v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      v_remark = #{record.vRemark,jdbcType=VARCHAR},
      v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
      v_update_person = #{record.vUpdatePerson,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfo" >
    update t_dcsqtinfo
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="vDcsCode != null" >
        v_dcs_code = #{vDcsCode,jdbcType=VARCHAR},
      </if>
      <if test="vDcsName != null" >
        v_dcs_name = #{vDcsName,jdbcType=VARCHAR},
      </if>
      <if test="iBeginTdh != null" >
        i_begin_tdh = #{iBeginTdh,jdbcType=INTEGER},
      </if>
      <if test="iEndTdh != null" >
        i_end_tdh = #{iEndTdh,jdbcType=INTEGER},
      </if>
      <if test="vZdCode != null" >
        v_zd_code = #{vZdCode,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        v_remark = #{vRemark,jdbcType=VARCHAR},
      </if>
      <if test="vUpdateTime != null" >
        v_update_time = #{vUpdateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="vUpdatePerson != null" >
        v_update_person = #{vUpdatePerson,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TDcsqtinfo" >
    update t_dcsqtinfo
    set org_id = #{orgId,jdbcType=VARCHAR},
      v_dcs_code = #{vDcsCode,jdbcType=VARCHAR},
      v_dcs_name = #{vDcsName,jdbcType=VARCHAR},
      i_begin_tdh = #{iBeginTdh,jdbcType=INTEGER},
      i_end_tdh = #{iEndTdh,jdbcType=INTEGER},
      v_zd_code = #{vZdCode,jdbcType=VARCHAR},
      v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      v_remark = #{vRemark,jdbcType=VARCHAR},
      v_update_time = #{vUpdateTime,jdbcType=TIMESTAMP},
      v_update_person = #{vUpdatePerson,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>