SearchAwsCompareQqMapper.xml
5.94 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?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.SearchAwsCompareQqMapper" >
<resultMap id="BaseResultMap" type="com.model.SearchAwsCompareQq" >
<id column="line" property="line" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="BIGINT" />
<result column="opt_time" property="optTime" jdbcType="BIGINT" />
<result column="different_percentage" property="differentPercentage" jdbcType="INTEGER" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.model.SearchAwsCompareQqWithBLOBs" extends="BaseResultMap" >
<result column="query" property="query" jdbcType="LONGVARCHAR" />
<result column="aws_skn" property="awsSkn" jdbcType="LONGVARCHAR" />
<result column="qq_skn" property="qqSkn" jdbcType="LONGVARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
line, create_time,opt_time,different_percentage
</sql>
<sql id="Blob_Column_List" >
query, aws_skn, qq_skn
</sql>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from search_aws_compare_qq
where line = #{line,jdbcType=INTEGER}
</select>
<select id="selectList" resultMap="ResultMapWithBLOBs" parameterType="com.monitor.model.domain.PageBean">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from search_aws_compare_qq
order by different_percentage desc
limit ${startIndex},${startIndex+pageSize}
</select>
<select id="selectCount" resultType="java.lang.Integer">
select
count(line)
from search_aws_compare_qq
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from search_aws_compare_qq
where line = #{line,jdbcType=INTEGER}
</delete>
<delete id="deleteAll">
delete from search_aws_compare_qq
</delete>
<delete id="deleteSize">
delete from search_aws_compare_qq
limit 1000
</delete>
<delete id="deleteLessThanLine">
delete from search_aws_compare_qq
where line <![CDATA[<]]> #{line,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.model.SearchAwsCompareQqWithBLOBs" >
insert into search_aws_compare_qq (line, create_time,opt_time,different_percentage, query,
aws_skn, qq_skn)
values (#{line,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT},#{optTime,jdbcType=BIGINT},#{differentPercentage,jdbcType=INTEGER}, #{query,jdbcType=LONGVARCHAR},
#{awsSkn,jdbcType=LONGVARCHAR}, #{qqSkn,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertBatch" parameterType="java.util.List">
insert into search_aws_compare_qq (line,create_time,opt_time,different_percentage,query,aws_skn,qq_skn)
values
<foreach collection="list" item="item" index="index" separator="," >
(#{item.line},#{item.createTime},#{item.optTime},#{item.differentPercentage},#{item.query},#{item.awsSkn},#{item.qqSkn})
</foreach>
</insert>
<insert id="insertSelective" parameterType="com.model.SearchAwsCompareQqWithBLOBs" >
insert into search_aws_compare_qq
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="line != null" >
line,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="optTime != null" >
opt_time,
</if>
<if test="differentPercentage != null" >
different_percentage,
</if>
<if test="query != null" >
query,
</if>
<if test="awsSkn != null" >
aws_skn,
</if>
<if test="qqSkn != null" >
qq_skn,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="line != null" >
#{line,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=BIGINT},
</if>
<if test="optTime != null" >
#{optTime,jdbcType=BIGINT},
</if>
<if test="differentPercentage != null" >
#{differentPercentage,jdbcType=INTEGER},
</if>
<if test="query != null" >
#{query,jdbcType=LONGVARCHAR},
</if>
<if test="awsSkn != null" >
#{awsSkn,jdbcType=LONGVARCHAR},
</if>
<if test="qqSkn != null" >
#{qqSkn,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.model.SearchAwsCompareQqWithBLOBs" >
update search_aws_compare_qq
<set >
<if test="createTime != null" >
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="optTime != null" >
opt_time = #{optTime,jdbcType=BIGINT},
</if>
<if test="differentPercentage != null" >
different_percentage = #{differentPercentage,jdbcType=BIGINT},
</if>
<if test="query != null" >
query = #{query,jdbcType=LONGVARCHAR},
</if>
<if test="awsSkn != null" >
aws_skn = #{awsSkn,jdbcType=LONGVARCHAR},
</if>
<if test="qqSkn != null" >
qq_skn = #{qqSkn,jdbcType=LONGVARCHAR},
</if>
</set>
where line = #{line,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.model.SearchAwsCompareQqWithBLOBs" >
update search_aws_compare_qq
set create_time = #{createTime,jdbcType=BIGINT},
opt_time = #{optTime,jdbcType=BIGINT},
different_percentage = #{differentPercentage,jdbcType=INTEGER},
query = #{query,jdbcType=LONGVARCHAR},
aws_skn = #{awsSkn,jdbcType=LONGVARCHAR},
qq_skn = #{qqSkn,jdbcType=LONGVARCHAR}
where line = #{line,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.model.SearchAwsCompareQq" >
update search_aws_compare_qq
set create_time = #{createTime,jdbcType=BIGINT}
where line = #{line,jdbcType=INTEGER}
</update>
</mapper>