KeyValueConfigMapper.xml 17 KB
Newer Older
1 2 3
<?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="pwc.taxtech.atms.dao.KeyValueConfigMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.KeyValueConfig">
5 6 7 8
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="key_code" jdbcType="VARCHAR" property="keyCode" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="key_value_type" jdbcType="INTEGER" property="keyValueType" />
    <result column="formula" jdbcType="VARCHAR" property="formula" />
    <result column="is_constant" jdbcType="INTEGER" property="isConstant" />
    <result column="calculate_status" jdbcType="INTEGER" property="calculateStatus" />
    <result column="result_type" jdbcType="INTEGER" property="resultType" />
    <result column="service_type_ids" jdbcType="VARCHAR" property="serviceTypeIds" />
    <result column="industry_ids" jdbcType="VARCHAR" property="industryIds" />
    <result column="description" jdbcType="VARCHAR" property="description" />
    <result column="creator" jdbcType="VARCHAR" property="creator" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="updator" jdbcType="VARCHAR" property="updator" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="data_source" jdbcType="VARCHAR" property="dataSource" />
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
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
53
            </foreach>
54
          </trim>
55
        </if>
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
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
88
        </if>
89 90 91 92 93 94 95 96
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
97 98 99
    id, key_code, name, key_value_type, formula, is_constant, calculate_status, result_type, 
    service_type_ids, industry_ids, description, creator, create_time, updator, update_time, 
    data_source
100
  </sql>
101
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.KeyValueConfigExample" resultMap="BaseResultMap">
102 103 104 105 106 107 108 109 110
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
111
    from key_value_config
112 113 114 115 116 117 118 119 120 121 122 123 124 125
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
gary's avatar
gary committed
126 127
    from key_value_config
    where id = #{id,jdbcType=VARCHAR}
128 129 130 131 132 133
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
134 135
    delete from key_value_config
    where id = #{id,jdbcType=VARCHAR}
136
  </delete>
137
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.KeyValueConfigExample">
138 139 140 141
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
142
    delete from key_value_config
