MenuMapper.xml 14.4 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.MenuMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.Menu">
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 19 20
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="route_state_name" jdbcType="VARCHAR" property="routeStateName" />
    <result column="navigation_url" jdbcType="VARCHAR" property="navigationUrl" />
    <result column="icon_class_name" jdbcType="VARCHAR" property="iconClassName" />
    <result column="parent_id" jdbcType="VARCHAR" property="parentId" />
    <result column="order_index" jdbcType="INTEGER" property="orderIndex" />
    <result column="is_active" jdbcType="BIT" property="isActive" />
    <result column="is_visible" jdbcType="BIT" property="isVisible" />
    <result column="service_type_id" jdbcType="VARCHAR" property="serviceTypeId" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
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
  </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>
49
            </foreach>
50
          </trim>
51
        </if>
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
      </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>
84
        </if>
85 86 87 88 89 90 91 92
      </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
93 94
    id, name, route_state_name, navigation_url, icon_class_name, parent_id, order_index, 
    is_active, is_visible, service_type_id, create_time, update_time
95
  </sql>
96
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.MenuExample" resultMap="BaseResultMap">
97 98 99 100 101 102 103 104 105
    <!--
      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
106
    from menu
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.String" resultMap="BaseResultMap">
    <!--
      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
121 122
    from menu
    where id = #{id,jdbcType=VARCHAR}
123 124 125 126 127 128
  </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
129 130
    delete from menu
    where id = #{id,jdbcType=VARCHAR}
131
  </delete>
132
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.MenuExample">
133 134 135 136
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
137
    delete from menu
138 139 140 141
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
142
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.Menu">
143 144 145 146
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
147 148 149 150
    insert into menu (id, name, route_state_name, 
      navigation_url, icon_class_name, parent_id, 
      order_index, is_active, is_visible, 
      service_type_id, create_time, update_time
151
      )
gary's avatar
gary committed
152 153 154 155
    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{routeStateName,jdbcType=VARCHAR}, 
      #{navigationUrl,jdbcType=VARCHAR}, #{iconClassName,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, 
      #{orderIndex,jdbcType=INTEGER}, #{isActive,jdbcType=BIT}, #{isVisible,jdbcType=BIT}, 
      #{serviceTypeId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
156 157
      )
  </insert>
158
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.Menu">
159 160 161 162
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
163
    insert into menu
164
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
165 166
      <if test="id != null">
        id,
167 168
      </if>
      <if test="name != null">
gary's avatar
gary committed
169
        name,
170 171
      </if>
      <if test="routeStateName != null">
gary's avatar
gary committed
172
        route_state_name,
173 174
      </if>
      <if test="navigationUrl != null">
gary's avatar
gary committed
175
        navigation_url,
176 177
      </if>
      <if test="iconClassName != null">
gary's avatar
gary committed
178
        icon_class_name,
179
      </if>
gary's avatar
gary committed
180 181
      <if test="parentId != null">
        parent_id,
182 183
      </if>
      <if test="orderIndex != null">
gary's avatar
gary committed
184
        order_index,
185 186
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
187
        is_active,
188 189
      </if>
      <if test="isVisible != null">
gary's avatar
gary committed
190
        is_visible,
191
      </if>
gary's avatar
gary committed
192 193
      <if test="serviceTypeId != null">
        service_type_id,
194 195
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
196
        create_time,
197 198
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
199
        update_time,
200 201 202
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
203 204
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
205 206 207 208 209 210 211 212 213 214 215 216 217
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="routeStateName != null">
        #{routeStateName,jdbcType=VARCHAR},
      </if>
      <if test="navigationUrl != null">
        #{navigationUrl,jdbcType=VARCHAR},
      </if>
      <if test="iconClassName != null">
        #{iconClassName,jdbcType=VARCHAR},
      </if>
gary's avatar
gary committed
218 219
      <if test="parentId != null">
        #{parentId,jdbcType=VARCHAR},
220 221
      </if>
      <if test="orderIndex != null">
gary's avatar
gary committed
222
        #{orderIndex,jdbcType=INTEGER},
223 224
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
225
        #{isActive,jdbcType=BIT},
226 227
      </if>
      <if test="isVisible != null">
gary's avatar
gary committed
228
        #{isVisible,jdbcType=BIT},
229
      </if>
gary's avatar
gary committed
230 231
      <if test="serviceTypeId != null">
        #{serviceTypeId,jdbcType=VARCHAR},
232 233 234 235 236 237 238 239 240
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
241
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.MenuExample" resultType="java.lang.Long">
242 243 244 245
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
246
    select count(*) from menu
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.
    -->
gary's avatar
gary committed
256
    update menu
257
    <set>
gary's avatar
gary committed
258 259
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
260 261
      </if>
      <if test="record.name != null">
gary's avatar
gary committed
262
        name = #{record.name,jdbcType=VARCHAR},
263 264
      </if>
      <if test="record.routeStateName != null">
gary's avatar
gary committed
265
        route_state_name = #{record.routeStateName,jdbcType=VARCHAR},
