WeixinOrderListMapper.xml
1.79 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
<?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.yoho.lottery.dal.WeixinOrderListMapper">
<resultMap id="BaseResultMap" type="com.yoho.lottery.dal.model.WeixinOrderList">
<id column="order_code" jdbcType="BIGINT" property="orderCode" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
<result column="uid" jdbcType="INTEGER" property="uid" />
<result column="wx" jdbcType="VARCHAR" property="wx" />
<result column="prize_id" jdbcType="INTEGER" property="prizeId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from weixin_order_list
where order_code = #{orderCode,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.yoho.lottery.dal.model.WeixinOrderList">
insert into weixin_order_list (order_code, create_time, uid,
wx, prize_id)
values (#{orderCode,jdbcType=BIGINT}, #{createTime,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER},
#{wx,jdbcType=VARCHAR}, #{prizeId,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.lottery.dal.model.WeixinOrderList">
update weixin_order_list
set create_time = #{createTime,jdbcType=INTEGER},
uid = #{uid,jdbcType=INTEGER},
wx = #{wx,jdbcType=VARCHAR},
prize_id = #{prizeId,jdbcType=INTEGER}
where order_code = #{orderCode,jdbcType=BIGINT}
</update>
<select id="selectOrderCodeByUid" parameterType="java.lang.Integer">
select order_code
from weixin_order_list
where uid = #{uid,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select order_code, create_time, uid, wx, prize_id
from weixin_order_list
</select>
</mapper>