PeriodCellCommentMapper.xml 14.5 KB
Newer Older
neo's avatar
neo committed
1 2 3 4 5 6 7 8
<?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.PeriodCellCommentMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodCellComment">
    <!--
      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
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cell_data_id" jdbcType="BIGINT" property="cellDataId" />
    <result column="user_id" jdbcType="VARCHAR" property="userId" />
    <result column="user_name" jdbcType="VARCHAR" property="userName" />
    <result column="comment" jdbcType="VARCHAR" property="comment" />
    <result column="reply_to_user_name" jdbcType="VARCHAR" property="replyToUserName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="project_id" jdbcType="VARCHAR" property="projectId" />
    <result column="period" jdbcType="INTEGER" property="period" />
neo's avatar
neo committed
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 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
  </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.
    -->
93 94
    id, cell_data_id, user_id, user_name, `comment`, reply_to_user_name, create_time, 
    update_time, create_by, update_by, project_id, period
neo's avatar
neo committed
95 96 97 98 99 100 101 102 103 104 105
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellCommentExample" 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" />
106
    from period_cell_comment
neo's avatar
neo committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120
    <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" />
121 122
    from period_cell_comment
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
123 124 125 126 127 128
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
129 130
    delete from period_cell_comment
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
131 132 133 134 135 136
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellCommentExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
137
    delete from period_cell_comment
neo's avatar
neo committed
138 139 140 141 142 143 144 145 146
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellComment">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
147 148 149 150
    insert into period_cell_comment (id, cell_data_id, user_id, 
      user_name, `comment`, reply_to_user_name, 
      create_time, update_time, create_by, 
      update_by, project_id, period
neo's avatar
neo committed
151
      )
