AccountRemapMapper.xml 16 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.AccountRemapMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22
    <id column="REMAP_ID" jdbcType="VARCHAR" property="remapId" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <result column="ACCT_CODE" jdbcType="VARCHAR" property="acctCode" />
    <result column="CUSTOMER_CODE" jdbcType="VARCHAR" property="customerCode" />
    <result column="REMAP_DEBIT" jdbcType="DECIMAL" property="remapDebit" />
    <result column="REMAP_CREDIT" jdbcType="DECIMAL" property="remapCredit" />
    <result column="STD_CODE" jdbcType="VARCHAR" property="stdCode" />
    <result column="RE_MAPP_NAME" jdbcType="VARCHAR" property="reMappName" />
    <result column="RE_MAPP_REASON" jdbcType="VARCHAR" property="reMappReason" />
    <result column="RE_MAPP_TYPE_ID" jdbcType="DECIMAL" property="reMappTypeId" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" />
    <result column="REMAP_BATCH_ID" jdbcType="VARCHAR" property="remapBatchId" />
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  </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>
51
            </foreach>
52
          </trim>
53
        </if>
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
      </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>
86
        </if>
87 88 89 90 91 92 93 94
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
95 96 97
    REMAP_ID, PERIOD, ACCT_CODE, CUSTOMER_CODE, REMAP_DEBIT, REMAP_CREDIT, STD_CODE, 
    RE_MAPP_NAME, RE_MAPP_REASON, RE_MAPP_TYPE_ID, CREATE_TIME, UPDATE_TIME, CREATOR_ID, 
    REMAP_BATCH_ID
98 99 100 101 102 103 104 105 106 107 108
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" 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" />
neo's avatar
neo committed
109
    from ACCOUNT_REMAP
110 111 112 113 114 115 116 117 118 119 120 121 122 123
    <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" />
neo's avatar
neo committed
124 125
    from ACCOUNT_REMAP
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
126 127 128 129 130 131
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
132 133
    delete from ACCOUNT_REMAP
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
134 135 136 137 138 139
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
140
    delete from ACCOUNT_REMAP
