PeriodTaxRuleSettingMapper.xml 15.1 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.vat.dao.PeriodTaxRuleSettingMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSetting">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
9 10 11 12 13 14 15 16 17 18 19 20 21
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="is_default" jdbcType="INTEGER" property="isDefault" />
    <result column="period" jdbcType="INTEGER" property="period" />
    <result column="group_name" jdbcType="VARCHAR" property="groupName" />
    <result column="tax_base" jdbcType="VARCHAR" property="taxBase" />
    <result column="tax_rate" jdbcType="TINYINT" property="taxRate" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="tax_rule_setting_id" jdbcType="BIGINT" property="taxRuleSettingId" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
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
  </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>
50
            </foreach>
51
          </trim>
52
        </if>
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
      </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>
85
        </if>
86 87 88 89 90 91 92 93
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
94 95
    id, `name`, is_default, period, group_name, tax_base, tax_rate, create_time, update_time, 
    tax_rule_setting_id, create_by, update_by, project_id
96 97 98 99 100 101 102 103 104 105 106
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingExample" resultMap="BaseResultMap">
    <!--
      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" />
107
    from period_tax_rule_setting
108 109 110 111 112 113 114 115 116 117 118 119 120 121
    <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.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
122 123
    from period_tax_rule_setting
    where id = #{id,jdbcType=BIGINT}
124 125 126 127 128 129
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
130 131
    delete from period_tax_rule_setting
    where id = #{id,jdbcType=BIGINT}
132 133 134 135 136 137
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
138
    delete from period_tax_rule_setting
139 140 141 142 143 144 145 146 147
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSetting">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
148 149 150 151 152 153 154 155 156
    insert into period_tax_rule_setting (id, `name`, is_default, 
      period, group_name, tax_base, 
      tax_rate, create_time, update_time, 
      tax_rule_setting_id, create_by, update_by, 
      project_id)
    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{isDefault,jdbcType=INTEGER}, 
      #{period,jdbcType=INTEGER}, #{groupName,jdbcType=VARCHAR}, #{taxBase,jdbcType=VARCHAR}, 
      #{taxRate,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{taxRuleSettingId,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, 
neo's avatar
neo committed
157
      #{projectId,jdbcType=VARCHAR})
158 159 160 161 162 163
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSetting">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
164
    insert into period_tax_rule_setting
165 166
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
167
        id,
168 169
      </if>
      <if test="name != null">
170
        `name`,
171 172
      </if>
      <if test="isDefault != null">
173
        is_default,
174 175
      </if>
      <if test="period != null">
176
        period,
177 178
      </if>
      <if test="groupName != null">
179
        group_name,
180 181
      </if>
      <if test="taxBase != null">
182
        tax_base,
183 184
      </if>
      <if test="taxRate != null">
185
        tax_rate,
186 187
      </if>
      <if test="createTime != null">
188
        create_time,
189 190
      </if>
      <if test="updateTime != null">
191
        update_time,
192 193
      </if>
      <if test="taxRuleSettingId != null">
194
        tax_rule_setting_id,
195 196
      </if>
      <if test="createBy != null">
197
        create_by,
198 199
      </if>
      <if test="updateBy != null">
200
        update_by,
201
      </if>
neo's avatar
neo committed
202
      <if test="projectId != null">
203
        project_id,
neo's avatar
neo committed
204
      </if>
205 206 207
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
208
        #{id,jdbcType=BIGINT},
209 210 211 212 213
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="isDefault != null">
214
        #{isDefault,jdbcType=INTEGER},
215 216
      </if>
      <if test="period != null">
217
        #{period,jdbcType=INTEGER},
218 219 220 221 222 223 224 225
      </if>
      <if test="groupName != null">
        #{groupName,jdbcType=VARCHAR},
      </if>
      <if test="taxBase != null">
        #{taxBase,jdbcType=VARCHAR},
      </if>
      <if test="taxRate != null">
226
        #{taxRate,jdbcType=TINYINT},
227 228 229 230 231 232 233 234
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="taxRuleSettingId != null">
235
        #{taxRuleSettingId,jdbcType=BIGINT},
236 237 238 239 240 241 242
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
neo's avatar
neo committed
243 244 245
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
      </if>
246 247 248 249 250 251 252
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
253
    select count(*) from period_tax_rule_setting
254 255 256 257 258 259 260 261 262
    <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.
    -->
263
    update period_tax_rule_setting
264 265
    <set>
      <if test="record.id != null">
266
        id = #{record.id,jdbcType=BIGINT},
267 268
      </if>
      <if test="record.name != null">
269
        `name` = #{record.name,jdbcType=VARCHAR},
270 271
      </if>
      <if test="record.isDefault != null">
272
        is_default = #{record.isDefault,jdbcType=INTEGER},
