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