141 142 143 144 145 146 147 148 149
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
150 151 152 153 154 155
    insert into ACCOUNT_REMAP (REMAP_ID, PERIOD, ACCT_CODE, 
      CUSTOMER_CODE, REMAP_DEBIT, REMAP_CREDIT, 
      STD_CODE, RE_MAPP_NAME, RE_MAPP_REASON, 
      RE_MAPP_TYPE_ID, CREATE_TIME, UPDATE_TIME, 
      CREATOR_ID, REMAP_BATCH_ID)
    values (#{remapId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL}, #{acctCode,jdbcType=VARCHAR}, 
156 157
      #{customerCode,jdbcType=VARCHAR}, #{remapDebit,jdbcType=DECIMAL}, #{remapCredit,jdbcType=DECIMAL}, 
      #{stdCode,jdbcType=VARCHAR}, #{reMappName,jdbcType=VARCHAR}, #{reMappReason,jdbcType=VARCHAR}, 
neo's avatar
neo committed
158 159
      #{reMappTypeId,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{creatorId,jdbcType=VARCHAR}, #{remapBatchId,jdbcType=VARCHAR})
160 161 162 163 164 165
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
166
    insert into ACCOUNT_REMAP
167 168
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="remapId != null">
neo's avatar
neo committed
169
        REMAP_ID,
170 171
      </if>
      <if test="period != null">
neo's avatar
neo committed
172
        PERIOD,
173 174
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
175
        ACCT_CODE,
176 177
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
178
        CUSTOMER_CODE,
179 180
      </if>
      <if test="remapDebit != null">
neo's avatar
neo committed
181
        REMAP_DEBIT,
182 183
      </if>
      <if test="remapCredit != null">
neo's avatar
neo committed
184
        REMAP_CREDIT,
185 186
      </if>
      <if test="stdCode != null">
neo's avatar
neo committed
187
        STD_CODE,
188 189
      </if>
      <if test="reMappName != null">
neo's avatar
neo committed
190
        RE_MAPP_NAME,
191 192
      </if>
      <if test="reMappReason != null">
neo's avatar
neo committed
193
        RE_MAPP_REASON,
194 195
      </if>
      <if test="reMappTypeId != null">
neo's avatar
neo committed
196
        RE_MAPP_TYPE_ID,
197 198
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
199
        CREATE_TIME,
200 201
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
202
        UPDATE_TIME,
203
      </if>
neo's avatar
neo committed
204 205
      <if test="creatorId != null">
        CREATOR_ID,
206 207
      </if>
      <if test="remapBatchId != null">
neo's avatar
neo committed
208
        REMAP_BATCH_ID,
209 210 211 212 213 214 215
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="remapId != null">
        #{remapId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
neo's avatar
neo committed
216
        #{period,jdbcType=DECIMAL},
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
      </if>
      <if test="acctCode != null">
        #{acctCode,jdbcType=VARCHAR},
      </if>
      <if test="customerCode != null">
        #{customerCode,jdbcType=VARCHAR},
      </if>
      <if test="remapDebit != null">
        #{remapDebit,jdbcType=DECIMAL},
      </if>
      <if test="remapCredit != null">
        #{remapCredit,jdbcType=DECIMAL},
      </if>
      <if test="stdCode != null">
        #{stdCode,jdbcType=VARCHAR},
      </if>
      <if test="reMappName != null">
        #{reMappName,jdbcType=VARCHAR},
      </if>
      <if test="reMappReason != null">
        #{reMappReason,jdbcType=VARCHAR},
      </if>
      <if test="reMappTypeId != null">
neo's avatar
neo committed
240
        #{reMappTypeId,jdbcType=DECIMAL},
241 242 243 244 245 246 247
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
neo's avatar
neo committed
248 249
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
250 251 252 253 254 255 256 257 258 259 260
      </if>
      <if test="remapBatchId != null">
        #{remapBatchId,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
261
    select count(*) from ACCOUNT_REMAP
262 263 264 265 266 267 268 269 270
    <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.
    -->
neo's avatar
neo committed
271
    update ACCOUNT_REMAP
272 273
    <set>
      <if test="record.remapId != null">
neo's avatar
neo committed
274
        REMAP_ID = #{record.remapId,jdbcType=VARCHAR},
275 276
      </if>
      <if test="record.period != null">
neo's avatar
neo committed
277
        PERIOD = #{record.period,jdbcType=DECIMAL},
278 279
      </if>
      <if test="record.acctCode != null">
neo's avatar
neo committed
280
        ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
281 282
      </if>
      <if test="record.customerCode != null">
neo's avatar
neo committed
283
        CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
284 285
      </if>
      <if test="record.remapDebit != null">
neo's avatar
neo committed
286
        REMAP_DEBIT = #{record.remapDebit,jdbcType=DECIMAL},
287 288
      </if>
      <if test="record.remapCredit != null">
neo's avatar
neo committed
289
        REMAP_CREDIT = #{record.remapCredit,jdbcType=DECIMAL},
290 291
      </if>
      <if test="record.stdCode != null">
neo's avatar
neo committed
292
        STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
293 294
      </if>
      <if test="record.reMappName != null">
neo's avatar
neo committed
295
        RE_MAPP_NAME = #{record.reMappName,jdbcType=VARCHAR},
296 297
      </if>
      <if test="record.reMappReason != null">
neo's avatar
neo committed
298
        RE_MAPP_REASON = #{record.reMappReason,jdbcType=VARCHAR},
299 300
      </if>
      <if test="record.reMappTypeId != null">
neo's avatar
neo committed
301
        RE_MAPP_TYPE_ID = #{record.reMappTypeId,jdbcType=DECIMAL},
302 303
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
304
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
305 306
      </if>
      <if test="record.updateTime != null">
neo's avatar
neo committed
307
        UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
308
      </if>
neo's avatar
neo committed
309 310
      <if test="record.creatorId != null">
        CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
311 312
      </if>
      <if test="record.remapBatchId != null">
neo's avatar
neo committed
313
        REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR},
