<?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="cn.superdesk.uniorder.dao.mapper.thirdpart.qchjc.log.QchjcLogEntityMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="method" jdbcType="VARCHAR" property="method" />
    <result column="time" jdbcType="TIMESTAMP" property="time" />
    <result column="result" jdbcType="INTEGER" property="result" />
    <result column="response" jdbcType="VARCHAR" property="response" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    <result column="param" jdbcType="LONGVARCHAR" property="param" />
  </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, method, time, result, response
  </sql>
  <sql id="Blob_Column_List">
    param
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntityExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from qchjc_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntityExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from qchjc_log
    <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 qchjc_log
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from qchjc_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntityExample">
    delete from qchjc_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    insert into qchjc_log (id, method, time, 
      result, response, param
      )
    values (#{id,jdbcType=BIGINT}, #{method,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP}, 
      #{result,jdbcType=INTEGER}, #{response,jdbcType=VARCHAR}, #{param,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    insert into qchjc_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="method != null">
        method,
      </if>
      <if test="time != null">
        time,
      </if>
      <if test="result != null">
        result,
      </if>
      <if test="response != null">
        response,
      </if>
      <if test="param != null">
        param,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="method != null">
        #{method,jdbcType=VARCHAR},
      </if>
      <if test="time != null">
        #{time,jdbcType=TIMESTAMP},
      </if>
      <if test="result != null">
        #{result,jdbcType=INTEGER},
      </if>
      <if test="response != null">
        #{response,jdbcType=VARCHAR},
      </if>
      <if test="param != null">
        #{param,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntityExample" resultType="java.lang.Long">
    select count(*) from qchjc_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update qchjc_log
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.method != null">
        method = #{record.method,jdbcType=VARCHAR},
      </if>
      <if test="record.time != null">
        time = #{record.time,jdbcType=TIMESTAMP},
      </if>
      <if test="record.result != null">
        result = #{record.result,jdbcType=INTEGER},
      </if>
      <if test="record.response != null">
        response = #{record.response,jdbcType=VARCHAR},
      </if>
      <if test="record.param != null">
        param = #{record.param,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update qchjc_log
    set id = #{record.id,jdbcType=BIGINT},
      method = #{record.method,jdbcType=VARCHAR},
      time = #{record.time,jdbcType=TIMESTAMP},
      result = #{record.result,jdbcType=INTEGER},
      response = #{record.response,jdbcType=VARCHAR},
      param = #{record.param,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update qchjc_log
    set id = #{record.id,jdbcType=BIGINT},
      method = #{record.method,jdbcType=VARCHAR},
      time = #{record.time,jdbcType=TIMESTAMP},
      result = #{record.result,jdbcType=INTEGER},
      response = #{record.response,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    update qchjc_log
    <set>
      <if test="method != null">
        method = #{method,jdbcType=VARCHAR},
      </if>
      <if test="time != null">
        time = #{time,jdbcType=TIMESTAMP},
      </if>
      <if test="result != null">
        result = #{result,jdbcType=INTEGER},
      </if>
      <if test="response != null">
        response = #{response,jdbcType=VARCHAR},
      </if>
      <if test="param != null">
        param = #{param,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    update qchjc_log
    set method = #{method,jdbcType=VARCHAR},
      time = #{time,jdbcType=TIMESTAMP},
      result = #{result,jdbcType=INTEGER},
      response = #{response,jdbcType=VARCHAR},
      param = #{param,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.thirdpart.qchjc.log.QchjcLogEntity">
    update qchjc_log
    set method = #{method,jdbcType=VARCHAR},
      time = #{time,jdbcType=TIMESTAMP},
      result = #{result,jdbcType=INTEGER},
      response = #{response,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>