StatisticAttributeMapper.xml 10.3 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.
    -->
neo's avatar
neo 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="DECIMAL" 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.
    -->
neo's avatar
neo 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" />
neo's avatar
neo 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" />
neo's avatar
neo 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.
    -->
neo's avatar
neo 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.
    -->
neo's avatar
neo 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.
    -->
neo's avatar
neo 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=DECIMAL}, 
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.
    -->
neo's avatar
neo committed
149
    insert into STATISTIC_ATTRIBUTE
150
    <trim prefix="(" suffix=")" suffixOverrides=",">
neo's avatar
neo committed
151
      <if test="id != null">
152 153 154
        ID,
      </if>
      <if test="name != null">
neo's avatar
neo committed
155
        "NAME",
156 157
      </if>
      <if test="isActive != null">
neo's avatar
neo committed
158
        IS_ACTIVE,
159 160
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
161
        CREATE_TIME,
162 163
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
164
        UPDATE_TIME,
165 166 167
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
neo's avatar
neo 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">
neo's avatar
neo committed
175
        #{isActive,jdbcType=DECIMAL},
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.
    -->
neo's avatar
neo 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.
    -->
neo's avatar
neo committed
200
    update STATISTIC_ATTRIBUTE
201
    <set>
neo's avatar
neo committed
202 203
      <if test="record.id != null">
        ID = #{record.id,jdbcType=VARCHAR},
204 205
      </if>
      <if test="record.name != null">
neo's avatar
neo committed
206
        "NAME" = #{record.name,jdbcType=VARCHAR},
207 208
      </if>
      <if test="record.isActive != null">
neo's avatar
neo committed
209
        IS_ACTIVE = #{record.isActive,jdbcType=DECIMAL},
210 211
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
212
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
213 214
      </if>
      <if test="record.updateTime != null">
neo's avatar
neo 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.
    -->
neo's avatar
neo 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=DECIMAL},
      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.
    -->
neo's avatar
neo committed
242
    update STATISTIC_ATTRIBUTE
243 244
    <set>
      <if test="name != null">
neo's avatar
neo committed
245
        "NAME" = #{name,jdbcType=VARCHAR},
246 247
      </if>
      <if test="isActive != null">
neo's avatar
neo committed
248
        IS_ACTIVE = #{isActive,jdbcType=DECIMAL},
249 250
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
251
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
252 253
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
254
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
255 256
      </if>
    </set>
neo's avatar
neo 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.
    -->
neo's avatar
neo committed
264 265 266 267 268 269
    update STATISTIC_ATTRIBUTE
    set "NAME" = #{name,jdbcType=VARCHAR},
      IS_ACTIVE = #{isActive,jdbcType=DECIMAL},
      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" />
neo's avatar
neo 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>