<?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.FormulaConfigMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.FormulaConfig"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <id column="id" jdbcType="VARCHAR" property="id" /> <result column="formula_name" jdbcType="VARCHAR" property="formulaName" /> <result column="description" jdbcType="VARCHAR" property="description" /> <result column="calculate_status" jdbcType="INTEGER" property="calculateStatus" /> <result column="data_source_type" jdbcType="INTEGER" property="dataSourceType" /> <result column="data_source_name" jdbcType="VARCHAR" property="dataSourceName" /> <result column="chinese_name" jdbcType="VARCHAR" property="chineseName" /> <result column="english_name" jdbcType="VARCHAR" property="englishName" /> <result column="service_type" jdbcType="VARCHAR" property="serviceType" /> <result column="industry" jdbcType="VARCHAR" property="industry" /> <result column="required_param_num" jdbcType="INTEGER" property="requiredParamNum" /> </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, formula_name, description, calculate_status, data_source_type, data_source_name, chinese_name, english_name, service_type, industry, required_param_num </sql> <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.FormulaConfigExample" 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 formula_config <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 formula_config 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 formula_config where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.FormulaConfigExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from formula_config <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.entity.FormulaConfig"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into formula_config (id, formula_name, description, calculate_status, data_source_type, data_source_name, chinese_name, english_name, service_type, industry, required_param_num) values (#{id,jdbcType=VARCHAR}, #{formulaName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{calculateStatus,jdbcType=INTEGER}, #{dataSourceType,jdbcType=INTEGER}, #{dataSourceName,jdbcType=VARCHAR}, #{chineseName,jdbcType=VARCHAR}, #{englishName,jdbcType=VARCHAR}, #{serviceType,jdbcType=VARCHAR}, #{industry,jdbcType=VARCHAR}, #{requiredParamNum,jdbcType=INTEGER}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.FormulaConfig"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into formula_config <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="formulaName != null"> formula_name, </if> <if test="description != null"> description, </if> <if test="calculateStatus != null"> calculate_status, </if> <if test="dataSourceType != null"> data_source_type, </if> <if test="dataSourceName != null"> data_source_name, </if> <if test="chineseName != null"> chinese_name, </if> <if test="englishName != null"> english_name, </if> <if test="serviceType != null"> service_type, </if> <if test="industry != null"> industry, </if> <if test="requiredParamNum != null"> required_param_num, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="formulaName != null"> #{formulaName,jdbcType=VARCHAR}, </if> <if test="description != null"> #{description,jdbcType=VARCHAR}, </if> <if test="calculateStatus != null"> #{calculateStatus,jdbcType=INTEGER}, </if> <if test="dataSourceType != null"> #{dataSourceType,jdbcType=INTEGER}, </if> <if test="dataSourceName != null"> #{dataSourceName,jdbcType=VARCHAR}, </if> <if test="chineseName != null"> #{chineseName,jdbcType=VARCHAR}, </if> <if test="englishName != null"> #{englishName,jdbcType=VARCHAR}, </if> <if test="serviceType != null"> #{serviceType,jdbcType=VARCHAR}, </if> <if test="industry != null"> #{industry,jdbcType=VARCHAR}, </if> <if test="requiredParamNum != null"> #{requiredParamNum,jdbcType=INTEGER}, </if> </trim> </insert> <select id="countByExample" parameterType="pwc.taxtech.atms.entity.FormulaConfigExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from formula_config <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 formula_config <set> <if test="record.id != null"> id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.formulaName != null"> formula_name = #{record.formulaName,jdbcType=VARCHAR}, </if> <if test="record.description != null"> description = #{record.description,jdbcType=VARCHAR}, </if> <if test="record.calculateStatus != null"> calculate_status = #{record.calculateStatus,jdbcType=INTEGER}, </if> <if test="record.dataSourceType != null"> data_source_type = #{record.dataSourceType,jdbcType=INTEGER}, </if> <if test="record.dataSourceName != null"> data_source_name = #{record.dataSourceName,jdbcType=VARCHAR}, </if> <if test="record.chineseName != null"> chinese_name = #{record.chineseName,jdbcType=VARCHAR}, </if> <if test="record.englishName != null"> english_name = #{record.englishName,jdbcType=VARCHAR}, </if> <if test="record.serviceType != null"> service_type = #{record.serviceType,jdbcType=VARCHAR}, </if> <if test="record.industry != null"> industry = #{record.industry,jdbcType=VARCHAR}, </if> <if test="record.requiredParamNum != null"> required_param_num = #{record.requiredParamNum,jdbcType=INTEGER}, </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 formula_config set id = #{record.id,jdbcType=VARCHAR}, formula_name = #{record.formulaName,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR}, calculate_status = #{record.calculateStatus,jdbcType=INTEGER}, data_source_type = #{record.dataSourceType,jdbcType=INTEGER}, data_source_name = #{record.dataSourceName,jdbcType=VARCHAR}, chinese_name = #{record.chineseName,jdbcType=VARCHAR}, english_name = #{record.englishName,jdbcType=VARCHAR}, service_type = #{record.serviceType,jdbcType=VARCHAR}, industry = #{record.industry,jdbcType=VARCHAR}, required_param_num = #{record.requiredParamNum,jdbcType=INTEGER} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.FormulaConfig"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update formula_config <set> <if test="formulaName != null"> formula_name = #{formulaName,jdbcType=VARCHAR}, </if> <if test="description != null"> description = #{description,jdbcType=VARCHAR}, </if> <if test="calculateStatus != null"> calculate_status = #{calculateStatus,jdbcType=INTEGER}, </if> <if test="dataSourceType != null"> data_source_type = #{dataSourceType,jdbcType=INTEGER}, </if> <if test="dataSourceName != null"> data_source_name = #{dataSourceName,jdbcType=VARCHAR}, </if> <if test="chineseName != null"> chinese_name = #{chineseName,jdbcType=VARCHAR}, </if> <if test="englishName != null"> english_name = #{englishName,jdbcType=VARCHAR}, </if> <if test="serviceType != null"> service_type = #{serviceType,jdbcType=VARCHAR}, </if> <if test="industry != null"> industry = #{industry,jdbcType=VARCHAR}, </if> <if test="requiredParamNum != null"> required_param_num = #{requiredParamNum,jdbcType=INTEGER}, </if> </set> where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.FormulaConfig"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update formula_config set formula_name = #{formulaName,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, calculate_status = #{calculateStatus,jdbcType=INTEGER}, data_source_type = #{dataSourceType,jdbcType=INTEGER}, data_source_name = #{dataSourceName,jdbcType=VARCHAR}, chinese_name = #{chineseName,jdbcType=VARCHAR}, english_name = #{englishName,jdbcType=VARCHAR}, service_type = #{serviceType,jdbcType=VARCHAR}, industry = #{industry,jdbcType=VARCHAR}, required_param_num = #{requiredParamNum,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.FormulaConfigExample" 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 formula_config <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>