AlipayMapper.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.canrd.core.dal.mapper.AlipayMapper">
  <resultMap id="BaseResultMap" type="com.canrd.core.dal.model.Alipay">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="out_trade_no" jdbcType="VARCHAR" property="outTradeNo" />
    <result column="subject" jdbcType="VARCHAR" property="subject" />
    <result column="payment_type" jdbcType="VARCHAR" property="paymentType" />
    <result column="trade_no" jdbcType="VARCHAR" property="tradeNo" />
    <result column="trade_status" jdbcType="CHAR" property="tradeStatus" />
    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
    <result column="total_fee" jdbcType="REAL" property="totalFee" />
    <result column="body" jdbcType="VARCHAR" property="body" />
    <result column="return_url" jdbcType="VARCHAR" property="returnUrl" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_trade_status" jdbcType="TIMESTAMP" property="gmtTradeStatus" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, out_trade_no, subject, payment_type, trade_no, trade_status, buyer_id, total_fee, 
    body, return_url, gmt_create, gmt_trade_status
  </sql>
  <select id="selectByExample" parameterType="com.canrd.core.dal.model.AlipayExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from alipay
    <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.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from alipay
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from alipay
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.canrd.core.dal.model.AlipayExample">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from alipay
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.canrd.core.dal.model.Alipay">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into alipay (out_trade_no, subject, payment_type, 
      trade_no, trade_status, buyer_id, 
      total_fee, body, return_url, 
      gmt_create, gmt_trade_status)
    values (#{outTradeNo,jdbcType=VARCHAR}, #{subject,jdbcType=VARCHAR}, #{paymentType,jdbcType=VARCHAR}, 
      #{tradeNo,jdbcType=VARCHAR}, #{tradeStatus,jdbcType=CHAR}, #{buyerId,jdbcType=VARCHAR}, 
      #{totalFee,jdbcType=REAL}, #{body,jdbcType=VARCHAR}, #{returnUrl,jdbcType=VARCHAR}, 
      #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtTradeStatus,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.canrd.core.dal.model.Alipay">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into alipay
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="outTradeNo != null">
        out_trade_no,
      </if>
      <if test="subject != null">
        subject,
      </if>
      <if test="paymentType != null">
        payment_type,
      </if>
      <if test="tradeNo != null">
        trade_no,
      </if>
      <if test="tradeStatus != null">
        trade_status,
      </if>
      <if test="buyerId != null">
        buyer_id,
      </if>
      <if test="totalFee != null">
        total_fee,
      </if>
      <if test="body != null">
        body,
      </if>
      <if test="returnUrl != null">
        return_url,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtTradeStatus != null">
        gmt_trade_status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="outTradeNo != null">
        #{outTradeNo,jdbcType=VARCHAR},
      </if>
      <if test="subject != null">
        #{subject,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="tradeNo != null">
        #{tradeNo,jdbcType=VARCHAR},
      </if>
      <if test="tradeStatus != null">
        #{tradeStatus,jdbcType=CHAR},
      </if>
      <if test="buyerId != null">
        #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="totalFee != null">
        #{totalFee,jdbcType=REAL},
      </if>
      <if test="body != null">
        #{body,jdbcType=VARCHAR},
      </if>
      <if test="returnUrl != null">
        #{returnUrl,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtTradeStatus != null">
        #{gmtTradeStatus,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.canrd.core.dal.model.AlipayExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from alipay
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.outTradeNo != null">
        out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR},
      </if>
      <if test="record.subject != null">
        subject = #{record.subject,jdbcType=VARCHAR},
      </if>
      <if test="record.paymentType != null">
        payment_type = #{record.paymentType,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeNo != null">
        trade_no = #{record.tradeNo,jdbcType=VARCHAR},
      </if>
      <if test="record.tradeStatus != null">
        trade_status = #{record.tradeStatus,jdbcType=CHAR},
      </if>
      <if test="record.buyerId != null">
        buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      </if>
      <if test="record.totalFee != null">
        total_fee = #{record.totalFee,jdbcType=REAL},
      </if>
      <if test="record.body != null">
        body = #{record.body,jdbcType=VARCHAR},
      </if>
      <if test="record.returnUrl != null">
        return_url = #{record.returnUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.gmtCreate != null">
        gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtTradeStatus != null">
        gmt_trade_status = #{record.gmtTradeStatus,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay
    set id = #{record.id,jdbcType=INTEGER},
      out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR},
      subject = #{record.subject,jdbcType=VARCHAR},
      payment_type = #{record.paymentType,jdbcType=VARCHAR},
      trade_no = #{record.tradeNo,jdbcType=VARCHAR},
      trade_status = #{record.tradeStatus,jdbcType=CHAR},
      buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      total_fee = #{record.totalFee,jdbcType=REAL},
      body = #{record.body,jdbcType=VARCHAR},
      return_url = #{record.returnUrl,jdbcType=VARCHAR},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_trade_status = #{record.gmtTradeStatus,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.canrd.core.dal.model.Alipay">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay
    <set>
      <if test="outTradeNo != null">
        out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
      </if>
      <if test="subject != null">
        subject = #{subject,jdbcType=VARCHAR},
      </if>
      <if test="paymentType != null">
        payment_type = #{paymentType,jdbcType=VARCHAR},
      </if>
      <if test="tradeNo != null">
        trade_no = #{tradeNo,jdbcType=VARCHAR},
      </if>
      <if test="tradeStatus != null">
        trade_status = #{tradeStatus,jdbcType=CHAR},
      </if>
      <if test="buyerId != null">
        buyer_id = #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="totalFee != null">
        total_fee = #{totalFee,jdbcType=REAL},
      </if>
      <if test="body != null">
        body = #{body,jdbcType=VARCHAR},
      </if>
      <if test="returnUrl != null">
        return_url = #{returnUrl,jdbcType=VARCHAR},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtTradeStatus != null">
        gmt_trade_status = #{gmtTradeStatus,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.canrd.core.dal.model.Alipay">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay
    set out_trade_no = #{outTradeNo,jdbcType=VARCHAR},
      subject = #{subject,jdbcType=VARCHAR},
      payment_type = #{paymentType,jdbcType=VARCHAR},
      trade_no = #{tradeNo,jdbcType=VARCHAR},
      trade_status = #{tradeStatus,jdbcType=CHAR},
      buyer_id = #{buyerId,jdbcType=VARCHAR},
      total_fee = #{totalFee,jdbcType=REAL},
      body = #{body,jdbcType=VARCHAR},
      return_url = #{returnUrl,jdbcType=VARCHAR},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_trade_status = #{gmtTradeStatus,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>