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