<?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.CellTemplateMapper"> <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.CellTemplate"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> <id column="id" jdbcType="BIGINT" property="id" /> <result column="report_template_id" jdbcType="BIGINT" property="reportTemplateId" /> <result column="row_index" jdbcType="INTEGER" property="rowIndex" /> <result column="row_name" jdbcType="VARCHAR" property="rowName" /> <result column="column_index" jdbcType="INTEGER" property="columnIndex" /> <result column="column_name" jdbcType="VARCHAR" property="columnName" /> <result column="comment" jdbcType="VARCHAR" property="comment" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="copy_from_id" jdbcType="BIGINT" property="copyFromId" /> <result column="data_type" jdbcType="INTEGER" property="dataType" /> <result column="is_read_only" jdbcType="BIT" property="isReadOnly" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> </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, report_template_id, row_index, row_name, column_index, column_name, comment, create_time, update_time, copy_from_id, data_type, is_read_only, create_by, update_by </sql> <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" 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 cell_template <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.Long" resultMap="BaseResultMap"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select <include refid="Base_Column_List" /> from cell_template where id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from cell_template where id = #{id,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from cell_template <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="pwc.taxtech.atms.entity.CellTemplate"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into cell_template (id, report_template_id, row_index, row_name, column_index, column_name, comment, create_time, update_time, copy_from_id, data_type, is_read_only, create_by, update_by) values (#{id,jdbcType=BIGINT}, #{reportTemplateId,jdbcType=BIGINT}, #{rowIndex,jdbcType=INTEGER}, #{rowName,jdbcType=VARCHAR}, #{columnIndex,jdbcType=INTEGER}, #{columnName,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{copyFromId,jdbcType=BIGINT}, #{dataType,jdbcType=INTEGER}, #{isReadOnly,jdbcType=BIT}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.CellTemplate"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> insert into cell_template <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="reportTemplateId != null"> report_template_id, </if> <if test="rowIndex != null"> row_index, </if> <if test="rowName != null"> row_name, </if> <if test="columnIndex != null"> column_index, </if> <if test="columnName != null"> column_name, </if> <if test="comment != null"> comment, </if> <if test="createTime != null"> create_time, </if> <if test="updateTime != null"> update_time, </if> <if test="copyFromId != null"> copy_from_id, </if> <if test="dataType != null"> data_type, </if> <if test="isReadOnly != null"> is_read_only, </if> <if test="createBy != null"> create_by, </if> <if test="updateBy != null"> update_by, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=BIGINT}, </if> <if test="reportTemplateId != null"> #{reportTemplateId,jdbcType=BIGINT}, </if> <if test="rowIndex != null"> #{rowIndex,jdbcType=INTEGER}, </if> <if test="rowName != null"> #{rowName,jdbcType=VARCHAR}, </if> <if test="columnIndex != null"> #{columnIndex,jdbcType=INTEGER}, </if> <if test="columnName != null"> #{columnName,jdbcType=VARCHAR}, </if> <if test="comment != null"> #{comment,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="copyFromId != null"> #{copyFromId,jdbcType=BIGINT}, </if> <if test="dataType != null"> #{dataType,jdbcType=INTEGER}, </if> <if test="isReadOnly != null"> #{isReadOnly,jdbcType=BIT}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" resultType="java.lang.Long"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> select count(*) from cell_template <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 cell_template <set> <if test="record.id != null"> id = #{record.id,jdbcType=BIGINT}, </if> <if test="record.reportTemplateId != null"> report_template_id = #{record.reportTemplateId,jdbcType=BIGINT}, </if> <if test="record.rowIndex != null"> row_index = #{record.rowIndex,jdbcType=INTEGER}, </if> <if test="record.rowName != null"> row_name = #{record.rowName,jdbcType=VARCHAR}, </if> <if test="record.columnIndex != null"> column_index = #{record.columnIndex,jdbcType=INTEGER}, </if> <if test="record.columnName != null"> column_name = #{record.columnName,jdbcType=VARCHAR}, </if> <if test="record.comment != null"> comment = #{record.comment,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateTime != null"> update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.copyFromId != null"> copy_from_id = #{record.copyFromId,jdbcType=BIGINT}, </if> <if test="record.dataType != null"> data_type = #{record.dataType,jdbcType=INTEGER}, </if> <if test="record.isReadOnly != null"> is_read_only = #{record.isReadOnly,jdbcType=BIT}, </if> <if test="record.createBy != null"> create_by = #{record.createBy,jdbcType=VARCHAR}, </if> <if test="record.updateBy != null"> update_by = #{record.updateBy,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 cell_template set id = #{record.id,jdbcType=BIGINT}, report_template_id = #{record.reportTemplateId,jdbcType=BIGINT}, row_index = #{record.rowIndex,jdbcType=INTEGER}, row_name = #{record.rowName,jdbcType=VARCHAR}, column_index = #{record.columnIndex,jdbcType=INTEGER}, column_name = #{record.columnName,jdbcType=VARCHAR}, comment = #{record.comment,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, copy_from_id = #{record.copyFromId,jdbcType=BIGINT}, data_type = #{record.dataType,jdbcType=INTEGER}, is_read_only = #{record.isReadOnly,jdbcType=BIT}, create_by = #{record.createBy,jdbcType=VARCHAR}, update_by = #{record.updateBy,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.CellTemplate"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update cell_template <set> <if test="reportTemplateId != null"> report_template_id = #{reportTemplateId,jdbcType=BIGINT}, </if> <if test="rowIndex != null"> row_index = #{rowIndex,jdbcType=INTEGER}, </if> <if test="rowName != null"> row_name = #{rowName,jdbcType=VARCHAR}, </if> <if test="columnIndex != null"> column_index = #{columnIndex,jdbcType=INTEGER}, </if> <if test="columnName != null"> column_name = #{columnName,jdbcType=VARCHAR}, </if> <if test="comment != null"> comment = #{comment,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="copyFromId != null"> copy_from_id = #{copyFromId,jdbcType=BIGINT}, </if> <if test="dataType != null"> data_type = #{dataType,jdbcType=INTEGER}, </if> <if test="isReadOnly != null"> is_read_only = #{isReadOnly,jdbcType=BIT}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> </set> where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.CellTemplate"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> update cell_template set report_template_id = #{reportTemplateId,jdbcType=BIGINT}, row_index = #{rowIndex,jdbcType=INTEGER}, row_name = #{rowName,jdbcType=VARCHAR}, column_index = #{columnIndex,jdbcType=INTEGER}, column_name = #{columnName,jdbcType=VARCHAR}, comment = #{comment,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, copy_from_id = #{copyFromId,jdbcType=BIGINT}, data_type = #{dataType,jdbcType=INTEGER}, is_read_only = #{isReadOnly,jdbcType=BIT}, create_by = #{createBy,jdbcType=VARCHAR}, update_by = #{updateBy,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} </update> <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.CellTemplateExample" 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 cell_template <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> </mapper>