StatisticAttributeMapper.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.StatisticAttributeMapper">
4
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.StatisticAttribute">
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="name" jdbcType="VARCHAR" property="name" />
    <result column="is_active" jdbcType="BIT" property="isActive" />
    <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, name, is_active, create_time, update_time
87
  </sql>
88
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.StatisticAttributeExample" 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 statistic_attribute
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 statistic_attribute
    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 statistic_attribute
    where id = #{id,jdbcType=VARCHAR}
123
  </delete>
124
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.StatisticAttributeExample">
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 statistic_attribute
130 131 132 133
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
134
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.StatisticAttribute">
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 statistic_attribute (id, name, is_active, 
      create_time, update_time)
    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{isActive,jdbcType=BIT}, 
142 143
      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  </insert>
144
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.StatisticAttribute">
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 statistic_attribute
150
    <trim prefix="(" suffix=")" suffixOverrides=",">
gary's avatar
gary committed
151 152
      <if test="id != null">
        id,
153 154
      </if>
      <if test="name != null">
gary's avatar
gary committed
155
        name,
156 157
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
158
        is_active,
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 171 172 173 174
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
175
        #{isActive,jdbcType=BIT},
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.StatisticAttributeExample" 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 statistic_attribute
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 statistic_attribute
201
    <set>
gary's avatar
gary committed
202 203
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
204 205
      </if>
      <if test="record.name != null">
gary's avatar
gary committed
206
        name = #{record.name,jdbcType=VARCHAR},
207 208
      </if>
      <if test="record.isActive != null">
gary's avatar
gary committed
209
        is_active = #{record.isActive,jdbcType=BIT},
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 statistic_attribute
    set id = #{record.id,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      is_active = #{record.isActive,jdbcType=BIT},
      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.StatisticAttribute">
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 statistic_attribute
243 244
    <set>
      <if test="name != null">
gary's avatar
gary committed
245
        name = #{name,jdbcType=VARCHAR},
246 247
      </if>
      <if test="isActive != null">
gary's avatar
gary committed
248
        is_active = #{isActive,jdbcType=BIT},
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.StatisticAttribute">
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 statistic_attribute
    set name = #{name,jdbcType=VARCHAR},
      is_active = #{isActive,jdbcType=BIT},
      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.StatisticAttributeExample" 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 statistic_attribute
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>