<?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.goafanti.common.dao.TOrderBillMapper">
  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderBill">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    <id column="bill_no" jdbcType="VARCHAR" property="billNo" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="creater" jdbcType="VARCHAR" property="creater" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="payee_id" jdbcType="VARCHAR" property="payeeId" />
    <result column="payer_id" jdbcType="VARCHAR" property="payerId" />
    <result column="transaction_amount" jdbcType="DECIMAL" property="transactionAmount" />
    <result column="transaction_subject" jdbcType="INTEGER" property="transactionSubject" />
    <result column="transaction_channel" jdbcType="INTEGER" property="transactionChannel" />
    <result column="transaction_mode" jdbcType="INTEGER" property="transactionMode" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="confirm_sign" jdbcType="INTEGER" property="confirmSign" />
    <result column="delete_sign" jdbcType="BIT" property="deleteSign" />
    <result column="financial_pay_no" jdbcType="VARCHAR" property="financialPayNo" />
    <result column="financial_pay_time" jdbcType="TIMESTAMP" property="financialPayTime" />
    <result column="confirm_time" jdbcType="TIMESTAMP" property="confirmTime" />
    <result column="postscript" jdbcType="VARCHAR" property="postscript" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    <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">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    bill_no, order_no, creater, create_time, update_time, payee_id, payer_id, transaction_amount, 
    transaction_subject, transaction_channel, transaction_mode, remarks, confirm_sign, 
    delete_sign, financial_pay_no, financial_pay_time, confirm_time, postscript
  </sql>
  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderBillExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_order_bill
    <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.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    select 
    <include refid="Base_Column_List" />
    from t_order_bill
    where bill_no = #{billNo,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    delete from t_order_bill
    where bill_no = #{billNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderBillExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    delete from t_order_bill
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.goafanti.common.model.TOrderBill">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    insert into t_order_bill (bill_no, order_no, creater, 
      create_time, update_time, payee_id, 
      payer_id, transaction_amount, transaction_subject, 
      transaction_channel, transaction_mode, remarks, 
      confirm_sign, delete_sign, financial_pay_no, 
      financial_pay_time, confirm_time, postscript
      )
    values (#{billNo,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{payeeId,jdbcType=VARCHAR}, 
      #{payerId,jdbcType=VARCHAR}, #{transactionAmount,jdbcType=DECIMAL}, #{transactionSubject,jdbcType=INTEGER}, 
      #{transactionChannel,jdbcType=INTEGER}, #{transactionMode,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, 
      #{confirmSign,jdbcType=INTEGER}, #{deleteSign,jdbcType=BIT}, #{financialPayNo,jdbcType=VARCHAR}, 
      #{financialPayTime,jdbcType=TIMESTAMP}, #{confirmTime,jdbcType=TIMESTAMP}, #{postscript,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderBill">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    insert into t_order_bill
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="billNo != null">
        bill_no,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="creater != null">
        creater,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="payeeId != null">
        payee_id,
      </if>
      <if test="payerId != null">
        payer_id,
      </if>
      <if test="transactionAmount != null">
        transaction_amount,
      </if>
      <if test="transactionSubject != null">
        transaction_subject,
      </if>
      <if test="transactionChannel != null">
        transaction_channel,
      </if>
      <if test="transactionMode != null">
        transaction_mode,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="confirmSign != null">
        confirm_sign,
      </if>
      <if test="deleteSign != null">
        delete_sign,
      </if>
      <if test="financialPayNo != null">
        financial_pay_no,
      </if>
      <if test="financialPayTime != null">
        financial_pay_time,
      </if>
      <if test="confirmTime != null">
        confirm_time,
      </if>
      <if test="postscript != null">
        postscript,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="billNo != null">
        #{billNo,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="creater != null">
        #{creater,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payeeId != null">
        #{payeeId,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="transactionAmount != null">
        #{transactionAmount,jdbcType=DECIMAL},
      </if>
      <if test="transactionSubject != null">
        #{transactionSubject,jdbcType=INTEGER},
      </if>
      <if test="transactionChannel != null">
        #{transactionChannel,jdbcType=INTEGER},
      </if>
      <if test="transactionMode != null">
        #{transactionMode,jdbcType=INTEGER},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="confirmSign != null">
        #{confirmSign,jdbcType=INTEGER},
      </if>
      <if test="deleteSign != null">
        #{deleteSign,jdbcType=BIT},
      </if>
      <if test="financialPayNo != null">
        #{financialPayNo,jdbcType=VARCHAR},
      </if>
      <if test="financialPayTime != null">
        #{financialPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="postscript != null">
        #{postscript,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBillExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    select count(*) from t_order_bill
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    update t_order_bill
    <set>
      <if test="record.billNo != null">
        bill_no = #{record.billNo,jdbcType=VARCHAR},
      </if>
      <if test="record.orderNo != null">
        order_no = #{record.orderNo,jdbcType=VARCHAR},
      </if>
      <if test="record.creater != null">
        creater = #{record.creater,jdbcType=VARCHAR},
      </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.payeeId != null">
        payee_id = #{record.payeeId,jdbcType=VARCHAR},
      </if>
      <if test="record.payerId != null">
        payer_id = #{record.payerId,jdbcType=VARCHAR},
      </if>
      <if test="record.transactionAmount != null">
        transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.transactionSubject != null">
        transaction_subject = #{record.transactionSubject,jdbcType=INTEGER},
      </if>
      <if test="record.transactionChannel != null">
        transaction_channel = #{record.transactionChannel,jdbcType=INTEGER},
      </if>
      <if test="record.transactionMode != null">
        transaction_mode = #{record.transactionMode,jdbcType=INTEGER},
      </if>
      <if test="record.remarks != null">
        remarks = #{record.remarks,jdbcType=VARCHAR},
      </if>
      <if test="record.confirmSign != null">
        confirm_sign = #{record.confirmSign,jdbcType=INTEGER},
      </if>
      <if test="record.deleteSign != null">
        delete_sign = #{record.deleteSign,jdbcType=BIT},
      </if>
      <if test="record.financialPayNo != null">
        financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
      </if>
      <if test="record.financialPayTime != null">
        financial_pay_time = #{record.financialPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.confirmTime != null">
        confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.postscript != null">
        postscript = #{record.postscript,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    update t_order_bill
    set bill_no = #{record.billNo,jdbcType=VARCHAR},
      order_no = #{record.orderNo,jdbcType=VARCHAR},
      creater = #{record.creater,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      payee_id = #{record.payeeId,jdbcType=VARCHAR},
      payer_id = #{record.payerId,jdbcType=VARCHAR},
      transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL},
      transaction_subject = #{record.transactionSubject,jdbcType=INTEGER},
      transaction_channel = #{record.transactionChannel,jdbcType=INTEGER},
      transaction_mode = #{record.transactionMode,jdbcType=INTEGER},
      remarks = #{record.remarks,jdbcType=VARCHAR},
      confirm_sign = #{record.confirmSign,jdbcType=INTEGER},
      delete_sign = #{record.deleteSign,jdbcType=BIT},
      financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
      financial_pay_time = #{record.financialPayTime,jdbcType=TIMESTAMP},
      confirm_time = #{record.confirmTime,jdbcType=TIMESTAMP},
      postscript = #{record.postscript,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderBill">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    update t_order_bill
    <set>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="creater != null">
        creater = #{creater,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="payeeId != null">
        payee_id = #{payeeId,jdbcType=VARCHAR},
      </if>
      <if test="payerId != null">
        payer_id = #{payerId,jdbcType=VARCHAR},
      </if>
      <if test="transactionAmount != null">
        transaction_amount = #{transactionAmount,jdbcType=DECIMAL},
      </if>
      <if test="transactionSubject != null">
        transaction_subject = #{transactionSubject,jdbcType=INTEGER},
      </if>
      <if test="transactionChannel != null">
        transaction_channel = #{transactionChannel,jdbcType=INTEGER},
      </if>
      <if test="transactionMode != null">
        transaction_mode = #{transactionMode,jdbcType=INTEGER},
      </if>
      <if test="remarks != null">
        remarks = #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="confirmSign != null">
        confirm_sign = #{confirmSign,jdbcType=INTEGER},
      </if>
      <if test="deleteSign != null">
        delete_sign = #{deleteSign,jdbcType=BIT},
      </if>
      <if test="financialPayNo != null">
        financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
      </if>
      <if test="financialPayTime != null">
        financial_pay_time = #{financialPayTime,jdbcType=TIMESTAMP},
      </if>
      <if test="confirmTime != null">
        confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      </if>
      <if test="postscript != null">
        postscript = #{postscript,jdbcType=VARCHAR},
      </if>
    </set>
    where bill_no = #{billNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderBill">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Jan 24 10:59:50 CST 2018.
    -->
    update t_order_bill
    set order_no = #{orderNo,jdbcType=VARCHAR},
      creater = #{creater,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      payee_id = #{payeeId,jdbcType=VARCHAR},
      payer_id = #{payerId,jdbcType=VARCHAR},
      transaction_amount = #{transactionAmount,jdbcType=DECIMAL},
      transaction_subject = #{transactionSubject,jdbcType=INTEGER},
      transaction_channel = #{transactionChannel,jdbcType=INTEGER},
      transaction_mode = #{transactionMode,jdbcType=INTEGER},
      remarks = #{remarks,jdbcType=VARCHAR},
      confirm_sign = #{confirmSign,jdbcType=INTEGER},
      delete_sign = #{deleteSign,jdbcType=BIT},
      financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
      financial_pay_time = #{financialPayTime,jdbcType=TIMESTAMP},
      confirm_time = #{confirmTime,jdbcType=TIMESTAMP},
      postscript = #{postscript,jdbcType=VARCHAR}
    where bill_no = #{billNo,jdbcType=VARCHAR}
  </update>
</mapper>