HubPushExceptionRecordMapper.xml 13.7 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.park.mapper.HubPushExceptionRecordMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.HubPushExceptionRecord">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="data_type" jdbcType="TINYINT" property="dataType" />
    <result column="park_code" jdbcType="VARCHAR" property="parkCode" />
    <result column="park_name" jdbcType="VARCHAR" property="parkName" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="push_status" jdbcType="TINYINT" property="pushStatus" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zteits.park.domain.HubPushExceptionRecordWithBLOBs">
    <result column="request_param" jdbcType="LONGVARCHAR" property="requestParam" />
    <result column="exception_info" jdbcType="LONGVARCHAR" property="exceptionInfo" />
  </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, data_type, park_code, park_name, order_no, push_status, create_time, update_time, 
    remark
  </sql>
  <sql id="Blob_Column_List">
    request_param, exception_info
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.zteits.park.domain.HubPushExceptionRecordExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from hub_push_exception_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.park.domain.HubPushExceptionRecordExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from hub_push_exception_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 hub_push_exception_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from hub_push_exception_record
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.HubPushExceptionRecordExample">
    delete from hub_push_exception_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.HubPushExceptionRecordWithBLOBs">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hub_push_exception_record (data_type, park_code, park_name, 
      order_no, push_status, create_time, 
      update_time, remark, request_param, 
      exception_info)
    values (#{dataType,jdbcType=TINYINT}, #{parkCode,jdbcType=VARCHAR}, #{parkName,jdbcType=VARCHAR}, 
      #{orderNo,jdbcType=VARCHAR}, #{pushStatus,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{requestParam,jdbcType=LONGVARCHAR}, 
      #{exceptionInfo,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.HubPushExceptionRecordWithBLOBs">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hub_push_exception_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="dataType != null">
        data_type,
      </if>
      <if test="parkCode != null">
        park_code,
      </if>
      <if test="parkName != null">
        park_name,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="pushStatus != null">
        push_status,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="requestParam != null">
        request_param,
      </if>
      <if test="exceptionInfo != null">
        exception_info,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="dataType != null">
        #{dataType,jdbcType=TINYINT},
      </if>
      <if test="parkCode != null">
        #{parkCode,jdbcType=VARCHAR},
      </if>
      <if test="parkName != null">
        #{parkName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="pushStatus != null">
        #{pushStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="requestParam != null">
        #{requestParam,jdbcType=LONGVARCHAR},
      </if>
      <if test="exceptionInfo != null">
        #{exceptionInfo,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.HubPushExceptionRecordExample" resultType="java.lang.Long">
    select count(*) from hub_push_exception_record
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update hub_push_exception_record
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.dataType != null">
        data_type = #{record.dataType,jdbcType=TINYINT},
      </if>
      <if test="record.parkCode != null">
        park_code = #{record.parkCode,jdbcType=VARCHAR},
      </if>
      <if test="record.parkName != null">
        park_name = #{record.parkName,jdbcType=VARCHAR},
      </if>
      <if test="record.orderNo != null">
        order_no = #{record.orderNo,jdbcType=VARCHAR},
      </if>
      <if test="record.pushStatus != null">
        push_status = #{record.pushStatus,jdbcType=TINYINT},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.requestParam != null">
        request_param = #{record.requestParam,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.exceptionInfo != null">
        exception_info = #{record.exceptionInfo,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update hub_push_exception_record
    set id = #{record.id,jdbcType=BIGINT},
      data_type = #{record.dataType,jdbcType=TINYINT},
      park_code = #{record.parkCode,jdbcType=VARCHAR},
      park_name = #{record.parkName,jdbcType=VARCHAR},
      order_no = #{record.orderNo,jdbcType=VARCHAR},
      push_status = #{record.pushStatus,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      remark = #{record.remark,jdbcType=VARCHAR},
      request_param = #{record.requestParam,jdbcType=LONGVARCHAR},
      exception_info = #{record.exceptionInfo,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update hub_push_exception_record
    set id = #{record.id,jdbcType=BIGINT},
      data_type = #{record.dataType,jdbcType=TINYINT},
      park_code = #{record.parkCode,jdbcType=VARCHAR},
      park_name = #{record.parkName,jdbcType=VARCHAR},
      order_no = #{record.orderNo,jdbcType=VARCHAR},
      push_status = #{record.pushStatus,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      remark = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.HubPushExceptionRecordWithBLOBs">
    update hub_push_exception_record
    <set>
      <if test="dataType != null">
        data_type = #{dataType,jdbcType=TINYINT},
      </if>
      <if test="parkCode != null">
        park_code = #{parkCode,jdbcType=VARCHAR},
      </if>
      <if test="parkName != null">
        park_name = #{parkName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="pushStatus != null">
        push_status = #{pushStatus,jdbcType=TINYINT},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="requestParam != null">
        request_param = #{requestParam,jdbcType=LONGVARCHAR},
      </if>
      <if test="exceptionInfo != null">
        exception_info = #{exceptionInfo,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zteits.park.domain.HubPushExceptionRecordWithBLOBs">
    update hub_push_exception_record
    set data_type = #{dataType,jdbcType=TINYINT},
      park_code = #{parkCode,jdbcType=VARCHAR},
      park_name = #{parkName,jdbcType=VARCHAR},
      order_no = #{orderNo,jdbcType=VARCHAR},
      push_status = #{pushStatus,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR},
      request_param = #{requestParam,jdbcType=LONGVARCHAR},
      exception_info = #{exceptionInfo,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.HubPushExceptionRecord">
    update hub_push_exception_record
    set data_type = #{dataType,jdbcType=TINYINT},
      park_code = #{parkCode,jdbcType=VARCHAR},
      park_name = #{parkName,jdbcType=VARCHAR},
      order_no = #{orderNo,jdbcType=VARCHAR},
      push_status = #{pushStatus,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>