<?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.AccountMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.Account"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <id column="ID" jdbcType="VARCHAR" property="id" /> <result column="CODE" jdbcType="VARCHAR" property="code" /> <result column="NAME" jdbcType="VARCHAR" property="name" /> <result column="PARENT_CODE" jdbcType="VARCHAR" property="parentCode" /> <result column="FULL_NAME" jdbcType="VARCHAR" property="fullName" /> <result column="ACCT_PROP" jdbcType="DECIMAL" property="acctProp" /> <result column="SUB_PROP" jdbcType="DECIMAL" property="subProp" /> <result column="ACCT_LEVEL" jdbcType="DECIMAL" property="acctLevel" /> <result column="DIRECTION" jdbcType="DECIMAL" property="direction" /> <result column="IS_LEAF" jdbcType="DECIMAL" property="isLeaf" /> <result column="RULE_TYPE" jdbcType="DECIMAL" property="ruleType" /> <result column="IS_ACTIVE" jdbcType="DECIMAL" property="isActive" /> <result column="ENGLISH_NAME" jdbcType="VARCHAR" property="englishName" /> <result column="INDUSTRY_ID" jdbcType="VARCHAR" property="industryId" /> </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, CODE, "NAME", PARENT_CODE, FULL_NAME, ACCT_PROP, SUB_PROP, ACCT_LEVEL, DIRECTION, IS_LEAF, RULE_TYPE, IS_ACTIVE, ENGLISH_NAME, INDUSTRY_ID </sql> <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountExample" 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 ACCOUNT <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 ACCOUNT where ID = #{id,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 ACCOUNT where ID = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from ACCOUNT <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.Account"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into ACCOUNT (ID, CODE, "NAME", PARENT_CODE, FULL_NAME, ACCT_PROP, SUB_PROP, ACCT_LEVEL, DIRECTION, IS_LEAF, RULE_TYPE, IS_ACTIVE, ENGLISH_NAME, INDUSTRY_ID) values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR}, #{acctProp,jdbcType=DECIMAL}, #{subProp,jdbcType=DECIMAL}, #{acctLevel,jdbcType=DECIMAL}, #{direction,jdbcType=DECIMAL}, #{isLeaf,jdbcType=DECIMAL}, #{ruleType,jdbcType=DECIMAL}, #{isActive,jdbcType=DECIMAL}, #{englishName,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.Account"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into ACCOUNT <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> ID, </if> <if test="code != null"> CODE, </if> <if test="name != null"> "NAME", </if> <if test="parentCode != null"> PARENT_CODE, </if> <if test="fullName != null"> FULL_NAME, </if> <if test="acctProp != null"> ACCT_PROP, </if> <if test="subProp != null"> SUB_PROP, </if> <if test="acctLevel != null"> ACCT_LEVEL, </if> <if test="direction != null"> DIRECTION, </if> <if test="isLeaf != null"> IS_LEAF, </if> <if test="ruleType != null"> RULE_TYPE, </if> <if test="isActive != null"> IS_ACTIVE, </if> <if test="englishName != null"> ENGLISH_NAME, </if> <if test="industryId != null"> INDUSTRY_ID, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="code != null"> #{code,jdbcType=VARCHAR}, </if> <if test="name != null"> #{name,jdbcType=VARCHAR}, </if> <if test="parentCode != null"> #{parentCode,jdbcType=VARCHAR}, </if> <if test="fullName != null"> #{fullName,jdbcType=VARCHAR}, </if> <if test="acctProp != null"> #{acctProp,jdbcType=DECIMAL}, </if> <if test="subProp != null"> #{subProp,jdbcType=DECIMAL}, </if> <if test="acctLevel != null"> #{acctLevel,jdbcType=DECIMAL}, </if> <if test="direction != null"> #{direction,jdbcType=DECIMAL}, </if> <if test="isLeaf != null"> #{isLeaf,jdbcType=DECIMAL}, </if> <if test="ruleType != null"> #{ruleType,jdbcType=DECIMAL}, </if> <if test="isActive != null"> #{isActive,jdbcType=DECIMAL}, </if> <if test="englishName != null"> #{englishName,jdbcType=VARCHAR}, </if> <if test="industryId != null"> #{industryId,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.AccountExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from ACCOUNT <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 ACCOUNT <set> <if test="record.id != null"> ID = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.code != null"> CODE = #{record.code,jdbcType=VARCHAR}, </if> <if test="record.name != null"> "NAME" = #{record.name,jdbcType=VARCHAR}, </if> <if test="record.parentCode != null"> PARENT_CODE = #{record.parentCode,jdbcType=VARCHAR}, </if> <if test="record.fullName != null"> FULL_NAME = #{record.fullName,jdbcType=VARCHAR}, </if> <if test="record.acctProp != null"> ACCT_PROP = #{record.acctProp,jdbcType=DECIMAL}, </if> <if test="record.subProp != null"> SUB_PROP = #{record.subProp,jdbcType=DECIMAL}, </if> <if test="record.acctLevel != null"> ACCT_LEVEL = #{record.acctLevel,jdbcType=DECIMAL}, </if> <if test="record.direction != null"> DIRECTION = #{record.direction,jdbcType=DECIMAL}, </if> <if test="record.isLeaf != null"> IS_LEAF = #{record.isLeaf,jdbcType=DECIMAL}, </if> <if test="record.ruleType != null"> RULE_TYPE = #{record.ruleType,jdbcType=DECIMAL}, </if> <if test="record.isActive != null"> IS_ACTIVE = #{record.isActive,jdbcType=DECIMAL}, </if> <if test="record.englishName != null"> ENGLISH_NAME = #{record.englishName,jdbcType=VARCHAR}, </if> <if test="record.industryId != null"> INDUSTRY_ID = #{record.industryId,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 ACCOUNT set ID = #{record.id,jdbcType=VARCHAR}, CODE = #{record.code,jdbcType=VARCHAR}, "NAME" = #{record.name,jdbcType=VARCHAR}, PARENT_CODE = #{record.parentCode,jdbcType=VARCHAR}, FULL_NAME = #{record.fullName,jdbcType=VARCHAR}, ACCT_PROP = #{record.acctProp,jdbcType=DECIMAL}, SUB_PROP = #{record.subProp,jdbcType=DECIMAL}, ACCT_LEVEL = #{record.acctLevel,jdbcType=DECIMAL}, DIRECTION = #{record.direction,jdbcType=DECIMAL}, IS_LEAF = #{record.isLeaf,jdbcType=DECIMAL}, RULE_TYPE = #{record.ruleType,jdbcType=DECIMAL}, IS_ACTIVE = #{record.isActive,jdbcType=DECIMAL}, ENGLISH_NAME = #{record.englishName,jdbcType=VARCHAR}, INDUSTRY_ID = #{record.industryId,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.Account"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update ACCOUNT <set> <if test="code != null"> CODE = #{code,jdbcType=VARCHAR}, </if> <if test="name != null"> "NAME" = #{name,jdbcType=VARCHAR}, </if> <if test="parentCode != null"> PARENT_CODE = #{parentCode,jdbcType=VARCHAR}, </if> <if test="fullName != null"> FULL_NAME = #{fullName,jdbcType=VARCHAR}, </if> <if test="acctProp != null"> ACCT_PROP = #{acctProp,jdbcType=DECIMAL}, </if> <if test="subProp != null"> SUB_PROP = #{subProp,jdbcType=DECIMAL}, </if> <if test="acctLevel != null"> ACCT_LEVEL = #{acctLevel,jdbcType=DECIMAL}, </if> <if test="direction != null"> DIRECTION = #{direction,jdbcType=DECIMAL}, </if> <if test="isLeaf != null"> IS_LEAF = #{isLeaf,jdbcType=DECIMAL}, </if> <if test="ruleType != null"> RULE_TYPE = #{ruleType,jdbcType=DECIMAL}, </if> <if test="isActive != null"> IS_ACTIVE = #{isActive,jdbcType=DECIMAL}, </if> <if test="englishName != null"> ENGLISH_NAME = #{englishName,jdbcType=VARCHAR}, </if> <if test="industryId != null"> INDUSTRY_ID = #{industryId,jdbcType=VARCHAR}, </if> </set> where ID = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.Account"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update ACCOUNT set CODE = #{code,jdbcType=VARCHAR}, "NAME" = #{name,jdbcType=VARCHAR}, PARENT_CODE = #{parentCode,jdbcType=VARCHAR}, FULL_NAME = #{fullName,jdbcType=VARCHAR}, ACCT_PROP = #{acctProp,jdbcType=DECIMAL}, SUB_PROP = #{subProp,jdbcType=DECIMAL}, ACCT_LEVEL = #{acctLevel,jdbcType=DECIMAL}, DIRECTION = #{direction,jdbcType=DECIMAL}, IS_LEAF = #{isLeaf,jdbcType=DECIMAL}, RULE_TYPE = #{ruleType,jdbcType=DECIMAL}, IS_ACTIVE = #{isActive,jdbcType=DECIMAL}, ENGLISH_NAME = #{englishName,jdbcType=VARCHAR}, INDUSTRY_ID = #{industryId,jdbcType=VARCHAR} where ID = #{id,jdbcType=VARCHAR} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.AccountExample" 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 ACCOUNT <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>