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