143 144 145 146
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
147
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.KeyValueConfig">
148 149 150 151
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
152 153 154 155 156 157 158
    insert into key_value_config (id, key_code, name, 
      key_value_type, formula, is_constant, 
      calculate_status, result_type, service_type_ids, 
      industry_ids, description, creator, 
      create_time, updator, update_time, 
      data_source)
    values (#{id,jdbcType=VARCHAR}, #{keyCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
gary's avatar
gary committed
159
      #{keyValueType,jdbcType=INTEGER}, #{formula,jdbcType=VARCHAR}, #{isConstant,jdbcType=INTEGER}, 
gary's avatar
gary committed
160 161
      #{calculateStatus,jdbcType=INTEGER}, #{resultType,jdbcType=INTEGER}, #{serviceTypeIds,jdbcType=VARCHAR}, 
      #{industryIds,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, 
162 163 164
      #{createTime,jdbcType=TIMESTAMP}, #{updator,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{dataSource,jdbcType=VARCHAR})
  </insert>
165
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.KeyValueConfig">
166 167 168 169
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
170
    insert into key_value_config
171
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
172 173
      <if test="id != null">
        id,
174 175
      </if>
      <if test="keyCode != null">
gary's avatar
gary committed
176
        key_code,
177 178
      </if>
      <if test="name != null">
gary's avatar
gary committed
179
        name,
180 181
      </if>
      <if test="keyValueType != null">
gary's avatar
gary committed
182
        key_value_type,
183 184
      </if>
      <if test="formula != null">
gary's avatar
gary committed
185
        formula,
186 187
      </if>
      <if test="isConstant != null">
gary's avatar
gary committed
188
        is_constant,
189 190
      </if>
      <if test="calculateStatus != null">
gary's avatar
gary committed
191
        calculate_status,
192 193
      </if>
      <if test="resultType != null">
gary's avatar
gary committed
194
        result_type,
195
      </if>
gary's avatar
gary committed
196 197
      <if test="serviceTypeIds != null">
        service_type_ids,
198
      </if>
gary's avatar
gary committed
199 200
      <if test="industryIds != null">
        industry_ids,
201 202
      </if>
      <if test="description != null">
gary's avatar
gary committed
203
        description,
204 205
      </if>
      <if test="creator != null">
gary's avatar
gary committed
206
        creator,
207 208
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
209
        create_time,
210 211
      </if>
      <if test="updator != null">
gary's avatar
gary committed
212
        updator,
213 214
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
215
        update_time,
216 217
      </if>
      <if test="dataSource != null">
gary's avatar
gary committed
218
        data_source,
219 220 221
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
222 223
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
224 225 226 227 228 229 230 231
      </if>
      <if test="keyCode != null">
        #{keyCode,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="keyValueType != null">
gary's avatar
gary committed
232
        #{keyValueType,jdbcType=INTEGER},
233 234 235 236 237
      </if>
      <if test="formula != null">
        #{formula,jdbcType=VARCHAR},
      </if>
      <if test="isConstant != null">
gary's avatar
gary committed
238
        #{isConstant,jdbcType=INTEGER},
239 240
      </if>
      <if test="calculateStatus != null">
gary's avatar
gary committed
241
        #{calculateStatus,jdbcType=INTEGER},
242 243
      </if>
      <if test="resultType != null">
gary's avatar
gary committed
244
        #{resultType,jdbcType=INTEGER},
245
      </if>
gary's avatar
gary committed
246 247
      <if test="serviceTypeIds != null">
        #{serviceTypeIds,jdbcType=VARCHAR},
248
      </if>
gary's avatar
gary committed
249 250
      <if test="industryIds != null">
        #{industryIds,jdbcType=VARCHAR},
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
      </if>
      <if test="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updator != null">
        #{updator,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dataSource != null">
        #{dataSource,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
272
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.KeyValueConfigExample" resultType="java.lang.Long">
273 274 275 276
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
277
    select count(*) from key_value_config
278 279 280 281 282 283 284 285 286
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
287
    update key_value_config
288
    <set>
gary's avatar
gary committed
289 290
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
291 292
      </if>
      <if test="record.keyCode != null">
gary's avatar
gary committed
293
        key_code = #{record.keyCode,jdbcType=VARCHAR},
294 295
      </if>
      <if test="record.name != null">
gary's avatar
gary committed
296
        name = #{record.name,jdbcType=VARCHAR},
297 298
      </if>
      <if test="record.keyValueType != null">
gary's avatar
gary committed
299
        key_value_type = #{record.keyValueType,jdbcType=INTEGER},
300 301
      </if>
      <if test="record.formula != null">
gary's avatar
gary committed
302
        formula = #{record.formula,jdbcType=VARCHAR},
303 304
      </if>
      <if test="record.isConstant != null">
gary's avatar
gary committed
305
        is_constant = #{record.isConstant,jdbcType=INTEGER},
306 307
      </if>
      <if test="record.calculateStatus != null">
gary's avatar
gary committed
308
        calculate_status = #{record.calculateStatus,jdbcType=INTEGER},
309 310
      </if>
      <if test="record.resultType != null">
gary's avatar
gary committed
311
        result_type = #{record.resultType,jdbcType=INTEGER},
312
      </if>
gary's avatar
gary committed
313 314
      <if test="record.serviceTypeIds != null">
        service_type_ids = #{record.serviceTypeIds,jdbcType=VARCHAR},
315
      </if>
gary's avatar
gary committed
316 317
      <if test="record.industryIds != null">
        industry_ids = #{record.industryIds,jdbcType=VARCHAR},
318 319
      </if>
      <if test="record.description != null">
gary's avatar
gary committed
320
        description = #{record.description,jdbcType=VARCHAR},
321 322
      </if>
      <if test="record.creator != null">
gary's avatar
gary committed
323
        creator = #{record.creator,jdbcType=VARCHAR},
324 325
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
326
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
327 328
      </if>
      <if test="record.updator != null">
gary's avatar
gary committed
329
        updator = #{record.updator,jdbcType=VARCHAR},
330 331
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
332
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
333 334
      </if>
      <if test="record.dataSource != null">
gary's avatar
gary committed
335
        data_source = #{record.dataSource,jdbcType=VARCHAR},
336 337 338 339 340 341 342 343 344 345 346
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363
    update key_value_config
    set id = #{record.id,jdbcType=VARCHAR},
      key_code = #{record.keyCode,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      key_value_type = #{record.keyValueType,jdbcType=INTEGER},
      formula = #{record.formula,jdbcType=VARCHAR},
      is_constant = #{record.isConstant,jdbcType=INTEGER},
      calculate_status = #{record.calculateStatus,jdbcType=INTEGER},
      result_type = #{record.resultType,jdbcType=INTEGER},
      service_type_ids = #{record.serviceTypeIds,jdbcType=VARCHAR},
      industry_ids = #{record.industryIds,jdbcType=VARCHAR},
      description = #{record.description,jdbcType=VARCHAR},
      creator = #{record.creator,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      updator = #{record.updator,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      data_source = #{record.dataSource,jdbcType=VARCHAR}
364 365 366 367
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
368
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.KeyValueConfig">
369 370 371 372
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
373
    update key_value_config
374 375
    <set>
      <if test="keyCode != null">
gary's avatar
gary committed
376
        key_code = #{keyCode,jdbcType=VARCHAR},
377 378
      </if>
      <if test="name != null">
gary's avatar
gary committed
379
        name = #{name,jdbcType=VARCHAR},
380 381
      </if>
      <if test="keyValueType != null">
gary's avatar
gary committed
382
        key_value_type = #{keyValueType,jdbcType=INTEGER},
383 384
      </if>
      <if test="formula != null">
gary's avatar
gary committed
385
        formula = #{formula,jdbcType=VARCHAR},
386 387
      </if>
      <if test="isConstant != null">
gary's avatar
gary committed
388
        is_constant = #{isConstant,jdbcType=INTEGER},
389 390
      </if>
      <if test="calculateStatus != null">
gary's avatar
gary committed
391
        calculate_status = #{calculateStatus,jdbcType=INTEGER},
392 393
      </if>
      <if test="resultType != null">
gary's avatar
gary committed
394
        result_type = #{resultType,jdbcType=INTEGER},
395
      </if>
gary's avatar
gary committed
396 397
      <if test="serviceTypeIds != null">
        service_type_ids = #{serviceTypeIds,jdbcType=VARCHAR},
398
      </if>
gary's avatar
gary committed
399 400
      <if test="industryIds != null">
        industry_ids = #{industryIds,jdbcType=VARCHAR},
401 402
      </if>
      <if test="description != null">
gary's avatar
gary committed
403
        description = #{description,jdbcType=VARCHAR},
404 405
      </if>
      <if test="creator != null">
gary's avatar
gary committed
406
        creator = #{creator,jdbcType=VARCHAR},
407 408
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
409
        create_time = #{createTime,jdbcType=TIMESTAMP},
410 411
      </if>
      <if test="updator != null">
gary's avatar
gary committed
412
        updator = #{updator,jdbcType=VARCHAR},
413 414
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
415
        update_time = #{updateTime,jdbcType=TIMESTAMP},
416 417
      </if>
      <if test="dataSource != null">
gary's avatar
gary committed
418
        data_source = #{dataSource,jdbcType=VARCHAR},
419 420
      </if>
    </set>
gary's avatar
gary committed
421
    where id = #{id,jdbcType=VARCHAR}
422
  </update>
423
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.KeyValueConfig">
424 425 426 427
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444
    update key_value_config
    set key_code = #{keyCode,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      key_value_type = #{keyValueType,jdbcType=INTEGER},
      formula = #{formula,jdbcType=VARCHAR},
      is_constant = #{isConstant,jdbcType=INTEGER},
      calculate_status = #{calculateStatus,jdbcType=INTEGER},
      result_type = #{resultType,jdbcType=INTEGER},
      service_type_ids = #{serviceTypeIds,jdbcType=VARCHAR},
      industry_ids = #{industryIds,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR},
      creator = #{creator,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      updator = #{updator,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      data_source = #{dataSource,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
445
  </update>
446
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.KeyValueConfigExample" resultMap="BaseResultMap">
447 448 449 450 451 452 453 454 455
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
gary's avatar
gary committed
456
    from key_value_config
457 458 459 460 461 462 463
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
464
</mapper>