<?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"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodTaxRuleSettingOrganization"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <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" /> </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> </foreach> </trim> </if> </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> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> ID, TAX_SETTING_ID, PERIOD, ORGANIZATION_ID, CREATE_TIME, UPDATE_TIME, SETTING_ORG_ID, CREATE_BY, UPDATE_BY </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" /> from PERIOD_TAX_RULE_SETTING_ORG <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" /> from PERIOD_TAX_RULE_SETTING_ORG where ID = #{id,jdbcType=DECIMAL} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from PERIOD_TAX_RULE_SETTING_ORG where ID = #{id,jdbcType=DECIMAL} </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. --> delete from PERIOD_TAX_RULE_SETTING_ORG <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. --> 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}, #{organizationId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{settingOrgId,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR} ) </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. --> insert into PERIOD_TAX_RULE_SETTING_ORG <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> ID, </if> <if test="taxSettingId != null"> TAX_SETTING_ID, </if> <if test="period != null"> PERIOD, </if> <if test="organizationId != null"> ORGANIZATION_ID, </if> <if test="createTime != null"> CREATE_TIME, </if> <if test="updateTime != null"> UPDATE_TIME, </if> <if test="settingOrgId != null"> SETTING_ORG_ID, </if> <if test="createBy != null"> CREATE_BY, </if> <if test="updateBy != null"> UPDATE_BY, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=DECIMAL}, </if> <if test="taxSettingId != null"> #{taxSettingId,jdbcType=DECIMAL}, </if> <if test="period != null"> #{period,jdbcType=DECIMAL}, </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="settingOrgId != null"> #{settingOrgId,jdbcType=DECIMAL}, </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. --> select count(*) from PERIOD_TAX_RULE_SETTING_ORG <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. --> update PERIOD_TAX_RULE_SETTING_ORG <set> <if test="record.id != null"> ID = #{record.id,jdbcType=DECIMAL}, </if> <if test="record.taxSettingId != null"> TAX_SETTING_ID = #{record.taxSettingId,jdbcType=DECIMAL}, </if> <if test="record.period != null"> PERIOD = #{record.period,jdbcType=DECIMAL}, </if> <if test="record.organizationId != null"> ORGANIZATION_ID = #{record.organizationId,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateTime != null"> UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.settingOrgId != null"> SETTING_ORG_ID = #{record.settingOrgId,jdbcType=DECIMAL}, </if> <if test="record.createBy != null"> CREATE_BY = #{record.createBy,jdbcType=VARCHAR}, </if> <if test="record.updateBy != null"> UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR}, </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. --> 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} <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. --> update PERIOD_TAX_RULE_SETTING_ORG <set> <if test="taxSettingId != null"> TAX_SETTING_ID = #{taxSettingId,jdbcType=DECIMAL}, </if> <if test="period != null"> PERIOD = #{period,jdbcType=DECIMAL}, </if> <if test="organizationId != null"> ORGANIZATION_ID = #{organizationId,jdbcType=VARCHAR}, </if> <if test="createTime != null"> CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="settingOrgId != null"> SETTING_ORG_ID = #{settingOrgId,jdbcType=DECIMAL}, </if> <if test="createBy != null"> CREATE_BY = #{createBy,jdbcType=VARCHAR}, </if> <if test="updateBy != null"> UPDATE_BY = #{updateBy,jdbcType=VARCHAR}, </if> </set> where ID = #{id,jdbcType=DECIMAL} </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. --> 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} </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" /> from PERIOD_TAX_RULE_SETTING_ORG <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>