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