<?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.KeyValueReferenceMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.KeyValueReference"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <id column="id" jdbcType="VARCHAR" property="id" /> <result column="key_value_config_id" jdbcType="VARCHAR" property="keyValueConfigId" /> <result column="scope" jdbcType="INTEGER" property="scope" /> <result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" /> <result column="model_id" jdbcType="VARCHAR" property="modelId" /> <result column="organization_id" jdbcType="VARCHAR" property="organizationId" /> <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, key_value_config_id, scope, cell_template_id, model_id, organization_id, industry_id </sql> <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" 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 key_value_reference <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 key_value_reference 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 key_value_reference where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from key_value_reference <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.entity.KeyValueReference"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into key_value_reference (id, key_value_config_id, scope, cell_template_id, model_id, organization_id, industry_id) values (#{id,jdbcType=VARCHAR}, #{keyValueConfigId,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER}, #{cellTemplateId,jdbcType=BIGINT}, #{modelId,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.KeyValueReference"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into key_value_reference <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="keyValueConfigId != null"> key_value_config_id, </if> <if test="scope != null"> scope, </if> <if test="cellTemplateId != null"> cell_template_id, </if> <if test="modelId != null"> model_id, </if> <if test="organizationId != null"> organization_id, </if> <if test="industryId != null"> industry_id, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="keyValueConfigId != null"> #{keyValueConfigId,jdbcType=VARCHAR}, </if> <if test="scope != null"> #{scope,jdbcType=INTEGER}, </if> <if test="cellTemplateId != null"> #{cellTemplateId,jdbcType=BIGINT}, </if> <if test="modelId != null"> #{modelId,jdbcType=VARCHAR}, </if> <if test="organizationId != null"> #{organizationId,jdbcType=VARCHAR}, </if> <if test="industryId != null"> #{industryId,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from key_value_reference <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 key_value_reference <set> <if test="record.id != null"> id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.keyValueConfigId != null"> key_value_config_id = #{record.keyValueConfigId,jdbcType=VARCHAR}, </if> <if test="record.scope != null"> scope = #{record.scope,jdbcType=INTEGER}, </if> <if test="record.cellTemplateId != null"> cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT}, </if> <if test="record.modelId != null"> model_id = #{record.modelId,jdbcType=VARCHAR}, </if> <if test="record.organizationId != null"> organization_id = #{record.organizationId,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 key_value_reference set id = #{record.id,jdbcType=VARCHAR}, key_value_config_id = #{record.keyValueConfigId,jdbcType=VARCHAR}, scope = #{record.scope,jdbcType=INTEGER}, cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT}, model_id = #{record.modelId,jdbcType=VARCHAR}, organization_id = #{record.organizationId,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.KeyValueReference"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update key_value_reference <set> <if test="keyValueConfigId != null"> key_value_config_id = #{keyValueConfigId,jdbcType=VARCHAR}, </if> <if test="scope != null"> scope = #{scope,jdbcType=INTEGER}, </if> <if test="cellTemplateId != null"> cell_template_id = #{cellTemplateId,jdbcType=BIGINT}, </if> <if test="modelId != null"> model_id = #{modelId,jdbcType=VARCHAR}, </if> <if test="organizationId != null"> organization_id = #{organizationId,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.KeyValueReference"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update key_value_reference set key_value_config_id = #{keyValueConfigId,jdbcType=VARCHAR}, scope = #{scope,jdbcType=INTEGER}, cell_template_id = #{cellTemplateId,jdbcType=BIGINT}, model_id = #{modelId,jdbcType=VARCHAR}, organization_id = #{organizationId,jdbcType=VARCHAR}, industry_id = #{industryId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.KeyValueReferenceExample" 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 key_value_reference <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>