TdCCustBusinessCheckRecordMapper.xml 16.2 KB
<?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.zteits.pay.mapper.TdCCustBusinessCheckRecordMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="business_id" jdbcType="VARCHAR" property="businessId" />
    <result column="business_name" jdbcType="VARCHAR" property="businessName" />
    <result column="business_licence_number" jdbcType="VARCHAR" property="businessLicenceNumber" />
    <result column="examine_state" jdbcType="INTEGER" property="examineState" />
    <result column="property_type_list" jdbcType="VARCHAR" property="propertyTypeList" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_empname" jdbcType="VARCHAR" property="createEmpname" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    <result column="examine_remark" jdbcType="LONGVARCHAR" property="examineRemark" />
  </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, business_id, business_name, business_licence_number, examine_state,examine_remark, property_type_list,
    data_state, create_empid, create_date, modfiy_empid, modfiy_date, create_empname
  </sql>
  <sql id="Blob_Column_List">
    examine_remark
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecordExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from td_c_cust_business_check_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecordExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    from td_c_cust_business_check_record
    <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.Long" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from td_c_cust_business_check_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_cust_business_check_record
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecordExample">
    delete from td_c_cust_business_check_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_cust_business_check_record (business_id, business_name, business_licence_number, 
      examine_state, property_type_list, data_state, 
      create_empid, create_date, modfiy_empid, 
      modfiy_date, create_empname, examine_remark
      )
    values (#{businessId,jdbcType=VARCHAR}, #{businessName,jdbcType=VARCHAR}, #{businessLicenceNumber,jdbcType=VARCHAR}, 
      #{examineState,jdbcType=INTEGER}, #{propertyTypeList,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modfiyEmpid,jdbcType=VARCHAR}, 
      #{modfiyDate,jdbcType=TIMESTAMP}, #{createEmpname,jdbcType=VARCHAR}, #{examineRemark,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_cust_business_check_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="businessId != null">
        business_id,
      </if>
      <if test="businessName != null">
        business_name,
      </if>
      <if test="businessLicenceNumber != null">
        business_licence_number,
      </if>
      <if test="examineState != null">
        examine_state,
      </if>
      <if test="propertyTypeList != null">
        property_type_list,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpid != null">
        create_empid,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid,
      </if>
      <if test="modfiyDate != null">
        modfiy_date,
      </if>
      <if test="createEmpname != null">
        create_empname,
      </if>
      <if test="examineRemark != null">
        examine_remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="businessId != null">
        #{businessId,jdbcType=VARCHAR},
      </if>
      <if test="businessName != null">
        #{businessName,jdbcType=VARCHAR},
      </if>
      <if test="businessLicenceNumber != null">
        #{businessLicenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="examineState != null">
        #{examineState,jdbcType=INTEGER},
      </if>
      <if test="propertyTypeList != null">
        #{propertyTypeList,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null">
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="createEmpname != null">
        #{createEmpname,jdbcType=VARCHAR},
      </if>
      <if test="examineRemark != null">
        #{examineRemark,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecordExample" resultType="java.lang.Long">
    select count(*) from td_c_cust_business_check_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_c_cust_business_check_record
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.businessId != null">
        business_id = #{record.businessId,jdbcType=VARCHAR},
      </if>
      <if test="record.businessName != null">
        business_name = #{record.businessName,jdbcType=VARCHAR},
      </if>
      <if test="record.businessLicenceNumber != null">
        business_licence_number = #{record.businessLicenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.examineState != null">
        examine_state = #{record.examineState,jdbcType=INTEGER},
      </if>
      <if test="record.propertyTypeList != null">
        property_type_list = #{record.propertyTypeList,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpid != null">
        create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modfiyEmpid != null">
        modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.modfiyDate != null">
        modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createEmpname != null">
        create_empname = #{record.createEmpname,jdbcType=VARCHAR},
      </if>
      <if test="record.examineRemark != null">
        examine_remark = #{record.examineRemark,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update td_c_cust_business_check_record
    set id = #{record.id,jdbcType=BIGINT},
      business_id = #{record.businessId,jdbcType=VARCHAR},
      business_name = #{record.businessName,jdbcType=VARCHAR},
      business_licence_number = #{record.businessLicenceNumber,jdbcType=VARCHAR},
      examine_state = #{record.examineState,jdbcType=INTEGER},
      property_type_list = #{record.propertyTypeList,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      create_empname = #{record.createEmpname,jdbcType=VARCHAR},
      examine_remark = #{record.examineRemark,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update td_c_cust_business_check_record
    set id = #{record.id,jdbcType=BIGINT},
      business_id = #{record.businessId,jdbcType=VARCHAR},
      business_name = #{record.businessName,jdbcType=VARCHAR},
      business_licence_number = #{record.businessLicenceNumber,jdbcType=VARCHAR},
      examine_state = #{record.examineState,jdbcType=INTEGER},
      property_type_list = #{record.propertyTypeList,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      create_empname = #{record.createEmpname,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    update td_c_cust_business_check_record
    <set>
      <if test="businessId != null">
        business_id = #{businessId,jdbcType=VARCHAR},
      </if>
      <if test="businessName != null">
        business_name = #{businessName,jdbcType=VARCHAR},
      </if>
      <if test="businessLicenceNumber != null">
        business_licence_number = #{businessLicenceNumber,jdbcType=VARCHAR},
      </if>
      <if test="examineState != null">
        examine_state = #{examineState,jdbcType=INTEGER},
      </if>
      <if test="propertyTypeList != null">
        property_type_list = #{propertyTypeList,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null">
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="createEmpname != null">
        create_empname = #{createEmpname,jdbcType=VARCHAR},
      </if>
      <if test="examineRemark != null">
        examine_remark = #{examineRemark,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    update td_c_cust_business_check_record
    set business_id = #{businessId,jdbcType=VARCHAR},
      business_name = #{businessName,jdbcType=VARCHAR},
      business_licence_number = #{businessLicenceNumber,jdbcType=VARCHAR},
      examine_state = #{examineState,jdbcType=INTEGER},
      property_type_list = #{propertyTypeList,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      create_empname = #{createEmpname,jdbcType=VARCHAR},
      examine_remark = #{examineRemark,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdCCustBusinessCheckRecord">
    update td_c_cust_business_check_record
    set business_id = #{businessId,jdbcType=VARCHAR},
      business_name = #{businessName,jdbcType=VARCHAR},
      business_licence_number = #{businessLicenceNumber,jdbcType=VARCHAR},
      examine_state = #{examineState,jdbcType=INTEGER},
      property_type_list = #{propertyTypeList,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      create_empname = #{createEmpname,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>