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