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