123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <?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.yonge.cooleshow.mbg.mapper.UserOrderRefundMapper">
- <resultMap id="BaseResultMap" type="com.yonge.cooleshow.mbg.model.UserOrderRefund">
- <!--@mbg.generated-->
- <!--@Table user_order_refund-->
- <id column="id_" jdbcType="BIGINT" property="id" />
- <result column="return_id_" jdbcType="VARCHAR" property="returnId" />
- <result column="order_no_" jdbcType="VARCHAR" property="orderNo" />
- <result column="trans_no_" jdbcType="VARCHAR" property="transNo" />
- <result column="pay_trans_no_" jdbcType="VARCHAR" property="payTransNo" />
- <result column="refund_amt_" jdbcType="DECIMAL" property="refundAmt" />
- <result column="fee_amt_" jdbcType="DECIMAL" property="feeAmt" />
- <result column="status_" jdbcType="VARCHAR" property="status" />
- <result column="pay_fail_msg_" jdbcType="VARCHAR" property="payFailMsg" />
- <result column="arrival_time_" jdbcType="TIMESTAMP" property="arrivalTime" />
- <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
- <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--@mbg.generated-->
- <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">
- <!--@mbg.generated-->
- <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">
- <!--@mbg.generated-->
- id_, order_no_, trans_no_, pay_trans_no_, refund_amt_, fee_amt_, status_, pay_fail_msg_,
- arrival_time_, create_time_, update_time_,return_id_
- </sql>
- <select id="selectByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from user_order_refund
- <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">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from user_order_refund
- where id_ = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- <!--@mbg.generated-->
- delete from user_order_refund
- where id_ = #{id,jdbcType=BIGINT}
- </delete>
- <delete id="deleteByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample">
- <!--@mbg.generated-->
- delete from user_order_refund
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into user_order_refund (order_no_, trans_no_, pay_trans_no_,
- refund_amt_, fee_amt_, status_,
- pay_fail_msg_, arrival_time_, create_time_,
- update_time_,return_id_)
- values (#{orderNo,jdbcType=VARCHAR}, #{transNo,jdbcType=VARCHAR}, #{payTransNo,jdbcType=VARCHAR},
- #{refundAmt,jdbcType=DECIMAL}, #{feeAmt,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR},
- #{payFailMsg,jdbcType=VARCHAR}, #{arrivalTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
- #{updateTime,jdbcType=TIMESTAMP},#{returnId})
- </insert>
- <insert id="insertSelective" keyColumn="id_" keyProperty="id" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into user_order_refund
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderNo != null">
- order_no_,
- </if>
- <if test="transNo != null">
- trans_no_,
- </if>
- <if test="payTransNo != null">
- pay_trans_no_,
- </if>
- <if test="refundAmt != null">
- refund_amt_,
- </if>
- <if test="feeAmt != null">
- fee_amt_,
- </if>
- <if test="status != null">
- status_,
- </if>
- <if test="payFailMsg != null">
- pay_fail_msg_,
- </if>
- <if test="arrivalTime != null">
- arrival_time_,
- </if>
- <if test="createTime != null">
- create_time_,
- </if>
- <if test="updateTime != null">
- update_time_,
- </if>
- <if test="returnId != null">
- return_id_,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderNo != null">
- #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="transNo != null">
- #{transNo,jdbcType=VARCHAR},
- </if>
- <if test="payTransNo != null">
- #{payTransNo,jdbcType=VARCHAR},
- </if>
- <if test="refundAmt != null">
- #{refundAmt,jdbcType=DECIMAL},
- </if>
- <if test="feeAmt != null">
- #{feeAmt,jdbcType=DECIMAL},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="payFailMsg != null">
- #{payFailMsg,jdbcType=VARCHAR},
- </if>
- <if test="arrivalTime != null">
- #{arrivalTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="returnId != null">
- #{returnId},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefundExample" resultType="java.lang.Long">
- <!--@mbg.generated-->
- select count(*) from user_order_refund
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--@mbg.generated-->
- update user_order_refund
- <set>
- <if test="record.id != null">
- id_ = #{record.id,jdbcType=BIGINT},
- </if>
- <if test="record.orderNo != null">
- order_no_ = #{record.orderNo,jdbcType=VARCHAR},
- </if>
- <if test="record.transNo != null">
- trans_no_ = #{record.transNo,jdbcType=VARCHAR},
- </if>
- <if test="record.payTransNo != null">
- pay_trans_no_ = #{record.payTransNo,jdbcType=VARCHAR},
- </if>
- <if test="record.refundAmt != null">
- refund_amt_ = #{record.refundAmt,jdbcType=DECIMAL},
- </if>
- <if test="record.feeAmt != null">
- fee_amt_ = #{record.feeAmt,jdbcType=DECIMAL},
- </if>
- <if test="record.status != null">
- status_ = #{record.status,jdbcType=VARCHAR},
- </if>
- <if test="record.payFailMsg != null">
- pay_fail_msg_ = #{record.payFailMsg,jdbcType=VARCHAR},
- </if>
- <if test="record.arrivalTime != null">
- arrival_time_ = #{record.arrivalTime,jdbcType=TIMESTAMP},
- </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.returnId != null">
- return_id_ = #{record.returnId,jdbcType=BIGINT},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--@mbg.generated-->
- update user_order_refund
- set id_ = #{record.id,jdbcType=BIGINT},
- order_no_ = #{record.orderNo,jdbcType=VARCHAR},
- trans_no_ = #{record.transNo,jdbcType=VARCHAR},
- pay_trans_no_ = #{record.payTransNo,jdbcType=VARCHAR},
- refund_amt_ = #{record.refundAmt,jdbcType=DECIMAL},
- fee_amt_ = #{record.feeAmt,jdbcType=DECIMAL},
- status_ = #{record.status,jdbcType=VARCHAR},
- pay_fail_msg_ = #{record.payFailMsg,jdbcType=VARCHAR},
- arrival_time_ = #{record.arrivalTime,jdbcType=TIMESTAMP},
- create_time_ = #{record.createTime,jdbcType=TIMESTAMP},
- return_id_ = #{record.returnId,jdbcType=BIGINT},
- update_time_ = #{record.updateTime,jdbcType=TIMESTAMP}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund">
- <!--@mbg.generated-->
- update user_order_refund
- <set>
- <if test="orderNo != null">
- order_no_ = #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="transNo != null">
- trans_no_ = #{transNo,jdbcType=VARCHAR},
- </if>
- <if test="payTransNo != null">
- pay_trans_no_ = #{payTransNo,jdbcType=VARCHAR},
- </if>
- <if test="refundAmt != null">
- refund_amt_ = #{refundAmt,jdbcType=DECIMAL},
- </if>
- <if test="feeAmt != null">
- fee_amt_ = #{feeAmt,jdbcType=DECIMAL},
- </if>
- <if test="status != null">
- status_ = #{status,jdbcType=VARCHAR},
- </if>
- <if test="payFailMsg != null">
- pay_fail_msg_ = #{payFailMsg,jdbcType=VARCHAR},
- </if>
- <if test="arrivalTime != null">
- arrival_time_ = #{arrivalTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createTime != null">
- create_time_ = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time_ = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="returnId != null">
- return_id_ = #{returnId,jdbcType=BIGINT},
- </if>
- </set>
- where id_ = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.yonge.cooleshow.mbg.model.UserOrderRefund">
- <!--@mbg.generated-->
- update user_order_refund
- set order_no_ = #{orderNo,jdbcType=VARCHAR},
- trans_no_ = #{transNo,jdbcType=VARCHAR},
- pay_trans_no_ = #{payTransNo,jdbcType=VARCHAR},
- refund_amt_ = #{refundAmt,jdbcType=DECIMAL},
- fee_amt_ = #{feeAmt,jdbcType=DECIMAL},
- status_ = #{status,jdbcType=VARCHAR},
- pay_fail_msg_ = #{payFailMsg,jdbcType=VARCHAR},
- arrival_time_ = #{arrivalTime,jdbcType=TIMESTAMP},
- create_time_ = #{createTime,jdbcType=TIMESTAMP},
- return_id_ = #{returnId,jdbcType=BIGINT},
- update_time_ = #{updateTime,jdbcType=TIMESTAMP}
- where id_ = #{id,jdbcType=BIGINT}
- </update>
- <select id="selectByTransNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user_order_refund
- where #{transNo} = trans_no_ limit 1
- </select>
- <select id="selectByRefundNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user_order_refund
- where #{refundOrderNo} = order_no_ limit 1
- </select>
- </mapper>
|