PeriodInfoMapper.xml 13.2 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.PeriodInfoMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.PeriodInfo">
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
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
    <result column="period" jdbcType="INTEGER" property="period" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="creator_id" jdbcType="VARCHAR" property="creatorId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="project_info" jdbcType="VARCHAR" property="projectInfo" />
    <result column="import_type" jdbcType="INTEGER" property="importType" />
    <result column="service_type" jdbcType="INTEGER" property="serviceType" />
19 20 21 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
  </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>
47
            </foreach>
48
          </trim>
49
        </if>
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
      </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>
82
        </if>
83 84 85 86 87 88 89 90
      </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
91 92
    id, project_id, period, status, creator_id, create_time, update_time, project_info, 
    import_type, service_type
93
  </sql>
94
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.PeriodInfoExample" resultMap="BaseResultMap">
95 96 97 98 99 100 101 102 103
    <!--
      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
104
    from period_info
105 106 107 108 109 110 111
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
gary's avatar
gary committed
112
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
113 114 115 116 117 118
    <!--
      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
119 120
    from period_info
    where id = #{id,jdbcType=VARCHAR}
121 122 123 124 125 126
  </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
127 128
    delete from period_info
    where id = #{id,jdbcType=VARCHAR}
129
  </delete>
130
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.PeriodInfoExample">
131 132 133 134
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
135
    delete from period_info
136 137 138 139
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
140
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.PeriodInfo">
141 142 143 144
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
145 146 147 148 149 150 151 152
    insert into period_info (id, project_id, period, 
      status, creator_id, create_time, 
      update_time, project_info, import_type, 
      service_type)
    values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, 
      #{status,jdbcType=INTEGER}, #{creatorId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{projectInfo,jdbcType=VARCHAR}, #{importType,jdbcType=INTEGER}, 
      #{serviceType,jdbcType=INTEGER})
153
  </insert>
154
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.PeriodInfo">
155 156 157 158
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
159
    insert into period_info
160
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
161 162
      <if test="id != null">
        id,
163
      </if>
gary's avatar
gary committed
164 165
      <if test="projectId != null">
        project_id,
166 167
      </if>
      <if test="period != null">
gary's avatar
gary committed
168
        period,
169 170
      </if>
      <if test="status != null">
gary's avatar
gary committed
171
        status,
172
      </if>
gary's avatar
gary committed
173 174
      <if test="creatorId != null">
        creator_id,
175 176
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
177
        create_time,
178 179
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
180 181 182 183
        update_time,
      </if>
      <if test="projectInfo != null">
        project_info,
184 185
      </if>
      <if test="importType != null">
gary's avatar
gary committed
186
        import_type,
187 188
      </if>
      <if test="serviceType != null">
gary's avatar
gary committed
189
        service_type,
190 191 192
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
193 194
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
195
      </if>
gary's avatar
gary committed
196 197
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
198 199
      </if>
      <if test="period != null">
gary's avatar
gary committed
200
        #{period,jdbcType=INTEGER},
201 202
      </if>
      <if test="status != null">
gary's avatar
gary committed
203
        #{status,jdbcType=INTEGER},
204
      </if>
gary's avatar
gary committed
205 206
      <if test="creatorId != null">
        #{creatorId,jdbcType=VARCHAR},
207 208 209 210 211 212 213
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
gary's avatar
gary committed
214 215 216
      <if test="projectInfo != null">
        #{projectInfo,jdbcType=VARCHAR},
      </if>
217
      <if test="importType != null">
gary's avatar
gary committed
218
        #{importType,jdbcType=INTEGER},
219 220
      </if>
      <if test="serviceType != null">
gary's avatar
gary committed
221 222
        #{serviceType,jdbcType=INTEGER},
      </if>
223 224
    </trim>
  </insert>
225
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.PeriodInfoExample" resultType="java.lang.Long">
226 227 228 229
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
230
    select count(*) from period_info
231 232 233 234 235 236 237 238 239
    <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
240
    update period_info
241
    <set>
gary's avatar
gary committed
242 243
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
244
      </if>
gary's avatar
gary committed
245 246
      <if test="record.projectId != null">
        project_id = #{record.projectId,jdbcType=VARCHAR},
247 248
      </if>
      <if test="record.period != null">
gary's avatar
gary committed
249
        period = #{record.period,jdbcType=INTEGER},
250 251
      </if>
      <if test="record.status != null">
gary's avatar
gary committed
252
        status = #{record.status,jdbcType=INTEGER},
253
      </if>
gary's avatar
gary committed
254 255
      <if test="record.creatorId != null">
        creator_id = #{record.creatorId,jdbcType=VARCHAR},
256 257
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
258
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
259 260
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
261 262 263 264
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.projectInfo != null">
        project_info = #{record.projectInfo,jdbcType=VARCHAR},
265 266
      </if>
      <if test="record.importType != null">
gary's avatar
gary committed
267
        import_type = #{record.importType,jdbcType=INTEGER},
268 269
      </if>
      <if test="record.serviceType != null">
gary's avatar
gary committed
270
        service_type = #{record.serviceType,jdbcType=INTEGER},
271 272 273 274 275 276 277 278 279 280 281
      </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
282 283 284 285 286 287 288 289 290 291 292
    update period_info
    set id = #{record.id,jdbcType=VARCHAR},
      project_id = #{record.projectId,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER},
      status = #{record.status,jdbcType=INTEGER},
      creator_id = #{record.creatorId,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      project_info = #{record.projectInfo,jdbcType=VARCHAR},
      import_type = #{record.importType,jdbcType=INTEGER},
      service_type = #{record.serviceType,jdbcType=INTEGER}
293 294 295 296
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
297
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.PeriodInfo">
298 299 300 301
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
302
    update period_info
303
    <set>
gary's avatar
gary committed
304 305
      <if test="projectId != null">
        project_id = #{projectId,jdbcType=VARCHAR},
306 307
      </if>
      <if test="period != null">
gary's avatar
gary committed
308
        period = #{period,jdbcType=INTEGER},
309 310
      </if>
      <if test="status != null">
gary's avatar
gary committed
311
        status = #{status,jdbcType=INTEGER},
312
      </if>
gary's avatar
gary committed
313 314
      <if test="creatorId != null">
        creator_id = #{creatorId,jdbcType=VARCHAR},
315 316
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
317
        create_time = #{createTime,jdbcType=TIMESTAMP},
318 319
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
320 321 322 323
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="projectInfo != null">
        project_info = #{projectInfo,jdbcType=VARCHAR},
324 325
      </if>
      <if test="importType != null">
gary's avatar
gary committed
326
        import_type = #{importType,jdbcType=INTEGER},
327 328
      </if>
      <if test="serviceType != null">
gary's avatar
gary committed
329
        service_type = #{serviceType,jdbcType=INTEGER},
330 331
      </if>
    </set>
gary's avatar
gary committed
332
    where id = #{id,jdbcType=VARCHAR}
333
  </update>
334
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.PeriodInfo">
335 336 337 338
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
339 340 341 342 343 344 345 346 347 348 349
    update period_info
    set project_id = #{projectId,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER},
      status = #{status,jdbcType=INTEGER},
      creator_id = #{creatorId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      project_info = #{projectInfo,jdbcType=VARCHAR},
      import_type = #{importType,jdbcType=INTEGER},
      service_type = #{serviceType,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
350
  </update>
351
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.PeriodInfoExample" resultMap="BaseResultMap">
352 353 354 355 356 357 358 359 360
    <!--
      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
361
    from period_info
362 363 364 365 366 367 368
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
369
</mapper>