PeriodTaxRuleSettingOrganizationMapper.xml 13.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.vat.dao.PeriodTaxRuleSettingOrganizationMapper">
4 5 6 7 8
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization">
    <!--
      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="TAX_SETTING_ID" jdbcType="DECIMAL" property="taxSettingId" />
    <result column="PERIOD" jdbcType="DECIMAL" property="period" />
    <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="SETTING_ORG_ID" jdbcType="DECIMAL" property="settingOrgId" />
    <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, TAX_SETTING_ID, PERIOD, ORGANIZATION_ID, CREATE_TIME, UPDATE_TIME, SETTING_ORG_ID, 
    CREATE_BY, UPDATE_BY
92 93 94 95 96 97 98 99 100 101 102
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganizationExample" resultMap="BaseResultMap">
    <!--
      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 PERIOD_TAX_RULE_SETTING_ORG
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 PERIOD_TAX_RULE_SETTING_ORG
    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 PERIOD_TAX_RULE_SETTING_ORG
    where ID = #{id,jdbcType=DECIMAL}
128 129 130 131 132 133
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganizationExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
134
    delete from PERIOD_TAX_RULE_SETTING_ORG
135 136 137 138 139 140 141 142 143
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
144 145 146 147 148
    insert into PERIOD_TAX_RULE_SETTING_ORG (ID, TAX_SETTING_ID, PERIOD, 
      ORGANIZATION_ID, CREATE_TIME, UPDATE_TIME, 
      SETTING_ORG_ID, CREATE_BY, UPDATE_BY
      )
    values (#{id,jdbcType=DECIMAL}, #{taxSettingId,jdbcType=DECIMAL}, #{period,jdbcType=DECIMAL}, 
149
      #{organizationId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
neo's avatar
neo committed
150 151
      #{settingOrgId,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}
      )
152 153 154 155 156 157
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
158
    insert into PERIOD_TAX_RULE_SETTING_ORG
159 160
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
neo's avatar
neo committed
161
        ID,
162 163
      </if>
      <if test="taxSettingId != null">
neo's avatar
neo committed
164
        TAX_SETTING_ID,
165 166
      </if>
      <if test="period != null">
neo's avatar
neo committed
167
        PERIOD,
168 169
      </if>
      <if test="organizationId != null">
neo's avatar
neo committed
170
        ORGANIZATION_ID,
171 172
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
173
        CREATE_TIME,
174 175
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
176
        UPDATE_TIME,
177
      </if>
neo's avatar
neo committed
178 179
      <if test="settingOrgId != null">
        SETTING_ORG_ID,
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="taxSettingId != null">
neo's avatar
neo committed
193
        #{taxSettingId,jdbcType=DECIMAL},
194 195
      </if>
      <if test="period != null">
neo's avatar
neo committed
196
        #{period,jdbcType=DECIMAL},
197 198 199 200 201 202 203 204 205 206
      </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>
neo's avatar
neo committed
207 208
      <if test="settingOrgId != null">
        #{settingOrgId,jdbcType=DECIMAL},
209 210 211 212 213 214 215 216 217 218 219 220 221 222
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganizationExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
223
    select count(*) from PERIOD_TAX_RULE_SETTING_ORG
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 PERIOD_TAX_RULE_SETTING_ORG
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.taxSettingId != null">
neo's avatar
neo committed
239
        TAX_SETTING_ID = #{record.taxSettingId,jdbcType=DECIMAL},
240 241
      </if>
      <if test="record.period != null">
neo's avatar
neo committed
242
        PERIOD = #{record.period,jdbcType=DECIMAL},
243 244
      </if>
      <if test="record.organizationId != null">
neo's avatar
neo committed
245
        ORGANIZATION_ID = #{record.organizationId,jdbcType=VARCHAR},
246 247
      </if>
      <if test="record.createTime != null">
neo's avatar
neo committed
248
        CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
249 250
      </if>
      <if test="record.updateTime != null">
neo's avatar
neo committed
251
        UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
252
      </if>
neo's avatar
neo committed
253 254
      <if test="record.settingOrgId != null">
        SETTING_ORG_ID = #{record.settingOrgId,jdbcType=DECIMAL},
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 PERIOD_TAX_RULE_SETTING_ORG
    set ID = #{record.id,jdbcType=DECIMAL},
      TAX_SETTING_ID = #{record.taxSettingId,jdbcType=DECIMAL},
      PERIOD = #{record.period,jdbcType=DECIMAL},
      ORGANIZATION_ID = #{record.organizationId,jdbcType=VARCHAR},
      CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
      SETTING_ORG_ID = #{record.settingOrgId,jdbcType=DECIMAL},
      CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
      UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR}
282 283 284 285 286 287 288 289 290
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
neo's avatar
neo committed
291
    update PERIOD_TAX_RULE_SETTING_ORG
292 293
    <set>
      <if test="taxSettingId != null">
neo's avatar
neo committed
294
        TAX_SETTING_ID = #{taxSettingId,jdbcType=DECIMAL},
295 296
      </if>
      <if test="period != null">
neo's avatar
neo committed
297
        PERIOD = #{period,jdbcType=DECIMAL},
298 299
      </if>
      <if test="organizationId != null">
neo's avatar
neo committed
300
        ORGANIZATION_ID = #{organizationId,jdbcType=VARCHAR},
301 302
      </if>
      <if test="createTime != null">
neo's avatar
neo committed
303
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
304 305
      </if>
      <if test="updateTime != null">
neo's avatar
neo committed
306
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
307
      </if>
neo's avatar
neo committed
308 309
      <if test="settingOrgId != null">
        SETTING_ORG_ID = #{settingOrgId,jdbcType=DECIMAL},
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 320 321 322 323 324
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization">
    <!--
      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 PERIOD_TAX_RULE_SETTING_ORG
    set TAX_SETTING_ID = #{taxSettingId,jdbcType=DECIMAL},
      PERIOD = #{period,jdbcType=DECIMAL},
      ORGANIZATION_ID = #{organizationId,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      SETTING_ORG_ID = #{settingOrgId,jdbcType=DECIMAL},
      CREATE_BY = #{createBy,jdbcType=VARCHAR},
      UPDATE_BY = #{updateBy,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=DECIMAL}
335 336 337 338 339 340 341 342 343 344 345
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganizationExample" resultMap="BaseResultMap">
    <!--
      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 PERIOD_TAX_RULE_SETTING_ORG
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>