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