LotteryGiftRelationBkbkMapper.xml
1.88 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.LotteryGiftRelationBkbkMapper">
<resultMap id="BaseResultMap" type="com.yoho.lottery.dal.model.LotteryGiftRelationBkbk">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="lottery_id" jdbcType="INTEGER" property="lotteryId" />
<result column="gift_id" jdbcType="INTEGER" property="giftId" />
<result column="total" jdbcType="VARCHAR" property="total" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from lottery_gift_relation_bkbk
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.lottery.dal.model.LotteryGiftRelationBkbk">
insert into lottery_gift_relation_bkbk (id, lottery_id, gift_id,
total, remark)
values (#{id,jdbcType=INTEGER}, #{lotteryId,jdbcType=INTEGER}, #{giftId,jdbcType=INTEGER},
#{total,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.lottery.dal.model.LotteryGiftRelationBkbk">
update lottery_gift_relation_bkbk
set lottery_id = #{lotteryId,jdbcType=INTEGER},
gift_id = #{giftId,jdbcType=INTEGER},
total = #{total,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, lottery_id, gift_id, total, remark
from lottery_gift_relation_bkbk
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, lottery_id, gift_id, total, remark
from lottery_gift_relation_bkbk
</select>
</mapper>