314 315 316 317 318 319 320 321 322 323 324
      </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.
    -->
neo's avatar
neo committed
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
    update ACCOUNT_REMAP
    set REMAP_ID = #{record.remapId,jdbcType=VARCHAR},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR},
      REMAP_DEBIT = #{record.remapDebit,jdbcType=DECIMAL},
      REMAP_CREDIT = #{record.remapCredit,jdbcType=DECIMAL},
      STD_CODE = #{record.stdCode,jdbcType=VARCHAR},
      RE_MAPP_NAME = #{record.reMappName,jdbcType=VARCHAR},
      RE_MAPP_REASON = #{record.reMappReason,jdbcType=VARCHAR},
      RE_MAPP_TYPE_ID = #{record.reMappTypeId,jdbcType=DECIMAL},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR},
      REMAP_BATCH_ID = #{record.remapBatchId,jdbcType=VARCHAR}
340 341 342 343 344 345 346 347 348
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
349
    update ACCOUNT_REMAP
350 351
    <set>
      <if test="period != null">
neo's avatar
neo committed
352
        PERIOD = #{period,jdbcType=DECIMAL},
353 354
      </if>
      <if test="acctCode != null">
neo's avatar
neo committed
355
        ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
356 357
      </if>
      <if test="customerCode != null">
neo's avatar
neo committed
358
        CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
359 360
      </if>
      <if test="remapDebit != null">
neo's avatar
neo committed
361
        REMAP_DEBIT = #{remapDebit,jdbcType=DECIMAL},
362 363
      </if>
      <if test="remapCredit != null">
neo's avatar
neo committed
364
        REMAP_CREDIT = #{remapCredit,jdbcType=DECIMAL},
365 366
      </if>
      <if test="stdCode != null">
neo's avatar
neo committed
367
        STD_CODE = #{stdCode,jdbcType=VARCHAR},
368 369
      </if>
      <if test="reMappName != null">
neo's avatar
neo committed
370
        RE_MAPP_NAME = #{reMappName,jdbcType=VARCHAR},
371 372
      </if>
      <if test="reMappReason != null">
neo's avatar
neo committed
373
        RE_MAPP_REASON = #{reMappReason,jdbcType=VARCHAR},
374 375
      </if>
      <if test="reMappTypeId != null">
neo's avatar
neo committed
376
        RE_MAPP_TYPE_ID = #{reMappTypeId,jdbcType=DECIMAL},
377 378
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
379
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
380 381
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
382
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
383
      </if>
neo's avatar
neo committed
384 385
      <if test="creatorId != null">
        CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
386 387
      </if>
      <if test="remapBatchId != null">
neo's avatar
neo committed
388
        REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR},
389 390
      </if>
    </set>
neo's avatar
neo committed
391
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
392 393 394 395 396 397
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.AccountRemap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
    update ACCOUNT_REMAP
    set PERIOD = #{period,jdbcType=DECIMAL},
      ACCT_CODE = #{acctCode,jdbcType=VARCHAR},
      CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR},
      REMAP_DEBIT = #{remapDebit,jdbcType=DECIMAL},
      REMAP_CREDIT = #{remapCredit,jdbcType=DECIMAL},
      STD_CODE = #{stdCode,jdbcType=VARCHAR},
      RE_MAPP_NAME = #{reMappName,jdbcType=VARCHAR},
      RE_MAPP_REASON = #{reMappReason,jdbcType=VARCHAR},
      RE_MAPP_TYPE_ID = #{reMappTypeId,jdbcType=DECIMAL},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      CREATOR_ID = #{creatorId,jdbcType=VARCHAR},
      REMAP_BATCH_ID = #{remapBatchId,jdbcType=VARCHAR}
    where REMAP_ID = #{remapId,jdbcType=VARCHAR}
413 414 415 416 417 418 419 420 421 422 423
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.AccountRemapExample" 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" />
neo's avatar
neo committed
424
    from ACCOUNT_REMAP
425 426 427 428 429 430 431
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
432
</mapper>