266 267
      </if>
      <if test="record.navigationUrl != null">
gary's avatar
gary committed
268
        navigation_url = #{record.navigationUrl,jdbcType=VARCHAR},
269 270
      </if>
      <if test="record.iconClassName != null">
gary's avatar
gary committed
271
        icon_class_name = #{record.iconClassName,jdbcType=VARCHAR},
272
      </if>
gary's avatar
gary committed
273 274
      <if test="record.parentId != null">
        parent_id = #{record.parentId,jdbcType=VARCHAR},
275 276
      </if>
      <if test="record.orderIndex != null">
gary's avatar
gary committed
277
        order_index = #{record.orderIndex,jdbcType=INTEGER},
278 279
      </if>
      <if test="record.isActive != null">
gary's avatar
gary committed
280
        is_active = #{record.isActive,jdbcType=BIT},
281 282
      </if>
      <if test="record.isVisible != null">
gary's avatar
gary committed
283
        is_visible = #{record.isVisible,jdbcType=BIT},
284
      </if>
gary's avatar
gary committed
285 286
      <if test="record.serviceTypeId != null">
        service_type_id = #{record.serviceTypeId,jdbcType=VARCHAR},
287 288
      </if>
      <if test="record.createTime != null">
gary's avatar
gary committed
289
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
290 291
      </if>
      <if test="record.updateTime != null">
gary's avatar
gary committed
292
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
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.
    -->
gary's avatar
gary committed
304 305 306 307 308 309 310 311 312 313 314 315 316
    update menu
    set id = #{record.id,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      route_state_name = #{record.routeStateName,jdbcType=VARCHAR},
      navigation_url = #{record.navigationUrl,jdbcType=VARCHAR},
      icon_class_name = #{record.iconClassName,jdbcType=VARCHAR},
      parent_id = #{record.parentId,jdbcType=VARCHAR},
      order_index = #{record.orderIndex,jdbcType=INTEGER},
      is_active = #{record.isActive,jdbcType=BIT},
      is_visible = #{record.isVisible,jdbcType=BIT},
      service_type_id = #{record.serviceTypeId,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
317 318 319 320
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
321
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.Menu">
322 323 324 325
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
326
    update menu
327 328
    <set>
      <if test="name != null">
gary's avatar
gary committed
329
        name = #{name,jdbcType=VARCHAR},
330 331
      </if>
      <if test="routeStateName != null">
gary's avatar
gary committed
332
        route_state_name = #{routeStateName,jdbcType=VARCHAR},
333 334
      </if>
      <if test="navigationUrl != null">
gary's avatar
gary committed
335
        navigation_url = #{navigationUrl,jdbcType=VARCHAR},
336 337
      </if>
      <if test="iconClassName != null">
gary's avatar
gary committed
338
        icon_class_name = #{iconClassName,jdbcType=VARCHAR},
339
      </if>
gary's avatar
gary committed
340 341
      <if test="parentId != null">
        parent_id = #{parentId,jdbcType=VARCHAR},
342 343
      </if>
      <if test="orderIndex != null">
gary's avatar
gary committed
344
        order_index = #{orderIndex,jdbcType=INTEGER},
345 346
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
347
        is_active = #{isActive,jdbcType=BIT},
348 349
      </if>
      <if test="isVisible != null">
gary's avatar
gary committed
350
        is_visible = #{isVisible,jdbcType=BIT},
351
      </if>
gary's avatar
gary committed
352 353
      <if test="serviceTypeId != null">
        service_type_id = #{serviceTypeId,jdbcType=VARCHAR},
354 355
      </if>
      <if test="createTime != null">
gary's avatar
gary committed
356
        create_time = #{createTime,jdbcType=TIMESTAMP},
357 358
      </if>
      <if test="updateTime != null">
gary's avatar
gary committed
359
        update_time = #{updateTime,jdbcType=TIMESTAMP},
360 361
      </if>
    </set>
gary's avatar
gary committed
362
    where id = #{id,jdbcType=VARCHAR}
363
  </update>
364
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.Menu">
365 366 367 368
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
gary's avatar
gary committed
369 370 371 372 373 374 375 376 377 378 379 380 381
    update menu
    set name = #{name,jdbcType=VARCHAR},
      route_state_name = #{routeStateName,jdbcType=VARCHAR},
      navigation_url = #{navigationUrl,jdbcType=VARCHAR},
      icon_class_name = #{iconClassName,jdbcType=VARCHAR},
      parent_id = #{parentId,jdbcType=VARCHAR},
      order_index = #{orderIndex,jdbcType=INTEGER},
      is_active = #{isActive,jdbcType=BIT},
      is_visible = #{isVisible,jdbcType=BIT},
      service_type_id = #{serviceTypeId,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=VARCHAR}
382
  </update>
383
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.MenuExample" resultMap="BaseResultMap">
384 385 386 387 388 389 390 391 392
    <!--
      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
393
    from menu
394 395 396 397 398 399 400
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
401
</mapper>