<?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.dao.StandardAccountMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.StandardAccount"> <!-- 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="INTEGER" property="acctProp" /> <result column="sub_prop" jdbcType="INTEGER" property="subProp" /> <result column="acct_level" jdbcType="INTEGER" property="acctLevel" /> <result column="direction" jdbcType="INTEGER" property="direction" /> <result column="is_leaf" jdbcType="BIT" property="isLeaf" /> <result column="rule_type" jdbcType="INTEGER" property="ruleType" /> <result column="is_active" jdbcType="BIT" 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.entity.StandardAccountExample" 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 standard_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 standard_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 standard_account where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.StandardAccountExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from standard_account <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.entity.StandardAccount"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into standard_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=INTEGER}, #{subProp,jdbcType=INTEGER}, #{acctLevel,jdbcType=INTEGER}, #{direction,jdbcType=INTEGER}, #{isLeaf,jdbcType=BIT}, #{ruleType,jdbcType=INTEGER}, #{isActive,jdbcType=BIT}, #{englishName,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.StandardAccount"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into standard_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=INTEGER}, </if> <if test="subProp != null"> #{subProp,jdbcType=INTEGER}, </if> <if test="acctLevel != null"> #{acctLevel,jdbcType=INTEGER}, </if> <if test="direction != null"> #{direction,jdbcType=INTEGER}, </if> <if test="isLeaf != null"> #{isLeaf,jdbcType=BIT}, </if> <if test="ruleType != null"> #{ruleType,jdbcType=INTEGER}, </if> <if test="isActive != null"> #{isActive,jdbcType=BIT}, </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.entity.StandardAccountExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from standard_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 standard_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=INTEGER}, </if> <if test="record.subProp != null"> sub_prop = #{record.subProp,jdbcType=INTEGER}, </if> <if test="record.acctLevel != null"> acct_level = #{record.acctLevel,jdbcType=INTEGER}, </if> <if test="record.direction != null"> direction = #{record.direction,jdbcType=INTEGER}, </if> <if test="record.isLeaf != null"> is_leaf = #{record.isLeaf,jdbcType=BIT}, </if> <if test="record.ruleType != null"> rule_type = #{record.ruleType,jdbcType=INTEGER}, </if> <if test="record.isActive != null"> is_active = #{record.isActive,jdbcType=BIT}, </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 standard_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=INTEGER}, sub_prop = #{record.subProp,jdbcType=INTEGER}, acct_level = #{record.acctLevel,jdbcType=INTEGER}, direction = #{record.direction,jdbcType=INTEGER}, is_leaf = #{record.isLeaf,jdbcType=BIT}, rule_type = #{record.ruleType,jdbcType=INTEGER}, is_active = #{record.isActive,jdbcType=BIT}, 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.entity.StandardAccount"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update standard_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=INTEGER}, </if> <if test="subProp != null"> sub_prop = #{subProp,jdbcType=INTEGER}, </if> <if test="acctLevel != null"> acct_level = #{acctLevel,jdbcType=INTEGER}, </if> <if test="direction != null"> direction = #{direction,jdbcType=INTEGER}, </if> <if test="isLeaf != null"> is_leaf = #{isLeaf,jdbcType=BIT}, </if> <if test="ruleType != null"> rule_type = #{ruleType,jdbcType=INTEGER}, </if> <if test="isActive != null"> is_active = #{isActive,jdbcType=BIT}, </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.entity.StandardAccount"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update standard_account set code = #{code,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, parent_code = #{parentCode,jdbcType=VARCHAR}, full_name = #{fullName,jdbcType=VARCHAR}, acct_prop = #{acctProp,jdbcType=INTEGER}, sub_prop = #{subProp,jdbcType=INTEGER}, acct_level = #{acctLevel,jdbcType=INTEGER}, direction = #{direction,jdbcType=INTEGER}, is_leaf = #{isLeaf,jdbcType=BIT}, rule_type = #{ruleType,jdbcType=INTEGER}, is_active = #{isActive,jdbcType=BIT}, english_name = #{englishName,jdbcType=VARCHAR}, industry_id = #{industryId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.StandardAccountExample" 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 standard_account <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>