LotteryCountMapper.xml
1.8 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.LotteryCountMapper">
<resultMap id="BaseResultMap" type="com.yoho.lottery.dal.model.LotteryCount">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="uid" jdbcType="INTEGER" property="uid" />
<result column="key_string" jdbcType="VARCHAR" property="keyString" />
<result column="project" jdbcType="VARCHAR" property="project" />
<result column="create_time" jdbcType="INTEGER" property="createTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from lottery_count
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.lottery.dal.model.LotteryCount">
insert into lottery_count (id, uid, key_string,
project, create_time)
values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{keyString,jdbcType=VARCHAR},
#{project,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yoho.lottery.dal.model.LotteryCount">
update lottery_count
set uid = #{uid,jdbcType=INTEGER},
key_string = #{keyString,jdbcType=VARCHAR},
project = #{project,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, uid, key_string, project, create_time
from lottery_count
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, uid, key_string, project, create_time
from lottery_count
</select>
</mapper>