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