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