|
|
@@ -1,293 +1,432 @@
|
|
1
|
|
-<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
|
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
3
|
|
-<mapper namespace="com.chinaitop.depot.intelligent.grainsituation.mapper.TCcdataMapper" >
|
|
4
|
|
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
5
|
|
- <result column="id" property="id" jdbcType="VARCHAR" />
|
|
6
|
|
- <result column="org_id" property="orgId" jdbcType="VARCHAR" />
|
|
7
|
|
- <result column="v_cc_code" property="vCcCode" jdbcType="VARCHAR" />
|
|
8
|
|
- <result column="i_tdh" property="iTdh" jdbcType="INTEGER" />
|
|
9
|
|
- <result column="i_value" property="iValue" jdbcType="INTEGER" />
|
|
10
|
|
- <result column="v_update_time" property="vUpdateTime" jdbcType="TIMESTAMP" />
|
|
11
|
|
- <result column="data_source" property="dataSource" jdbcType="VARCHAR" />
|
|
12
|
|
- <result column="v_remark" property="vRemark" jdbcType="VARCHAR" />
|
|
13
|
|
- </resultMap>
|
|
14
|
|
- <resultMap id="ResultMapWithBLOBs" type="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" extends="BaseResultMap" >
|
|
15
|
|
- <result column="c_image" property="cImage" jdbcType="LONGVARBINARY" />
|
|
16
|
|
- </resultMap>
|
|
17
|
|
- <sql id="Example_Where_Clause" >
|
|
18
|
|
- <where >
|
|
19
|
|
- <foreach collection="oredCriteria" item="criteria" separator="or" >
|
|
20
|
|
- <if test="criteria.valid" >
|
|
21
|
|
- <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
22
|
|
- <foreach collection="criteria.criteria" item="criterion" >
|
|
23
|
|
- <choose >
|
|
24
|
|
- <when test="criterion.noValue" >
|
|
25
|
|
- and ${criterion.condition}
|
|
26
|
|
- </when>
|
|
27
|
|
- <when test="criterion.singleValue" >
|
|
28
|
|
- and ${criterion.condition} #{criterion.value}
|
|
29
|
|
- </when>
|
|
30
|
|
- <when test="criterion.betweenValue" >
|
|
31
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
32
|
|
- </when>
|
|
33
|
|
- <when test="criterion.listValue" >
|
|
34
|
|
- and ${criterion.condition}
|
|
35
|
|
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
36
|
|
- #{listItem}
|
|
37
|
|
- </foreach>
|
|
38
|
|
- </when>
|
|
39
|
|
- </choose>
|
|
40
|
|
- </foreach>
|
|
41
|
|
- </trim>
|
|
42
|
|
- </if>
|
|
43
|
|
- </foreach>
|
|
44
|
|
- </where>
|
|
45
|
|
- </sql>
|
|
46
|
|
- <sql id="Update_By_Example_Where_Clause" >
|
|
47
|
|
- <where >
|
|
48
|
|
- <foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
|
49
|
|
- <if test="criteria.valid" >
|
|
50
|
|
- <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
51
|
|
- <foreach collection="criteria.criteria" item="criterion" >
|
|
52
|
|
- <choose >
|
|
53
|
|
- <when test="criterion.noValue" >
|
|
54
|
|
- and ${criterion.condition}
|
|
55
|
|
- </when>
|
|
56
|
|
- <when test="criterion.singleValue" >
|
|
57
|
|
- and ${criterion.condition} #{criterion.value}
|
|
58
|
|
- </when>
|
|
59
|
|
- <when test="criterion.betweenValue" >
|
|
60
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
61
|
|
- </when>
|
|
62
|
|
- <when test="criterion.listValue" >
|
|
63
|
|
- and ${criterion.condition}
|
|
64
|
|
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
65
|
|
- #{listItem}
|
|
66
|
|
- </foreach>
|
|
67
|
|
- </when>
|
|
68
|
|
- </choose>
|
|
69
|
|
- </foreach>
|
|
70
|
|
- </trim>
|
|
71
|
|
- </if>
|
|
72
|
|
- </foreach>
|
|
73
|
|
- </where>
|
|
74
|
|
- </sql>
|
|
75
|
|
- <sql id="Base_Column_List" >
|
|
76
|
|
- id, org_id, v_cc_code, i_tdh, i_value, v_update_time, data_source, v_remark
|
|
77
|
|
- </sql>
|
|
78
|
|
- <sql id="Blob_Column_List" >
|
|
79
|
|
- c_image
|
|
80
|
|
- </sql>
|
|
81
|
|
- <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
82
|
|
- select
|
|
83
|
|
- <if test="distinct" >
|
|
84
|
|
- distinct
|
|
85
|
|
- </if>
|
|
86
|
|
- <include refid="Base_Column_List" />
|
|
87
|
|
- ,
|
|
88
|
|
- <include refid="Blob_Column_List" />
|
|
89
|
|
- from t_ccdata
|
|
90
|
|
- <if test="_parameter != null" >
|
|
91
|
|
- <include refid="Example_Where_Clause" />
|
|
92
|
|
- </if>
|
|
93
|
|
- <if test="orderByClause != null" >
|
|
94
|
|
- order by ${orderByClause}
|
|
95
|
|
- </if>
|
|
96
|
|
- </select>
|
|
97
|
|
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
98
|
|
- select
|
|
99
|
|
- <if test="distinct" >
|
|
100
|
|
- distinct
|
|
101
|
|
- </if>
|
|
102
|
|
- <include refid="Base_Column_List" />
|
|
103
|
|
- from t_ccdata
|
|
104
|
|
- <if test="_parameter != null" >
|
|
105
|
|
- <include refid="Example_Where_Clause" />
|
|
106
|
|
- </if>
|
|
107
|
|
- <if test="orderByClause != null" >
|
|
108
|
|
- order by ${orderByClause}
|
|
109
|
|
- </if>
|
|
110
|
|
- </select>
|
|
111
|
|
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
112
|
|
- delete from t_ccdata
|
|
113
|
|
- <if test="_parameter != null" >
|
|
114
|
|
- <include refid="Example_Where_Clause" />
|
|
115
|
|
- </if>
|
|
116
|
|
- </delete>
|
|
117
|
|
- <insert id="insert" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
118
|
|
- insert into t_ccdata (id, org_id, v_cc_code,
|
|
119
|
|
- i_tdh, i_value, v_update_time,
|
|
120
|
|
- data_source, v_remark, c_image
|
|
121
|
|
- )
|
|
122
|
|
- values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vCcCode,jdbcType=VARCHAR},
|
|
123
|
|
- #{iTdh,jdbcType=INTEGER}, #{iValue,jdbcType=INTEGER}, #{vUpdateTime,jdbcType=TIMESTAMP},
|
|
124
|
|
- #{dataSource,jdbcType=VARCHAR}, #{vRemark,jdbcType=VARCHAR}, #{cImage,jdbcType=LONGVARBINARY}
|
|
125
|
|
- )
|
|
126
|
|
- </insert>
|
|
127
|
|
- <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
128
|
|
- insert into t_ccdata
|
|
129
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
130
|
|
- <if test="id != null" >
|
|
131
|
|
- id,
|
|
132
|
|
- </if>
|
|
133
|
|
- <if test="orgId != null" >
|
|
134
|
|
- org_id,
|
|
135
|
|
- </if>
|
|
136
|
|
- <if test="vCcCode != null" >
|
|
137
|
|
- v_cc_code,
|
|
138
|
|
- </if>
|
|
139
|
|
- <if test="iTdh != null" >
|
|
140
|
|
- i_tdh,
|
|
141
|
|
- </if>
|
|
142
|
|
- <if test="iValue != null" >
|
|
143
|
|
- i_value,
|
|
144
|
|
- </if>
|
|
145
|
|
- <if test="vUpdateTime != null" >
|
|
146
|
|
- v_update_time,
|
|
147
|
|
- </if>
|
|
148
|
|
- <if test="dataSource != null" >
|
|
149
|
|
- data_source,
|
|
150
|
|
- </if>
|
|
151
|
|
- <if test="vRemark != null" >
|
|
152
|
|
- v_remark,
|
|
153
|
|
- </if>
|
|
154
|
|
- <if test="cImage != null" >
|
|
155
|
|
- c_image,
|
|
156
|
|
- </if>
|
|
157
|
|
- </trim>
|
|
158
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
159
|
|
- <if test="id != null" >
|
|
160
|
|
- #{id,jdbcType=VARCHAR},
|
|
161
|
|
- </if>
|
|
162
|
|
- <if test="orgId != null" >
|
|
163
|
|
- #{orgId,jdbcType=VARCHAR},
|
|
164
|
|
- </if>
|
|
165
|
|
- <if test="vCcCode != null" >
|
|
166
|
|
- #{vCcCode,jdbcType=VARCHAR},
|
|
167
|
|
- </if>
|
|
168
|
|
- <if test="iTdh != null" >
|
|
169
|
|
- #{iTdh,jdbcType=INTEGER},
|
|
170
|
|
- </if>
|
|
171
|
|
- <if test="iValue != null" >
|
|
172
|
|
- #{iValue,jdbcType=INTEGER},
|
|
173
|
|
- </if>
|
|
174
|
|
- <if test="vUpdateTime != null" >
|
|
175
|
|
- #{vUpdateTime,jdbcType=TIMESTAMP},
|
|
176
|
|
- </if>
|
|
177
|
|
- <if test="dataSource != null" >
|
|
178
|
|
- #{dataSource,jdbcType=VARCHAR},
|
|
179
|
|
- </if>
|
|
180
|
|
- <if test="vRemark != null" >
|
|
181
|
|
- #{vRemark,jdbcType=VARCHAR},
|
|
182
|
|
- </if>
|
|
183
|
|
- <if test="cImage != null" >
|
|
184
|
|
- #{cImage,jdbcType=LONGVARBINARY},
|
|
185
|
|
- </if>
|
|
186
|
|
- </trim>
|
|
187
|
|
- </insert>
|
|
188
|
|
- <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" resultType="java.lang.Integer" >
|
|
189
|
|
- select count(*) from t_ccdata
|
|
190
|
|
- <if test="_parameter != null" >
|
|
191
|
|
- <include refid="Example_Where_Clause" />
|
|
192
|
|
- </if>
|
|
193
|
|
- </select>
|
|
194
|
|
- <update id="updateByExampleSelective" parameterType="map" >
|
|
195
|
|
- update t_ccdata
|
|
196
|
|
- <set >
|
|
197
|
|
- <if test="record.id != null" >
|
|
198
|
|
- id = #{record.id,jdbcType=VARCHAR},
|
|
199
|
|
- </if>
|
|
200
|
|
- <if test="record.orgId != null" >
|
|
201
|
|
- org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
202
|
|
- </if>
|
|
203
|
|
- <if test="record.vCcCode != null" >
|
|
204
|
|
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
205
|
|
- </if>
|
|
206
|
|
- <if test="record.iTdh != null" >
|
|
207
|
|
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
208
|
|
- </if>
|
|
209
|
|
- <if test="record.iValue != null" >
|
|
210
|
|
- i_value = #{record.iValue,jdbcType=INTEGER},
|
|
211
|
|
- </if>
|
|
212
|
|
- <if test="record.vUpdateTime != null" >
|
|
213
|
|
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
214
|
|
- </if>
|
|
215
|
|
- <if test="record.dataSource != null" >
|
|
216
|
|
- data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
217
|
|
- </if>
|
|
218
|
|
- <if test="record.vRemark != null" >
|
|
219
|
|
- v_remark = #{record.vRemark,jdbcType=VARCHAR},
|
|
220
|
|
- </if>
|
|
221
|
|
- <if test="record.cImage != null" >
|
|
222
|
|
- c_image = #{record.cImage,jdbcType=LONGVARBINARY},
|
|
223
|
|
- </if>
|
|
224
|
|
- </set>
|
|
225
|
|
- <if test="_parameter != null" >
|
|
226
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
227
|
|
- </if>
|
|
228
|
|
- </update>
|
|
229
|
|
- <update id="updateByExampleWithBLOBs" parameterType="map" >
|
|
230
|
|
- update t_ccdata
|
|
231
|
|
- set id = #{record.id,jdbcType=VARCHAR},
|
|
232
|
|
- org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
233
|
|
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
234
|
|
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
235
|
|
- i_value = #{record.iValue,jdbcType=INTEGER},
|
|
236
|
|
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
237
|
|
- data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
238
|
|
- v_remark = #{record.vRemark,jdbcType=VARCHAR},
|
|
239
|
|
- c_image = #{record.cImage,jdbcType=LONGVARBINARY}
|
|
240
|
|
- <if test="_parameter != null" >
|
|
241
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
242
|
|
- </if>
|
|
243
|
|
- </update>
|
|
244
|
|
- <update id="updateByExample" parameterType="map" >
|
|
245
|
|
- update t_ccdata
|
|
246
|
|
- set id = #{record.id,jdbcType=VARCHAR},
|
|
247
|
|
- org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
248
|
|
- v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
249
|
|
- i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
250
|
|
- i_value = #{record.iValue,jdbcType=INTEGER},
|
|
251
|
|
- v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
252
|
|
- data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
253
|
|
- v_remark = #{record.vRemark,jdbcType=VARCHAR}
|
|
254
|
|
- <if test="_parameter != null" >
|
|
255
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
256
|
|
- </if>
|
|
257
|
|
- </update>
|
|
258
|
|
-
|
|
259
|
|
- <insert id="insertBatch" parameterType="java.util.List">
|
|
260
|
|
- insert into t_ccdata (id, org_id, v_cc_code,
|
|
261
|
|
- i_tdh, i_value, v_update_time,
|
|
262
|
|
- data_source, v_remark, c_image
|
|
263
|
|
- )
|
|
264
|
|
- values
|
|
265
|
|
- <foreach collection="list" item="cc" index="index" separator=",">
|
|
266
|
|
- (#{cc.id,jdbcType=VARCHAR}, #{cc.orgId,jdbcType=VARCHAR}, #{cc.vCcCode,jdbcType=VARCHAR},
|
|
267
|
|
- #{cc.iTdh,jdbcType=INTEGER}, #{cc.iValue,jdbcType=INTEGER}, #{cc.vUpdateTime,jdbcType=TIMESTAMP},
|
|
268
|
|
- #{cc.dataSource,jdbcType=VARCHAR}, #{cc.vRemark,jdbcType=VARCHAR}, #{cc.cImage,jdbcType=LONGVARBINARY}
|
|
269
|
|
- )
|
|
270
|
|
- </foreach>
|
|
271
|
|
- </insert>
|
|
272
|
|
-
|
|
273
|
|
- <select id="getList" resultType="java.util.Map" parameterType="java.util.Map">
|
|
274
|
|
- SELECT DISTINCT
|
|
275
|
|
- ti.vcfcode AS vCfCode,
|
|
276
|
|
- td.i_tdh AS iTdh,
|
|
277
|
|
- td.i_value AS iValue,
|
|
278
|
|
- td.v_update_time AS vUpdateTime
|
|
279
|
|
- FROM
|
|
280
|
|
- t_ccinfo ti,
|
|
281
|
|
- t_ccdata td
|
|
282
|
|
- WHERE
|
|
283
|
|
- td.v_cc_code = ti.vdevcode
|
|
284
|
|
- <if test="iBeginTdh != null and test=iEndTdh != null">
|
|
285
|
|
- and td.i_tdh BETWEEN #{iBeginTdh, jdbcType=INTEGER} AND #{iEndTdh, jdbcType=INTEGER}
|
|
286
|
|
- </if>
|
|
287
|
|
- <if test="vCfCode != null">
|
|
288
|
|
- and ti.vcfcode = #{vCfCode}
|
|
289
|
|
- </if>
|
|
290
|
|
- ORDER BY
|
|
291
|
|
- td.v_update_time DESC
|
|
292
|
|
- </select>
|
|
|
1
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
3
|
+<mapper namespace="com.chinaitop.depot.intelligent.grainsituation.mapper.TCcdataMapper" >
|
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
|
5
|
+ <!--
|
|
|
6
|
+ WARNING - @mbggenerated
|
|
|
7
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
8
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
9
|
+ -->
|
|
|
10
|
+ <result column="id" property="id" jdbcType="VARCHAR" />
|
|
|
11
|
+ <result column="org_id" property="orgId" jdbcType="VARCHAR" />
|
|
|
12
|
+ <result column="v_cc_code" property="vCcCode" jdbcType="VARCHAR" />
|
|
|
13
|
+ <result column="i_tdh" property="iTdh" jdbcType="INTEGER" />
|
|
|
14
|
+ <result column="i_value" property="iValue" jdbcType="INTEGER" />
|
|
|
15
|
+ <result column="v_update_time" property="vUpdateTime" jdbcType="TIMESTAMP" />
|
|
|
16
|
+ <result column="data_source" property="dataSource" jdbcType="VARCHAR" />
|
|
|
17
|
+ <result column="v_remark" property="vRemark" jdbcType="VARCHAR" />
|
|
|
18
|
+ <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
|
|
|
19
|
+ <result column="jchcff" property="jchcff" jdbcType="VARCHAR" />
|
|
|
20
|
+ <result column="hczl" property="hczl" jdbcType="VARCHAR" />
|
|
|
21
|
+ <result column="cldjpd" property="cldjpd" jdbcType="VARCHAR" />
|
|
|
22
|
+ <result column="hckyxfx" property="hckyxfx" jdbcType="VARCHAR" />
|
|
|
23
|
+ </resultMap>
|
|
|
24
|
+ <resultMap id="ResultMapWithBLOBs" type="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" extends="BaseResultMap" >
|
|
|
25
|
+ <!--
|
|
|
26
|
+ WARNING - @mbggenerated
|
|
|
27
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
28
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
29
|
+ -->
|
|
|
30
|
+ <result column="c_image" property="cImage" jdbcType="LONGVARBINARY" />
|
|
|
31
|
+ </resultMap>
|
|
|
32
|
+ <sql id="Example_Where_Clause" >
|
|
|
33
|
+ <!--
|
|
|
34
|
+ WARNING - @mbggenerated
|
|
|
35
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
36
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
37
|
+ -->
|
|
|
38
|
+ <where >
|
|
|
39
|
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
|
|
|
40
|
+ <if test="criteria.valid" >
|
|
|
41
|
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
|
42
|
+ <foreach collection="criteria.criteria" item="criterion" >
|
|
|
43
|
+ <choose >
|
|
|
44
|
+ <when test="criterion.noValue" >
|
|
|
45
|
+ and ${criterion.condition}
|
|
|
46
|
+ </when>
|
|
|
47
|
+ <when test="criterion.singleValue" >
|
|
|
48
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
49
|
+ </when>
|
|
|
50
|
+ <when test="criterion.betweenValue" >
|
|
|
51
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
52
|
+ </when>
|
|
|
53
|
+ <when test="criterion.listValue" >
|
|
|
54
|
+ and ${criterion.condition}
|
|
|
55
|
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
|
56
|
+ #{listItem}
|
|
|
57
|
+ </foreach>
|
|
|
58
|
+ </when>
|
|
|
59
|
+ </choose>
|
|
|
60
|
+ </foreach>
|
|
|
61
|
+ </trim>
|
|
|
62
|
+ </if>
|
|
|
63
|
+ </foreach>
|
|
|
64
|
+ </where>
|
|
|
65
|
+ </sql>
|
|
|
66
|
+ <sql id="Update_By_Example_Where_Clause" >
|
|
|
67
|
+ <!--
|
|
|
68
|
+ WARNING - @mbggenerated
|
|
|
69
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
70
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
71
|
+ -->
|
|
|
72
|
+ <where >
|
|
|
73
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
|
|
74
|
+ <if test="criteria.valid" >
|
|
|
75
|
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
|
76
|
+ <foreach collection="criteria.criteria" item="criterion" >
|
|
|
77
|
+ <choose >
|
|
|
78
|
+ <when test="criterion.noValue" >
|
|
|
79
|
+ and ${criterion.condition}
|
|
|
80
|
+ </when>
|
|
|
81
|
+ <when test="criterion.singleValue" >
|
|
|
82
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
83
|
+ </when>
|
|
|
84
|
+ <when test="criterion.betweenValue" >
|
|
|
85
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
86
|
+ </when>
|
|
|
87
|
+ <when test="criterion.listValue" >
|
|
|
88
|
+ and ${criterion.condition}
|
|
|
89
|
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
|
90
|
+ #{listItem}
|
|
|
91
|
+ </foreach>
|
|
|
92
|
+ </when>
|
|
|
93
|
+ </choose>
|
|
|
94
|
+ </foreach>
|
|
|
95
|
+ </trim>
|
|
|
96
|
+ </if>
|
|
|
97
|
+ </foreach>
|
|
|
98
|
+ </where>
|
|
|
99
|
+ </sql>
|
|
|
100
|
+ <sql id="Base_Column_List" >
|
|
|
101
|
+ <!--
|
|
|
102
|
+ WARNING - @mbggenerated
|
|
|
103
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
104
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
105
|
+ -->
|
|
|
106
|
+ id, org_id, v_cc_code, i_tdh, i_value, v_update_time, data_source, v_remark, updatetime,
|
|
|
107
|
+ jchcff, hczl, cldjpd, hckyxfx
|
|
|
108
|
+ </sql>
|
|
|
109
|
+ <sql id="Blob_Column_List" >
|
|
|
110
|
+ <!--
|
|
|
111
|
+ WARNING - @mbggenerated
|
|
|
112
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
113
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
114
|
+ -->
|
|
|
115
|
+ c_image
|
|
|
116
|
+ </sql>
|
|
|
117
|
+ <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
|
118
|
+ <!--
|
|
|
119
|
+ WARNING - @mbggenerated
|
|
|
120
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
121
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
122
|
+ -->
|
|
|
123
|
+ select
|
|
|
124
|
+ <if test="distinct" >
|
|
|
125
|
+ distinct
|
|
|
126
|
+ </if>
|
|
|
127
|
+ <include refid="Base_Column_List" />
|
|
|
128
|
+ ,
|
|
|
129
|
+ <include refid="Blob_Column_List" />
|
|
|
130
|
+ from t_ccdata
|
|
|
131
|
+ <if test="_parameter != null" >
|
|
|
132
|
+ <include refid="Example_Where_Clause" />
|
|
|
133
|
+ </if>
|
|
|
134
|
+ <if test="orderByClause != null" >
|
|
|
135
|
+ order by ${orderByClause}
|
|
|
136
|
+ </if>
|
|
|
137
|
+ </select>
|
|
|
138
|
+ <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
|
139
|
+ <!--
|
|
|
140
|
+ WARNING - @mbggenerated
|
|
|
141
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
142
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
143
|
+ -->
|
|
|
144
|
+ select
|
|
|
145
|
+ <if test="distinct" >
|
|
|
146
|
+ distinct
|
|
|
147
|
+ </if>
|
|
|
148
|
+ <include refid="Base_Column_List" />
|
|
|
149
|
+ from t_ccdata
|
|
|
150
|
+ <if test="_parameter != null" >
|
|
|
151
|
+ <include refid="Example_Where_Clause" />
|
|
|
152
|
+ </if>
|
|
|
153
|
+ <if test="orderByClause != null" >
|
|
|
154
|
+ order by ${orderByClause}
|
|
|
155
|
+ </if>
|
|
|
156
|
+ </select>
|
|
|
157
|
+ <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" >
|
|
|
158
|
+ <!--
|
|
|
159
|
+ WARNING - @mbggenerated
|
|
|
160
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
161
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
162
|
+ -->
|
|
|
163
|
+ delete from t_ccdata
|
|
|
164
|
+ <if test="_parameter != null" >
|
|
|
165
|
+ <include refid="Example_Where_Clause" />
|
|
|
166
|
+ </if>
|
|
|
167
|
+ </delete>
|
|
|
168
|
+ <insert id="insert" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
|
169
|
+ <!--
|
|
|
170
|
+ WARNING - @mbggenerated
|
|
|
171
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
172
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
173
|
+ -->
|
|
|
174
|
+ insert into t_ccdata (id, org_id, v_cc_code,
|
|
|
175
|
+ i_tdh, i_value, v_update_time,
|
|
|
176
|
+ data_source, v_remark, updatetime,
|
|
|
177
|
+ jchcff, hczl, cldjpd,
|
|
|
178
|
+ hckyxfx, c_image)
|
|
|
179
|
+ values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vCcCode,jdbcType=VARCHAR},
|
|
|
180
|
+ #{iTdh,jdbcType=INTEGER}, #{iValue,jdbcType=INTEGER}, #{vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
181
|
+ #{dataSource,jdbcType=VARCHAR}, #{vRemark,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
|
|
|
182
|
+ #{jchcff,jdbcType=VARCHAR}, #{hczl,jdbcType=VARCHAR}, #{cldjpd,jdbcType=VARCHAR},
|
|
|
183
|
+ #{hckyxfx,jdbcType=VARCHAR}, #{cImage,jdbcType=LONGVARBINARY})
|
|
|
184
|
+ </insert>
|
|
|
185
|
+ <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdata" >
|
|
|
186
|
+ <!--
|
|
|
187
|
+ WARNING - @mbggenerated
|
|
|
188
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
189
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
190
|
+ -->
|
|
|
191
|
+ insert into t_ccdata
|
|
|
192
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
193
|
+ <if test="id != null" >
|
|
|
194
|
+ id,
|
|
|
195
|
+ </if>
|
|
|
196
|
+ <if test="orgId != null" >
|
|
|
197
|
+ org_id,
|
|
|
198
|
+ </if>
|
|
|
199
|
+ <if test="vCcCode != null" >
|
|
|
200
|
+ v_cc_code,
|
|
|
201
|
+ </if>
|
|
|
202
|
+ <if test="iTdh != null" >
|
|
|
203
|
+ i_tdh,
|
|
|
204
|
+ </if>
|
|
|
205
|
+ <if test="iValue != null" >
|
|
|
206
|
+ i_value,
|
|
|
207
|
+ </if>
|
|
|
208
|
+ <if test="vUpdateTime != null" >
|
|
|
209
|
+ v_update_time,
|
|
|
210
|
+ </if>
|
|
|
211
|
+ <if test="dataSource != null" >
|
|
|
212
|
+ data_source,
|
|
|
213
|
+ </if>
|
|
|
214
|
+ <if test="vRemark != null" >
|
|
|
215
|
+ v_remark,
|
|
|
216
|
+ </if>
|
|
|
217
|
+ <if test="updatetime != null" >
|
|
|
218
|
+ updatetime,
|
|
|
219
|
+ </if>
|
|
|
220
|
+ <if test="jchcff != null" >
|
|
|
221
|
+ jchcff,
|
|
|
222
|
+ </if>
|
|
|
223
|
+ <if test="hczl != null" >
|
|
|
224
|
+ hczl,
|
|
|
225
|
+ </if>
|
|
|
226
|
+ <if test="cldjpd != null" >
|
|
|
227
|
+ cldjpd,
|
|
|
228
|
+ </if>
|
|
|
229
|
+ <if test="hckyxfx != null" >
|
|
|
230
|
+ hckyxfx,
|
|
|
231
|
+ </if>
|
|
|
232
|
+ <if test="cImage != null" >
|
|
|
233
|
+ c_image,
|
|
|
234
|
+ </if>
|
|
|
235
|
+ </trim>
|
|
|
236
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
237
|
+ <if test="id != null" >
|
|
|
238
|
+ #{id,jdbcType=VARCHAR},
|
|
|
239
|
+ </if>
|
|
|
240
|
+ <if test="orgId != null" >
|
|
|
241
|
+ #{orgId,jdbcType=VARCHAR},
|
|
|
242
|
+ </if>
|
|
|
243
|
+ <if test="vCcCode != null" >
|
|
|
244
|
+ #{vCcCode,jdbcType=VARCHAR},
|
|
|
245
|
+ </if>
|
|
|
246
|
+ <if test="iTdh != null" >
|
|
|
247
|
+ #{iTdh,jdbcType=INTEGER},
|
|
|
248
|
+ </if>
|
|
|
249
|
+ <if test="iValue != null" >
|
|
|
250
|
+ #{iValue,jdbcType=INTEGER},
|
|
|
251
|
+ </if>
|
|
|
252
|
+ <if test="vUpdateTime != null" >
|
|
|
253
|
+ #{vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
254
|
+ </if>
|
|
|
255
|
+ <if test="dataSource != null" >
|
|
|
256
|
+ #{dataSource,jdbcType=VARCHAR},
|
|
|
257
|
+ </if>
|
|
|
258
|
+ <if test="vRemark != null" >
|
|
|
259
|
+ #{vRemark,jdbcType=VARCHAR},
|
|
|
260
|
+ </if>
|
|
|
261
|
+ <if test="updatetime != null" >
|
|
|
262
|
+ #{updatetime,jdbcType=TIMESTAMP},
|
|
|
263
|
+ </if>
|
|
|
264
|
+ <if test="jchcff != null" >
|
|
|
265
|
+ #{jchcff,jdbcType=VARCHAR},
|
|
|
266
|
+ </if>
|
|
|
267
|
+ <if test="hczl != null" >
|
|
|
268
|
+ #{hczl,jdbcType=VARCHAR},
|
|
|
269
|
+ </if>
|
|
|
270
|
+ <if test="cldjpd != null" >
|
|
|
271
|
+ #{cldjpd,jdbcType=VARCHAR},
|
|
|
272
|
+ </if>
|
|
|
273
|
+ <if test="hckyxfx != null" >
|
|
|
274
|
+ #{hckyxfx,jdbcType=VARCHAR},
|
|
|
275
|
+ </if>
|
|
|
276
|
+ <if test="cImage != null" >
|
|
|
277
|
+ #{cImage,jdbcType=LONGVARBINARY},
|
|
|
278
|
+ </if>
|
|
|
279
|
+ </trim>
|
|
|
280
|
+ </insert>
|
|
|
281
|
+ <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TCcdataExample" resultType="java.lang.Integer" >
|
|
|
282
|
+ <!--
|
|
|
283
|
+ WARNING - @mbggenerated
|
|
|
284
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
285
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
286
|
+ -->
|
|
|
287
|
+ select count(*) from t_ccdata
|
|
|
288
|
+ <if test="_parameter != null" >
|
|
|
289
|
+ <include refid="Example_Where_Clause" />
|
|
|
290
|
+ </if>
|
|
|
291
|
+ </select>
|
|
|
292
|
+ <update id="updateByExampleSelective" parameterType="map" >
|
|
|
293
|
+ <!--
|
|
|
294
|
+ WARNING - @mbggenerated
|
|
|
295
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
296
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
297
|
+ -->
|
|
|
298
|
+ update t_ccdata
|
|
|
299
|
+ <set >
|
|
|
300
|
+ <if test="record.id != null" >
|
|
|
301
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
302
|
+ </if>
|
|
|
303
|
+ <if test="record.orgId != null" >
|
|
|
304
|
+ org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
|
305
|
+ </if>
|
|
|
306
|
+ <if test="record.vCcCode != null" >
|
|
|
307
|
+ v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
|
308
|
+ </if>
|
|
|
309
|
+ <if test="record.iTdh != null" >
|
|
|
310
|
+ i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
|
311
|
+ </if>
|
|
|
312
|
+ <if test="record.iValue != null" >
|
|
|
313
|
+ i_value = #{record.iValue,jdbcType=INTEGER},
|
|
|
314
|
+ </if>
|
|
|
315
|
+ <if test="record.vUpdateTime != null" >
|
|
|
316
|
+ v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
317
|
+ </if>
|
|
|
318
|
+ <if test="record.dataSource != null" >
|
|
|
319
|
+ data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
|
320
|
+ </if>
|
|
|
321
|
+ <if test="record.vRemark != null" >
|
|
|
322
|
+ v_remark = #{record.vRemark,jdbcType=VARCHAR},
|
|
|
323
|
+ </if>
|
|
|
324
|
+ <if test="record.updatetime != null" >
|
|
|
325
|
+ updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
|
|
326
|
+ </if>
|
|
|
327
|
+ <if test="record.jchcff != null" >
|
|
|
328
|
+ jchcff = #{record.jchcff,jdbcType=VARCHAR},
|
|
|
329
|
+ </if>
|
|
|
330
|
+ <if test="record.hczl != null" >
|
|
|
331
|
+ hczl = #{record.hczl,jdbcType=VARCHAR},
|
|
|
332
|
+ </if>
|
|
|
333
|
+ <if test="record.cldjpd != null" >
|
|
|
334
|
+ cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
|
|
|
335
|
+ </if>
|
|
|
336
|
+ <if test="record.hckyxfx != null" >
|
|
|
337
|
+ hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR},
|
|
|
338
|
+ </if>
|
|
|
339
|
+ <if test="record.cImage != null" >
|
|
|
340
|
+ c_image = #{record.cImage,jdbcType=LONGVARBINARY},
|
|
|
341
|
+ </if>
|
|
|
342
|
+ </set>
|
|
|
343
|
+ <if test="_parameter != null" >
|
|
|
344
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
345
|
+ </if>
|
|
|
346
|
+ </update>
|
|
|
347
|
+ <update id="updateByExampleWithBLOBs" parameterType="map" >
|
|
|
348
|
+ <!--
|
|
|
349
|
+ WARNING - @mbggenerated
|
|
|
350
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
351
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
352
|
+ -->
|
|
|
353
|
+ update t_ccdata
|
|
|
354
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
355
|
+ org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
|
356
|
+ v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
|
357
|
+ i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
|
358
|
+ i_value = #{record.iValue,jdbcType=INTEGER},
|
|
|
359
|
+ v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
360
|
+ data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
|
361
|
+ v_remark = #{record.vRemark,jdbcType=VARCHAR},
|
|
|
362
|
+ updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
|
|
363
|
+ jchcff = #{record.jchcff,jdbcType=VARCHAR},
|
|
|
364
|
+ hczl = #{record.hczl,jdbcType=VARCHAR},
|
|
|
365
|
+ cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
|
|
|
366
|
+ hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR},
|
|
|
367
|
+ c_image = #{record.cImage,jdbcType=LONGVARBINARY}
|
|
|
368
|
+ <if test="_parameter != null" >
|
|
|
369
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
370
|
+ </if>
|
|
|
371
|
+ </update>
|
|
|
372
|
+ <update id="updateByExample" parameterType="map" >
|
|
|
373
|
+ <!--
|
|
|
374
|
+ WARNING - @mbggenerated
|
|
|
375
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
376
|
+ This element was generated on Fri Jun 05 17:10:22 CST 2020.
|
|
|
377
|
+ -->
|
|
|
378
|
+ update t_ccdata
|
|
|
379
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
380
|
+ org_id = #{record.orgId,jdbcType=VARCHAR},
|
|
|
381
|
+ v_cc_code = #{record.vCcCode,jdbcType=VARCHAR},
|
|
|
382
|
+ i_tdh = #{record.iTdh,jdbcType=INTEGER},
|
|
|
383
|
+ i_value = #{record.iValue,jdbcType=INTEGER},
|
|
|
384
|
+ v_update_time = #{record.vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
385
|
+ data_source = #{record.dataSource,jdbcType=VARCHAR},
|
|
|
386
|
+ v_remark = #{record.vRemark,jdbcType=VARCHAR},
|
|
|
387
|
+ updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
|
|
388
|
+ jchcff = #{record.jchcff,jdbcType=VARCHAR},
|
|
|
389
|
+ hczl = #{record.hczl,jdbcType=VARCHAR},
|
|
|
390
|
+ cldjpd = #{record.cldjpd,jdbcType=VARCHAR},
|
|
|
391
|
+ hckyxfx = #{record.hckyxfx,jdbcType=VARCHAR}
|
|
|
392
|
+ <if test="_parameter != null" >
|
|
|
393
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
394
|
+ </if>
|
|
|
395
|
+ </update>
|
|
|
396
|
+
|
|
|
397
|
+
|
|
|
398
|
+ <insert id="insertBatch" parameterType="java.util.List">
|
|
|
399
|
+ insert into t_ccdata (id, org_id, v_cc_code,
|
|
|
400
|
+ i_tdh, i_value, v_update_time,
|
|
|
401
|
+ data_source, v_remark, c_image
|
|
|
402
|
+ )
|
|
|
403
|
+ values
|
|
|
404
|
+ <foreach collection="list" item="cc" index="index" separator=",">
|
|
|
405
|
+ (#{cc.id,jdbcType=VARCHAR}, #{cc.orgId,jdbcType=VARCHAR}, #{cc.vCcCode,jdbcType=VARCHAR},
|
|
|
406
|
+ #{cc.iTdh,jdbcType=INTEGER}, #{cc.iValue,jdbcType=INTEGER}, #{cc.vUpdateTime,jdbcType=TIMESTAMP},
|
|
|
407
|
+ #{cc.dataSource,jdbcType=VARCHAR}, #{cc.vRemark,jdbcType=VARCHAR}, #{cc.cImage,jdbcType=LONGVARBINARY}
|
|
|
408
|
+ )
|
|
|
409
|
+ </foreach>
|
|
|
410
|
+ </insert>
|
|
|
411
|
+
|
|
|
412
|
+ <select id="getList" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
413
|
+ SELECT DISTINCT
|
|
|
414
|
+ ti.vcfcode AS vCfCode,
|
|
|
415
|
+ td.i_tdh AS iTdh,
|
|
|
416
|
+ td.i_value AS iValue,
|
|
|
417
|
+ td.v_update_time AS vUpdateTime
|
|
|
418
|
+ FROM
|
|
|
419
|
+ t_ccinfo ti,
|
|
|
420
|
+ t_ccdata td
|
|
|
421
|
+ WHERE
|
|
|
422
|
+ td.v_cc_code = ti.vdevcode
|
|
|
423
|
+ <if test="iBeginTdh != null and test=iEndTdh != null">
|
|
|
424
|
+ and td.i_tdh BETWEEN #{iBeginTdh, jdbcType=INTEGER} AND #{iEndTdh, jdbcType=INTEGER}
|
|
|
425
|
+ </if>
|
|
|
426
|
+ <if test="vCfCode != null">
|
|
|
427
|
+ and ti.vcfcode = #{vCfCode}
|
|
|
428
|
+ </if>
|
|
|
429
|
+ ORDER BY
|
|
|
430
|
+ td.v_update_time DESC
|
|
|
431
|
+ </select>
|
|
293
|
432
|
</mapper>
|