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