ProjectMapper.xml 16.7 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.ProjectMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.Project">
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="code" jdbcType="VARCHAR" property="code" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="year" jdbcType="INTEGER" property="year" />
    <result column="client_code" jdbcType="VARCHAR" property="clientCode" />
    <result column="is_active" jdbcType="BIT" property="isActive" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="region_id" jdbcType="VARCHAR" property="regionId" />
    <result column="industry_id" jdbcType="VARCHAR" property="industryId" />
    <result column="rule_type" jdbcType="INTEGER" property="ruleType" />
    <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
    <result column="db_name" jdbcType="VARCHAR" property="dbName" />
    <result column="enterprise_account_set_id" jdbcType="VARCHAR" property="enterpriseAccountSetId" />
    <result column="start_period" jdbcType="INTEGER" property="startPeriod" />
    <result column="end_period" jdbcType="INTEGER" property="endPeriod" />
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, code, name, year, client_code, is_active, create_time, update_time, region_id, 
    industry_id, rule_type, organization_id, db_name, enterprise_account_set_id, start_period, 
    end_period
100
  </sql>
101
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.ProjectExample" 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 project
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 project
    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 project
    where id = #{id,jdbcType=VARCHAR}
136
  </delete>
137
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.ProjectExample">
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 project
143 144 145 146
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
147
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.Project">
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
    insert into project (id, code, name, 
      year, client_code, is_active, 
      create_time, update_time, region_id, 
      industry_id, rule_type, organization_id, 
      db_name, enterprise_account_set_id, start_period, 
      end_period)
neo's avatar
neo committed
158
    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
gary's avatar
gary committed
159
      #{year,jdbcType=INTEGER}, #{clientCode,jdbcType=VARCHAR}, #{isActive,jdbcType=BIT}, 
neo's avatar
neo committed
160
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{regionId,jdbcType=VARCHAR}, 
gary's avatar
gary committed
161 162 163
      #{industryId,jdbcType=VARCHAR}, #{ruleType,jdbcType=INTEGER}, #{organizationId,jdbcType=VARCHAR}, 
      #{dbName,jdbcType=VARCHAR}, #{enterpriseAccountSetId,jdbcType=VARCHAR}, #{startPeriod,jdbcType=INTEGER}, 
      #{endPeriod,jdbcType=INTEGER})
164
  </insert>
165
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.Project">
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 project
171
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
172
      <if test="id != null">
gary's avatar
gary committed
173
        id,
174 175
      </if>
      <if test="code != null">
gary's avatar
gary committed
176
        code,
177 178
      </if>
      <if test="name != null">
gary's avatar
gary committed
179
        name,
180 181
      </if>
      <if test="year != null">
gary's avatar
gary committed
182
        year,
183 184
      </if>
      <if test="clientCode != null">
gary's avatar
gary committed
185
        client_code,
186 187
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
188
        is_active,
189 190
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
191
        create_time,
192 193
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
194
        update_time,
195
      </if>
neo's avatar
neo committed
196
      <if test="regionId != null">
gary's avatar
gary committed
197
        region_id,
198
      </if>
neo's avatar
neo committed
199
      <if test="industryId != null">
gary's avatar
gary committed
200
        industry_id,
201 202
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
203
        rule_type,
204
      </if>
neo's avatar
neo committed
205
      <if test="organizationId != null">
gary's avatar
gary committed
206
        organization_id,
207 208
      </if>
      <if test="dbName != null">
gary's avatar
gary committed
209
        db_name,
210
      </if>
neo's avatar
neo committed
211
      <if test="enterpriseAccountSetId != null">
gary's avatar
gary committed
212
        enterprise_account_set_id,
213 214
      </if>
      <if test="startPeriod != null">
gary's avatar
gary committed
215
        start_period,
216 217
      </if>
      <if test="endPeriod != null">
gary's avatar
gary committed
218
        end_period,
219 220 221
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
222 223
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
224 225 226 227 228 229 230 231
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="year != null">
gary's avatar
gary committed
232
        #{year,jdbcType=INTEGER},
233 234 235 236 237
      </if>
      <if test="clientCode != null">
        #{clientCode,jdbcType=VARCHAR},
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
238
        #{isActive,jdbcType=BIT},
239 240 241 242 243 244 245
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
neo's avatar
neo committed
246 247
      <if test="regionId != null">
        #{regionId,jdbcType=VARCHAR},
248
      </if>
neo's avatar
neo committed
249 250
      <if test="industryId != null">
        #{industryId,jdbcType=VARCHAR},
251 252
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
253
        #{ruleType,jdbcType=INTEGER},
254
      </if>
neo's avatar
neo committed
255 256
      <if test="organizationId != null">
        #{organizationId,jdbcType=VARCHAR},
257 258 259 260
      </if>
      <if test="dbName != null">
        #{dbName,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
261 262
      <if test="enterpriseAccountSetId != null">
        #{enterpriseAccountSetId,jdbcType=VARCHAR},
263 264
      </if>
      <if test="startPeriod != null">
gary's avatar
gary committed
265
        #{startPeriod,jdbcType=INTEGER},
266 267
      </if>
      <if test="endPeriod != null">
gary's avatar
gary committed
268
        #{endPeriod,jdbcType=INTEGER},
269 270 271
      </if>
    </trim>
  </insert>
272
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.ProjectExample" 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 project
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 project
288
    <set>
neo's avatar
neo committed
289
      <if test="record.id != null">
gary's avatar
gary committed
290
        id = #{record.id,jdbcType=VARCHAR},
291 292
      </if>
      <if test="record.code != null">
gary's avatar
gary committed
293
        code = #{record.code,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.year != null">
gary's avatar
gary committed
299
        year = #{record.year,jdbcType=INTEGER},