152
    values (#{id,jdbcType=BIGINT}, #{cellDataId,jdbcType=BIGINT}, #{userId,jdbcType=VARCHAR}, 
neo's avatar
neo committed
153 154
      #{userName,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{replyToUserName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, 
155
      #{updateBy,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}
neo's avatar
neo committed
156 157 158 159 160 161 162
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellComment">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
163
    insert into period_cell_comment
neo's avatar
neo committed
164 165
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
166
        id,
neo's avatar
neo committed
167 168
      </if>
      <if test="cellDataId != null">
169
        cell_data_id,
neo's avatar
neo committed
170 171
      </if>
      <if test="userId != null">
172
        user_id,
neo's avatar
neo committed
173 174
      </if>
      <if test="userName != null">
175
        user_name,
neo's avatar
neo committed
176 177
      </if>
      <if test="comment != null">
178
        `comment`,
neo's avatar
neo committed
179 180
      </if>
      <if test="replyToUserName != null">
181
        reply_to_user_name,
neo's avatar
neo committed
182 183
      </if>
      <if test="createTime != null">
184
        create_time,
neo's avatar
neo committed
185 186
      </if>
      <if test="updateTime != null">
187
        update_time,
neo's avatar
neo committed
188 189
      </if>
      <if test="createBy != null">
190
        create_by,
neo's avatar
neo committed
191 192
      </if>
      <if test="updateBy != null">
193
        update_by,
neo's avatar
neo committed
194 195
      </if>
      <if test="projectId != null">
196
        project_id,
neo's avatar
neo committed
197 198
      </if>
      <if test="period != null">
199
        period,
neo's avatar
neo committed
200 201 202 203
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
204
        #{id,jdbcType=BIGINT},
neo's avatar
neo committed
205 206
      </if>
      <if test="cellDataId != null">
207
        #{cellDataId,jdbcType=BIGINT},
neo's avatar
neo committed
208 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
      </if>
      <if test="userId != null">
        #{userId,jdbcType=VARCHAR},
      </if>
      <if test="userName != null">
        #{userName,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        #{comment,jdbcType=VARCHAR},
      </if>
      <if test="replyToUserName != null">
        #{replyToUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="projectId != null">
        #{projectId,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
237
        #{period,jdbcType=INTEGER},
neo's avatar
neo committed
238 239 240 241 242 243 244 245
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellCommentExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
246
    select count(*) from period_cell_comment
neo's avatar
neo committed
247 248 249 250 251 252 253 254 255
    <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.
    -->
256
    update period_cell_comment
neo's avatar
neo committed
257 258
    <set>
      <if test="record.id != null">
259
        id = #{record.id,jdbcType=BIGINT},
neo's avatar
neo committed
260 261
      </if>
      <if test="record.cellDataId != null">
262
        cell_data_id = #{record.cellDataId,jdbcType=BIGINT},
neo's avatar
neo committed
263 264
      </if>
      <if test="record.userId != null">
265
        user_id = #{record.userId,jdbcType=VARCHAR},
neo's avatar
neo committed
266 267
      </if>
      <if test="record.userName != null">
268
        user_name = #{record.userName,jdbcType=VARCHAR},
neo's avatar
neo committed
269 270
      </if>
      <if test="record.comment != null">
271
        `comment` = #{record.comment,jdbcType=VARCHAR},
neo's avatar
neo committed
272 273
      </if>
      <if test="record.replyToUserName != null">
274
        reply_to_user_name = #{record.replyToUserName,jdbcType=VARCHAR},
neo's avatar
neo committed
275 276
      </if>
      <if test="record.createTime != null">
277
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
278 279
      </if>
      <if test="record.updateTime != null">
280
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
281 282
      </if>
      <if test="record.createBy != null">
283
        create_by = #{record.createBy,jdbcType=VARCHAR},
neo's avatar
neo committed
284 285
      </if>
      <if test="record.updateBy != null">
286
        update_by = #{record.updateBy,jdbcType=VARCHAR},
neo's avatar
neo committed
287 288
      </if>
      <if test="record.projectId != null">
289
        project_id = #{record.projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
290 291
      </if>
      <if test="record.period != null">
292
        period = #{record.period,jdbcType=INTEGER},
neo's avatar
neo committed
293 294 295 296 297 298 299 300 301 302 303
      </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.
    -->
304 305 306 307 308 309 310 311 312 313 314 315 316
    update period_cell_comment
    set id = #{record.id,jdbcType=BIGINT},
      cell_data_id = #{record.cellDataId,jdbcType=BIGINT},
      user_id = #{record.userId,jdbcType=VARCHAR},
      user_name = #{record.userName,jdbcType=VARCHAR},
      `comment` = #{record.comment,jdbcType=VARCHAR},
      reply_to_user_name = #{record.replyToUserName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      project_id = #{record.projectId,jdbcType=VARCHAR},
      period = #{record.period,jdbcType=INTEGER}
neo's avatar
neo committed
317 318 319 320 321 322 323 324 325
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellComment">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
326
    update period_cell_comment
neo's avatar
neo committed
327 328
    <set>
      <if test="cellDataId != null">
329
        cell_data_id = #{cellDataId,jdbcType=BIGINT},
neo's avatar
neo committed
330 331
      </if>
      <if test="userId != null">
332
        user_id = #{userId,jdbcType=VARCHAR},
neo's avatar
neo committed
333 334
      </if>
      <if test="userName != null">
335
        user_name = #{userName,jdbcType=VARCHAR},
neo's avatar
neo committed
336 337
      </if>
      <if test="comment != null">
338
        `comment` = #{comment,jdbcType=VARCHAR},
neo's avatar
neo committed
339 340
      </if>
      <if test="replyToUserName != null">
341
        reply_to_user_name = #{replyToUserName,jdbcType=VARCHAR},
neo's avatar
neo committed
342 343
      </if>
      <if test="createTime != null">
344
        create_time = #{createTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
345 346
      </if>
      <if test="updateTime != null">
347
        update_time = #{updateTime,jdbcType=TIMESTAMP},
neo's avatar
neo committed
348 349
      </if>
      <if test="createBy != null">
350
        create_by = #{createBy,jdbcType=VARCHAR},
neo's avatar
neo committed
351 352
      </if>
      <if test="updateBy != null">
353
        update_by = #{updateBy,jdbcType=VARCHAR},
neo's avatar
neo committed
354 355
      </if>
      <if test="projectId != null">
356
        project_id = #{projectId,jdbcType=VARCHAR},
neo's avatar
neo committed
357 358
      </if>
      <if test="period != null">
359
        period = #{period,jdbcType=INTEGER},
neo's avatar
neo committed
360 361
      </if>
    </set>
362
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
363 364 365 366 367 368
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellComment">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
369 370 371 372 373 374 375 376 377 378 379 380 381
    update period_cell_comment
    set cell_data_id = #{cellDataId,jdbcType=BIGINT},
      user_id = #{userId,jdbcType=VARCHAR},
      user_name = #{userName,jdbcType=VARCHAR},
      `comment` = #{comment,jdbcType=VARCHAR},
      reply_to_user_name = #{replyToUserName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      create_by = #{createBy,jdbcType=VARCHAR},
      update_by = #{updateBy,jdbcType=VARCHAR},
      project_id = #{projectId,jdbcType=VARCHAR},
      period = #{period,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
neo's avatar
neo committed
382 383 384 385 386 387 388 389 390 391 392
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellCommentExample" 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" />
393
    from period_cell_comment
neo's avatar
neo committed
394 395 396 397 398 399 400 401
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>