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