273 274
      </if>
      <if test="record.period != null">
275
        period = #{record.period,jdbcType=INTEGER},
276 277
      </if>
      <if test="record.groupName != null">
278
        group_name = #{record.groupName,jdbcType=VARCHAR},
279 280
      </if>
      <if test="record.taxBase != null">
281
        tax_base = #{record.taxBase,jdbcType=VARCHAR},
282 283
      </if>
      <if test="record.taxRate != null">
284
        tax_rate = #{record.taxRate,jdbcType=TINYINT},
285 286
      </if>
      <if test="record.createTime != null">
287
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
288 289
      </if>
      <if test="record.updateTime != null">
290
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
291 292
      </if>
      <if test="record.taxRuleSettingId != null">
293
        tax_rule_setting_id = #{record.taxRuleSettingId,jdbcType=BIGINT},
294 295
      </if>
      <if test="record.createBy != null">
296
        create_by = #{record.createBy,jdbcType=VARCHAR},
297 298
      </if>
      <if test="record.updateBy != null">
299
        update_by = #{record.updateBy,jdbcType=VARCHAR},
300
      </if>
neo's avatar
neo committed
301
      <if test="record.projectId != null">
302
        project_id = #{record.projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
303
      </if>
304 305 306 307 308 309 310 311 312 313
    </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.
    -->
314 315 316 317 318 319 320 321 322 323 324 325 326 327
    update period_tax_rule_setting
    set id = #{record.id,jdbcType=BIGINT},
      `name` = #{record.name,jdbcType=VARCHAR},
      is_default = #{record.isDefault,jdbcType=INTEGER},
      period = #{record.period,jdbcType=INTEGER},
      group_name = #{record.groupName,jdbcType=VARCHAR},
      tax_base = #{record.taxBase,jdbcType=VARCHAR},
      tax_rate = #{record.taxRate,jdbcType=TINYINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      tax_rule_setting_id = #{record.taxRuleSettingId,jdbcType=BIGINT},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      project_id = #{record.projectId,jdbcType=VARCHAR}
328 329 330 331 332 333 334 335 336
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSetting">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
337
    update period_tax_rule_setting
338 339
    <set>
      <if test="name != null">
340
        `name` = #{name,jdbcType=VARCHAR},
341 342
      </if>
      <if test="isDefault != null">
343
        is_default = #{isDefault,jdbcType=INTEGER},
344 345
      </if>
      <if test="period != null">
346
        period = #{period,jdbcType=INTEGER},
347 348
      </if>
      <if test="groupName != null">
349
        group_name = #{groupName,jdbcType=VARCHAR},
350 351
      </if>
      <if test="taxBase != null">
352
        tax_base = #{taxBase,jdbcType=VARCHAR},
353 354
      </if>
      <if test="taxRate != null">
355
        tax_rate = #{taxRate,jdbcType=TINYINT},
356 357
      </if>
      <if test="createTime != null">
358
        create_time = #{createTime,jdbcType=TIMESTAMP},
359 360
      </if>
      <if test="updateTime != null">
361
        update_time = #{updateTime,jdbcType=TIMESTAMP},
362 363
      </if>
      <if test="taxRuleSettingId != null">
364
        tax_rule_setting_id = #{taxRuleSettingId,jdbcType=BIGINT},
365 366
      </if>
      <if test="createBy != null">
367
        create_by = #{createBy,jdbcType=VARCHAR},
368 369
      </if>
      <if test="updateBy != null">
370
        update_by = #{updateBy,jdbcType=VARCHAR},
371
      </if>
neo's avatar
neo committed
372
      <if test="projectId != null">
373
        project_id = #{projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
374
      </if>
375
    </set>
376
    where id = #{id,jdbcType=BIGINT}
377 378 379 380 381 382
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSetting">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
383 384 385 386 387 388 389 390 391 392 393 394 395 396
    update period_tax_rule_setting
    set `name` = #{name,jdbcType=VARCHAR},
      is_default = #{isDefault,jdbcType=INTEGER},
      period = #{period,jdbcType=INTEGER},
      group_name = #{groupName,jdbcType=VARCHAR},
      tax_base = #{taxBase,jdbcType=VARCHAR},
      tax_rate = #{taxRate,jdbcType=TINYINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      tax_rule_setting_id = #{taxRuleSettingId,jdbcType=BIGINT},
      create_by = #{createBy,jdbcType=VARCHAR},
      update_by = #{updateBy,jdbcType=VARCHAR},
      project_id = #{projectId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
397 398 399 400 401 402 403 404 405 406 407
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingExample" resultMap="BaseResultMap">
    <!--
      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" />
408
    from period_tax_rule_setting
409 410 411 412 413 414 415
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
416
</mapper>