OrdersPayHbfqMapper.xml
3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?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.OrdersPayHbfqMapper" >
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.OrdersPayHbfq" >
<id column="fq_trade_no" property="fqTradeNo" jdbcType="VARCHAR" />
<result column="pay_order_code" property="payOrderCode" jdbcType="VARCHAR" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
fq_trade_no, pay_order_code, uid, create_time, update_time
</sql>
<insert id="insertOnDuplicateUpdate" parameterType="com.yoho.yhorder.dal.model.OrdersPayHbfq" >
insert into orders_pay_hbfq (fq_trade_no, pay_order_code, uid, create_time)
values(#{fqTradeNo,jdbcType=VARCHAR}, #{payOrderCode,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER}, UNIX_TIMESTAMP())
on duplicate key update update_time = UNIX_TIMESTAMP()
</insert>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from orders_pay_hbfq
where fq_trade_no = #{fqTradeNo,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from orders_pay_hbfq
where fq_trade_no = #{fqTradeNo,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.yohoufo.dal.order.model.OrdersPayHbfq" >
insert into orders_pay_hbfq (fq_trade_no, pay_order_code, uid,
create_time, update_time)
values (#{fqTradeNo,jdbcType=VARCHAR}, #{payOrderCode,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.yohoufo.dal.order.model.OrdersPayHbfq" >
insert into orders_pay_hbfq
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="fqTradeNo != null" >
fq_trade_no,
</if>
<if test="payOrderCode != null" >
pay_order_code,
</if>
<if test="uid != null" >
uid,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="fqTradeNo != null" >
#{fqTradeNo,jdbcType=VARCHAR},
</if>
<if test="payOrderCode != null" >
#{payOrderCode,jdbcType=VARCHAR},
</if>
<if test="uid != null" >
#{uid,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.OrdersPayHbfq" >
update orders_pay_hbfq
<set >
<if test="payOrderCode != null" >
pay_order_code = #{payOrderCode,jdbcType=VARCHAR},
</if>
<if test="uid != null" >
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
</set>
where fq_trade_no = #{fqTradeNo,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.OrdersPayHbfq" >
update orders_pay_hbfq
set pay_order_code = #{payOrderCode,jdbcType=VARCHAR},
uid = #{uid,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER}
where fq_trade_no = #{fqTradeNo,jdbcType=VARCHAR}
</update>
</mapper>