300 301
      </if>
      <if test="record.clientCode != null">
gary's avatar
gary committed
302
        client_code = #{record.clientCode,jdbcType=VARCHAR},
303 304
      </if>
      <if test="record.isActive != null">
gary's avatar
gary committed
305
        is_active = #{record.isActive,jdbcType=BIT},
306 307
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
308
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
309 310
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
311
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
312
      </if>
neo's avatar
neo committed
313
      <if test="record.regionId != null">
gary's avatar
gary committed
314
        region_id = #{record.regionId,jdbcType=VARCHAR},
315
      </if>
neo's avatar
neo committed
316
      <if test="record.industryId != null">
gary's avatar
gary committed
317
        industry_id = #{record.industryId,jdbcType=VARCHAR},
318 319
      </if>
      <if test="record.ruleType != null">
gary's avatar
gary committed
320
        rule_type = #{record.ruleType,jdbcType=INTEGER},
321
      </if>
neo's avatar
neo committed
322
      <if test="record.organizationId != null">
gary's avatar
gary committed
323
        organization_id = #{record.organizationId,jdbcType=VARCHAR},
324 325
      </if>
      <if test="record.dbName != null">
gary's avatar
gary committed
326
        db_name = #{record.dbName,jdbcType=VARCHAR},
327
      </if>
neo's avatar
neo committed
328
      <if test="record.enterpriseAccountSetId != null">
gary's avatar
gary committed
329
        enterprise_account_set_id = #{record.enterpriseAccountSetId,jdbcType=VARCHAR},
330 331
      </if>
      <if test="record.startPeriod != null">
gary's avatar
gary committed
332
        start_period = #{record.startPeriod,jdbcType=INTEGER},
333 334
      </if>
      <if test="record.endPeriod != null">
gary's avatar
gary committed
335
        end_period = #{record.endPeriod,jdbcType=INTEGER},
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 project
    set id = #{record.id,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      year = #{record.year,jdbcType=INTEGER},
      client_code = #{record.clientCode,jdbcType=VARCHAR},
      is_active = #{record.isActive,jdbcType=BIT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      region_id = #{record.regionId,jdbcType=VARCHAR},
      industry_id = #{record.industryId,jdbcType=VARCHAR},
      rule_type = #{record.ruleType,jdbcType=INTEGER},
      organization_id = #{record.organizationId,jdbcType=VARCHAR},
      db_name = #{record.dbName,jdbcType=VARCHAR},
      enterprise_account_set_id = #{record.enterpriseAccountSetId,jdbcType=VARCHAR},
      start_period = #{record.startPeriod,jdbcType=INTEGER},
      end_period = #{record.endPeriod,jdbcType=INTEGER}
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.Project">
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 project
374 375
    <set>
      <if test="code != null">
gary's avatar
gary committed
376
        code = #{code,jdbcType=VARCHAR},
377 378
      </if>
      <if test="name != null">
gary's avatar
gary committed
379
        name = #{name,jdbcType=VARCHAR},
380 381
      </if>
      <if test="year != null">
gary's avatar
gary committed
382
        year = #{year,jdbcType=INTEGER},
383 384
      </if>
      <if test="clientCode != null">
gary's avatar
gary committed
385
        client_code = #{clientCode,jdbcType=VARCHAR},
386 387
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
388
        is_active = #{isActive,jdbcType=BIT},
389 390
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
391
        create_time = #{createTime,jdbcType=TIMESTAMP},
392 393
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
394
        update_time = #{updateTime,jdbcType=TIMESTAMP},
395
      </if>
neo's avatar
neo committed
396
      <if test="regionId != null">
gary's avatar
gary committed
397
        region_id = #{regionId,jdbcType=VARCHAR},
398
      </if>
neo's avatar
neo committed
399
      <if test="industryId != null">
gary's avatar
gary committed
400
        industry_id = #{industryId,jdbcType=VARCHAR},
401 402
      </if>
      <if test="ruleType != null">
gary's avatar
gary committed
403
        rule_type = #{ruleType,jdbcType=INTEGER},
404
      </if>
neo's avatar
neo committed
405
      <if test="organizationId != null">
gary's avatar
gary committed
406
        organization_id = #{organizationId,jdbcType=VARCHAR},
407 408
      </if>
      <if test="dbName != null">
gary's avatar
gary committed
409
        db_name = #{dbName,jdbcType=VARCHAR},
410
      </if>
neo's avatar
neo committed
411
      <if test="enterpriseAccountSetId != null">
gary's avatar
gary committed
412
        enterprise_account_set_id = #{enterpriseAccountSetId,jdbcType=VARCHAR},
413 414
      </if>
      <if test="startPeriod != null">
gary's avatar
gary committed
415
        start_period = #{startPeriod,jdbcType=INTEGER},
416 417
      </if>
      <if test="endPeriod != null">
gary's avatar
gary committed
418
        end_period = #{endPeriod,jdbcType=INTEGER},
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.Project">
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 project
    set code = #{code,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      year = #{year,jdbcType=INTEGER},
      client_code = #{clientCode,jdbcType=VARCHAR},
      is_active = #{isActive,jdbcType=BIT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      region_id = #{regionId,jdbcType=VARCHAR},
      industry_id = #{industryId,jdbcType=VARCHAR},
      rule_type = #{ruleType,jdbcType=INTEGER},
      organization_id = #{organizationId,jdbcType=VARCHAR},
      db_name = #{dbName,jdbcType=VARCHAR},
      enterprise_account_set_id = #{enterpriseAccountSetId,jdbcType=VARCHAR},
      start_period = #{startPeriod,jdbcType=INTEGER},
      end_period = #{endPeriod,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
445
  </update>
446
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.ProjectExample" 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 project
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>