<?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.VoucherMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.Voucher"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <id column="VOUCHER_ID" jdbcType="VARCHAR" property="voucherId" /> <result column="VID" jdbcType="VARCHAR" property="vid" /> <result column="DATE" jdbcType="TIMESTAMP" property="date" /> <result column="GROUP" jdbcType="VARCHAR" property="group" /> <result column="PERIOD" jdbcType="DECIMAL" property="period" /> <result column="CUSTOMER_CODE" jdbcType="VARCHAR" property="customerCode" /> <result column="CUSTOMER_NAME" jdbcType="VARCHAR" property="customerName" /> <result column="SUMMARY" jdbcType="VARCHAR" property="summary" /> <result column="ACCT_CODE" jdbcType="VARCHAR" property="acctCode" /> <result column="DEBIT" jdbcType="DECIMAL" property="debit" /> <result column="CREDIT" jdbcType="DECIMAL" property="credit" /> <result column="ATTACH" jdbcType="DECIMAL" property="attach" /> <result column="ITEM_ID" jdbcType="VARCHAR" property="itemId" /> <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" /> <result column="IMPORT_TYPE" jdbcType="DECIMAL" property="importType" /> <result column="CREATOR_ID" jdbcType="VARCHAR" property="creatorId" /> <result column="MONTH_ID" jdbcType="DECIMAL" property="monthId" /> <result column="ORIGINAL_PERIOD" jdbcType="DECIMAL" property="originalPeriod" /> <result column="STATUS" jdbcType="DECIMAL" property="status" /> <result column="PART_BILLED_PERIOD" jdbcType="DECIMAL" property="partBilledPeriod" /> <result column="BILLED_PERIOD" jdbcType="DECIMAL" property="billedPeriod" /> <result column="STD_CODE" jdbcType="VARCHAR" property="stdCode" /> <result column="MAPPING_REASON" jdbcType="VARCHAR" property="mappingReason" /> <result column="MAPPING_USER" jdbcType="VARCHAR" property="mappingUser" /> <result column="MAPPING_TIME" jdbcType="TIMESTAMP" property="mappingTime" /> <result column="REMAP_ID" jdbcType="VARCHAR" property="remapId" /> </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. --> VOUCHER_ID, VID, "DATE", "GROUP", PERIOD, CUSTOMER_CODE, CUSTOMER_NAME, SUMMARY, ACCT_CODE, DEBIT, CREDIT, ATTACH, ITEM_ID, CREATE_TIME, IMPORT_TYPE, CREATOR_ID, MONTH_ID, ORIGINAL_PERIOD, "STATUS", PART_BILLED_PERIOD, BILLED_PERIOD, STD_CODE, MAPPING_REASON, MAPPING_USER, MAPPING_TIME, REMAP_ID </sql> <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" 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 VOUCHER <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.String" resultMap="BaseResultMap"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select <include refid="Base_Column_List" /> from VOUCHER where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from VOUCHER where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from VOUCHER <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.Voucher"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into VOUCHER (VOUCHER_ID, VID, "DATE", "GROUP", PERIOD, CUSTOMER_CODE, CUSTOMER_NAME, SUMMARY, ACCT_CODE, DEBIT, CREDIT, ATTACH, ITEM_ID, CREATE_TIME, IMPORT_TYPE, CREATOR_ID, MONTH_ID, ORIGINAL_PERIOD, "STATUS", PART_BILLED_PERIOD, BILLED_PERIOD, STD_CODE, MAPPING_REASON, MAPPING_USER, MAPPING_TIME, REMAP_ID) values (#{voucherId,jdbcType=VARCHAR}, #{vid,jdbcType=VARCHAR}, #{date,jdbcType=TIMESTAMP}, #{group,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL}, #{customerCode,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{acctCode,jdbcType=VARCHAR}, #{debit,jdbcType=DECIMAL}, #{credit,jdbcType=DECIMAL}, #{attach,jdbcType=DECIMAL}, #{itemId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{importType,jdbcType=DECIMAL}, #{creatorId,jdbcType=VARCHAR}, #{monthId,jdbcType=DECIMAL}, #{originalPeriod,jdbcType=DECIMAL}, #{status,jdbcType=DECIMAL}, #{partBilledPeriod,jdbcType=DECIMAL}, #{billedPeriod,jdbcType=DECIMAL}, #{stdCode,jdbcType=VARCHAR}, #{mappingReason,jdbcType=VARCHAR}, #{mappingUser,jdbcType=VARCHAR}, #{mappingTime,jdbcType=TIMESTAMP}, #{remapId,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.Voucher"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into VOUCHER <trim prefix="(" suffix=")" suffixOverrides=","> <if test="voucherId != null"> VOUCHER_ID, </if> <if test="vid != null"> VID, </if> <if test="date != null"> "DATE", </if> <if test="group != null"> "GROUP", </if> <if test="period != null"> PERIOD, </if> <if test="customerCode != null"> CUSTOMER_CODE, </if> <if test="customerName != null"> CUSTOMER_NAME, </if> <if test="summary != null"> SUMMARY, </if> <if test="acctCode != null"> ACCT_CODE, </if> <if test="debit != null"> DEBIT, </if> <if test="credit != null"> CREDIT, </if> <if test="attach != null"> ATTACH, </if> <if test="itemId != null"> ITEM_ID, </if> <if test="createTime != null"> CREATE_TIME, </if> <if test="importType != null"> IMPORT_TYPE, </if> <if test="creatorId != null"> CREATOR_ID, </if> <if test="monthId != null"> MONTH_ID, </if> <if test="originalPeriod != null"> ORIGINAL_PERIOD, </if> <if test="status != null"> "STATUS", </if> <if test="partBilledPeriod != null"> PART_BILLED_PERIOD, </if> <if test="billedPeriod != null"> BILLED_PERIOD, </if> <if test="stdCode != null"> STD_CODE, </if> <if test="mappingReason != null"> MAPPING_REASON, </if> <if test="mappingUser != null"> MAPPING_USER, </if> <if test="mappingTime != null"> MAPPING_TIME, </if> <if test="remapId != null"> REMAP_ID, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="voucherId != null"> #{voucherId,jdbcType=VARCHAR}, </if> <if test="vid != null"> #{vid,jdbcType=VARCHAR}, </if> <if test="date != null"> #{date,jdbcType=TIMESTAMP}, </if> <if test="group != null"> #{group,jdbcType=VARCHAR}, </if> <if test="period != null"> #{period,jdbcType=DECIMAL}, </if> <if test="customerCode != null"> #{customerCode,jdbcType=VARCHAR}, </if> <if test="customerName != null"> #{customerName,jdbcType=VARCHAR}, </if> <if test="summary != null"> #{summary,jdbcType=VARCHAR}, </if> <if test="acctCode != null"> #{acctCode,jdbcType=VARCHAR}, </if> <if test="debit != null"> #{debit,jdbcType=DECIMAL}, </if> <if test="credit != null"> #{credit,jdbcType=DECIMAL}, </if> <if test="attach != null"> #{attach,jdbcType=DECIMAL}, </if> <if test="itemId != null"> #{itemId,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="importType != null"> #{importType,jdbcType=DECIMAL}, </if> <if test="creatorId != null"> #{creatorId,jdbcType=VARCHAR}, </if> <if test="monthId != null"> #{monthId,jdbcType=DECIMAL}, </if> <if test="originalPeriod != null"> #{originalPeriod,jdbcType=DECIMAL}, </if> <if test="status != null"> #{status,jdbcType=DECIMAL}, </if> <if test="partBilledPeriod != null"> #{partBilledPeriod,jdbcType=DECIMAL}, </if> <if test="billedPeriod != null"> #{billedPeriod,jdbcType=DECIMAL}, </if> <if test="stdCode != null"> #{stdCode,jdbcType=VARCHAR}, </if> <if test="mappingReason != null"> #{mappingReason,jdbcType=VARCHAR}, </if> <if test="mappingUser != null"> #{mappingUser,jdbcType=VARCHAR}, </if> <if test="mappingTime != null"> #{mappingTime,jdbcType=TIMESTAMP}, </if> <if test="remapId != null"> #{remapId,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from VOUCHER <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 VOUCHER <set> <if test="record.voucherId != null"> VOUCHER_ID = #{record.voucherId,jdbcType=VARCHAR}, </if> <if test="record.vid != null"> VID = #{record.vid,jdbcType=VARCHAR}, </if> <if test="record.date != null"> "DATE" = #{record.date,jdbcType=TIMESTAMP}, </if> <if test="record.group != null"> "GROUP" = #{record.group,jdbcType=VARCHAR}, </if> <if test="record.period != null"> PERIOD = #{record.period,jdbcType=DECIMAL}, </if> <if test="record.customerCode != null"> CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR}, </if> <if test="record.customerName != null"> CUSTOMER_NAME = #{record.customerName,jdbcType=VARCHAR}, </if> <if test="record.summary != null"> SUMMARY = #{record.summary,jdbcType=VARCHAR}, </if> <if test="record.acctCode != null"> ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR}, </if> <if test="record.debit != null"> DEBIT = #{record.debit,jdbcType=DECIMAL}, </if> <if test="record.credit != null"> CREDIT = #{record.credit,jdbcType=DECIMAL}, </if> <if test="record.attach != null"> ATTACH = #{record.attach,jdbcType=DECIMAL}, </if> <if test="record.itemId != null"> ITEM_ID = #{record.itemId,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.importType != null"> IMPORT_TYPE = #{record.importType,jdbcType=DECIMAL}, </if> <if test="record.creatorId != null"> CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR}, </if> <if test="record.monthId != null"> MONTH_ID = #{record.monthId,jdbcType=DECIMAL}, </if> <if test="record.originalPeriod != null"> ORIGINAL_PERIOD = #{record.originalPeriod,jdbcType=DECIMAL}, </if> <if test="record.status != null"> "STATUS" = #{record.status,jdbcType=DECIMAL}, </if> <if test="record.partBilledPeriod != null"> PART_BILLED_PERIOD = #{record.partBilledPeriod,jdbcType=DECIMAL}, </if> <if test="record.billedPeriod != null"> BILLED_PERIOD = #{record.billedPeriod,jdbcType=DECIMAL}, </if> <if test="record.stdCode != null"> STD_CODE = #{record.stdCode,jdbcType=VARCHAR}, </if> <if test="record.mappingReason != null"> MAPPING_REASON = #{record.mappingReason,jdbcType=VARCHAR}, </if> <if test="record.mappingUser != null"> MAPPING_USER = #{record.mappingUser,jdbcType=VARCHAR}, </if> <if test="record.mappingTime != null"> MAPPING_TIME = #{record.mappingTime,jdbcType=TIMESTAMP}, </if> <if test="record.remapId != null"> REMAP_ID = #{record.remapId,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 VOUCHER set VOUCHER_ID = #{record.voucherId,jdbcType=VARCHAR}, VID = #{record.vid,jdbcType=VARCHAR}, "DATE" = #{record.date,jdbcType=TIMESTAMP}, "GROUP" = #{record.group,jdbcType=VARCHAR}, PERIOD = #{record.period,jdbcType=DECIMAL}, CUSTOMER_CODE = #{record.customerCode,jdbcType=VARCHAR}, CUSTOMER_NAME = #{record.customerName,jdbcType=VARCHAR}, SUMMARY = #{record.summary,jdbcType=VARCHAR}, ACCT_CODE = #{record.acctCode,jdbcType=VARCHAR}, DEBIT = #{record.debit,jdbcType=DECIMAL}, CREDIT = #{record.credit,jdbcType=DECIMAL}, ATTACH = #{record.attach,jdbcType=DECIMAL}, ITEM_ID = #{record.itemId,jdbcType=VARCHAR}, CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, IMPORT_TYPE = #{record.importType,jdbcType=DECIMAL}, CREATOR_ID = #{record.creatorId,jdbcType=VARCHAR}, MONTH_ID = #{record.monthId,jdbcType=DECIMAL}, ORIGINAL_PERIOD = #{record.originalPeriod,jdbcType=DECIMAL}, "STATUS" = #{record.status,jdbcType=DECIMAL}, PART_BILLED_PERIOD = #{record.partBilledPeriod,jdbcType=DECIMAL}, BILLED_PERIOD = #{record.billedPeriod,jdbcType=DECIMAL}, STD_CODE = #{record.stdCode,jdbcType=VARCHAR}, MAPPING_REASON = #{record.mappingReason,jdbcType=VARCHAR}, MAPPING_USER = #{record.mappingUser,jdbcType=VARCHAR}, MAPPING_TIME = #{record.mappingTime,jdbcType=TIMESTAMP}, REMAP_ID = #{record.remapId,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.Voucher"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update VOUCHER <set> <if test="vid != null"> VID = #{vid,jdbcType=VARCHAR}, </if> <if test="date != null"> "DATE" = #{date,jdbcType=TIMESTAMP}, </if> <if test="group != null"> "GROUP" = #{group,jdbcType=VARCHAR}, </if> <if test="period != null"> PERIOD = #{period,jdbcType=DECIMAL}, </if> <if test="customerCode != null"> CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR}, </if> <if test="customerName != null"> CUSTOMER_NAME = #{customerName,jdbcType=VARCHAR}, </if> <if test="summary != null"> SUMMARY = #{summary,jdbcType=VARCHAR}, </if> <if test="acctCode != null"> ACCT_CODE = #{acctCode,jdbcType=VARCHAR}, </if> <if test="debit != null"> DEBIT = #{debit,jdbcType=DECIMAL}, </if> <if test="credit != null"> CREDIT = #{credit,jdbcType=DECIMAL}, </if> <if test="attach != null"> ATTACH = #{attach,jdbcType=DECIMAL}, </if> <if test="itemId != null"> ITEM_ID = #{itemId,jdbcType=VARCHAR}, </if> <if test="createTime != null"> CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="importType != null"> IMPORT_TYPE = #{importType,jdbcType=DECIMAL}, </if> <if test="creatorId != null"> CREATOR_ID = #{creatorId,jdbcType=VARCHAR}, </if> <if test="monthId != null"> MONTH_ID = #{monthId,jdbcType=DECIMAL}, </if> <if test="originalPeriod != null"> ORIGINAL_PERIOD = #{originalPeriod,jdbcType=DECIMAL}, </if> <if test="status != null"> "STATUS" = #{status,jdbcType=DECIMAL}, </if> <if test="partBilledPeriod != null"> PART_BILLED_PERIOD = #{partBilledPeriod,jdbcType=DECIMAL}, </if> <if test="billedPeriod != null"> BILLED_PERIOD = #{billedPeriod,jdbcType=DECIMAL}, </if> <if test="stdCode != null"> STD_CODE = #{stdCode,jdbcType=VARCHAR}, </if> <if test="mappingReason != null"> MAPPING_REASON = #{mappingReason,jdbcType=VARCHAR}, </if> <if test="mappingUser != null"> MAPPING_USER = #{mappingUser,jdbcType=VARCHAR}, </if> <if test="mappingTime != null"> MAPPING_TIME = #{mappingTime,jdbcType=TIMESTAMP}, </if> <if test="remapId != null"> REMAP_ID = #{remapId,jdbcType=VARCHAR}, </if> </set> where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.Voucher"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update VOUCHER set VID = #{vid,jdbcType=VARCHAR}, "DATE" = #{date,jdbcType=TIMESTAMP}, "GROUP" = #{group,jdbcType=VARCHAR}, PERIOD = #{period,jdbcType=DECIMAL}, CUSTOMER_CODE = #{customerCode,jdbcType=VARCHAR}, CUSTOMER_NAME = #{customerName,jdbcType=VARCHAR}, SUMMARY = #{summary,jdbcType=VARCHAR}, ACCT_CODE = #{acctCode,jdbcType=VARCHAR}, DEBIT = #{debit,jdbcType=DECIMAL}, CREDIT = #{credit,jdbcType=DECIMAL}, ATTACH = #{attach,jdbcType=DECIMAL}, ITEM_ID = #{itemId,jdbcType=VARCHAR}, CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, IMPORT_TYPE = #{importType,jdbcType=DECIMAL}, CREATOR_ID = #{creatorId,jdbcType=VARCHAR}, MONTH_ID = #{monthId,jdbcType=DECIMAL}, ORIGINAL_PERIOD = #{originalPeriod,jdbcType=DECIMAL}, "STATUS" = #{status,jdbcType=DECIMAL}, PART_BILLED_PERIOD = #{partBilledPeriod,jdbcType=DECIMAL}, BILLED_PERIOD = #{billedPeriod,jdbcType=DECIMAL}, STD_CODE = #{stdCode,jdbcType=VARCHAR}, MAPPING_REASON = #{mappingReason,jdbcType=VARCHAR}, MAPPING_USER = #{mappingUser,jdbcType=VARCHAR}, MAPPING_TIME = #{mappingTime,jdbcType=TIMESTAMP}, REMAP_ID = #{remapId,jdbcType=VARCHAR} where VOUCHER_ID = #{voucherId,jdbcType=VARCHAR} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.VoucherExample" 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 VOUCHER <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>