ABTestTotalMapper.xml
2.6 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
<?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.monitor.mysql.mapper.ABTestTotalMapper" >
<resultMap id="BaseResultMap" type="com.model.ABTestTotal" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="startTime" property="start_time" jdbcType="VARCHAR" />
<result column="endTime" property="end_time" jdbcType="VARCHAR" />
<result column="in_use" property="inUse" jdbcType="INTEGER" />
<result column="app_type" property="appType" jdbcType="VARCHAR" />
<result column="app_version" property="appVersion" jdbcType="VARCHAR" />
<result column="modulo_num_start" property="moduloNumStart" jdbcType="VARCHAR" />
<result column="modulo_num_end" property="moduloNumEnd" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, type, in_use, app_type, app_version, start_time ,end_time,modulo_num_start,modulo_num_end
</sql>
<insert id="insert" parameterType="com.model.ABTestTotal" >
insert into ab_test_total
(type, in_use, app_type, app_version, start_time ,end_time,modulo_num_start,modulo_num_end)
values
(#{type,jdbcType=VARCHAR},#{inUse,jdbcType=INTEGER},
#{appType,jdbcType=VARCHAR},#{appVersion,jdbcType=VARCHAR},
#{startTime,jdbcType=VARCHAR}, #{endTime,jdbcType=VARCHAR},
#{moduloNumStart,jdbcType=VARCHAR}, #{moduloNumEnd,jdbcType=VARCHAR}
)
</insert>
<update id="update" parameterType="com.model.ABTestTotal" >
update ab_test_total
set
in_use = #{inUse,jdbcType=INTEGER},
app_type = #{appType,jdbcType=VARCHAR},
app_version = #{appVersion,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=VARCHAR},
end_time = #{endTime,jdbcType=VARCHAR},
modulo_num_start = #{moduloNumStart,jdbcType=VARCHAR},
modulo_num_end = #{moduloNumEnd,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ab_test_total
</select>
<delete id="delete" parameterType="java.lang.Integer" >
delete from ab_test_total
where id = #{id,jdbcType=INTEGER}
</delete>
<select id="selectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from ab_test_total
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectTypes" resultType="java.lang.String">
SELECT type FROM ab_test_total order by id
</select>
</mapper>