|
|
<?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.yohoufo.dal.order.DepositOrderMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.DepositOrder">
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="uid" jdbcType="INTEGER" property="uid" />
|
|
|
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
|
|
|
<result column="deposit_code" jdbcType="VARCHAR" property="depositCode" />
|
|
|
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
|
|
<result column="payment" jdbcType="INTEGER" property="payment" />
|
|
|
<result column="client_type" jdbcType="INTEGER" property="clientType" />
|
|
|
<result column="event_type" jdbcType="INTEGER" property="eventType" />
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
<result column="create_time" jdbcType="INTEGER" property="createTime" />
|
|
|
<result column="update_time" jdbcType="INTEGER" property="updateTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status,
|
|
|
create_time, update_time
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByOrderCode" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from deposit_order
|
|
|
where order_code = #{orderCode,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.DepositOrder" useGeneratedKeys="true">
|
|
|
insert into deposit_order
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="uid != null">
|
|
|
uid,
|
|
|
</if>
|
|
|
<if test="orderCode != null">
|
|
|
order_code,
|
|
|
</if>
|
|
|
<if test="depositCode != null">
|
|
|
deposit_code,
|
|
|
</if>
|
|
|
<if test="amount != null">
|
|
|
amount,
|
|
|
</if>
|
|
|
<if test="payment != null">
|
|
|
payment,
|
|
|
</if>
|
|
|
<if test="clientType != null">
|
|
|
client_type,
|
|
|
</if>
|
|
|
<if test="eventType != null">
|
|
|
event_type,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
update_time,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="uid != null">
|
|
|
#{uid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="orderCode != null">
|
|
|
#{orderCode,jdbcType=BIGINT},
|
|
|
</if>
|
|
|
<if test="depositCode != null">
|
|
|
#{depositCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="amount != null">
|
|
|
#{amount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="payment != null">
|
|
|
#{payment,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="clientType != null">
|
|
|
#{clientType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="eventType != null">
|
|
|
#{eventType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
#{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.DepositOrder">
|
|
|
update deposit_order
|
|
|
<set>
|
|
|
<if test="payment != null">
|
|
|
payment = #{payment,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="clientType != null">
|
|
|
client_type = #{clientType,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
|
|
|
<if test="updateTime != null">
|
|
|
update_time = #{updateTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|