TdCRechargeCardPicZipMapper.xml 12.3 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.TdCRechargeCardPicZipMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCRechargeCardPicZip">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="zip_code" jdbcType="VARCHAR" property="zipCode" />
    <result column="zip_url" jdbcType="VARCHAR" property="zipUrl" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
    <result column="modify_emp_name" jdbcType="VARCHAR" property="modifyEmpName" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
  </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, zip_code, zip_url, org_id, remark, data_state, create_emp_id, create_emp_name, 
    create_date, modify_emp_id, modify_emp_name, modify_date
  </sql>
  <select id="selectByExample" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZipExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    from td_c_recharge_card_pic_zip
    <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="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_c_recharge_card_pic_zip
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_recharge_card_pic_zip
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZipExample">
    delete from td_c_recharge_card_pic_zip
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZip">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_recharge_card_pic_zip (zip_code, zip_url, org_id, 
      remark, data_state, create_emp_id, 
      create_emp_name, create_date, modify_emp_id, 
      modify_emp_name, modify_date)
    values (#{zipCode,jdbcType=VARCHAR}, #{zipUrl,jdbcType=VARCHAR}, #{orgId,jdbcType=BIGINT}, 
      #{remark,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, #{createEmpId,jdbcType=VARCHAR}, 
      #{createEmpName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyEmpId,jdbcType=VARCHAR}, 
      #{modifyEmpName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZip">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_recharge_card_pic_zip
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="zipCode != null">
        zip_code,
      </if>
      <if test="zipUrl != null">
        zip_url,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id,
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="zipCode != null">
        #{zipCode,jdbcType=VARCHAR},
      </if>
      <if test="zipUrl != null">
        #{zipUrl,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZipExample" resultType="java.lang.Long">
    select count(*) from td_c_recharge_card_pic_zip
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_c_recharge_card_pic_zip
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.zipCode != null">
        zip_code = #{record.zipCode,jdbcType=VARCHAR},
      </if>
      <if test="record.zipUrl != null">
        zip_url = #{record.zipUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpId != null">
        create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.createEmpName != null">
        create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpId != null">
        modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyEmpName != null">
        modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyDate != null">
        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update td_c_recharge_card_pic_zip
    set id = #{record.id,jdbcType=BIGINT},
      zip_code = #{record.zipCode,jdbcType=VARCHAR},
      zip_url = #{record.zipUrl,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=BIGINT},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZip">
    update td_c_recharge_card_pic_zip
    <set>
      <if test="zipCode != null">
        zip_code = #{zipCode,jdbcType=VARCHAR},
      </if>
      <if test="zipUrl != null">
        zip_url = #{zipUrl,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdCRechargeCardPicZip">
    update td_c_recharge_card_pic_zip
    set zip_code = #{zipCode,jdbcType=VARCHAR},
      zip_url = #{zipUrl,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=BIGINT},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>