mapper.HfcfgComponentTemplateMapper.xml Maven / Gradle / Ivy
The newest version!
<?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="com.hframe.dao.HfcfgComponentTemplateMapper" > <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfcfgComponentTemplate" > <constructor > <idArg column="hfcfg_component_template_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="creator_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="hfcfg_component_template_code" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="modifier_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="hfcfg_component_template_type" jdbcType="TINYINT" javaType="java.lang.Byte" /> <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date" /> <arg column="hfcfg_component_template_desc" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="modify_time" jdbcType="TIMESTAMP" javaType="java.util.Date" /> <arg column="hfcfg_component_template_name" jdbcType="VARCHAR" javaType="java.lang.String" /> </constructor> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > hfcfg_component_template_id, creator_id, hfcfg_component_template_code, modifier_id, hfcfg_component_template_type, create_time, hfcfg_component_template_desc, modify_time, hfcfg_component_template_name </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfcfgComponentTemplate_Example" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from hfcfg_component_template <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> <if test="limitEnd != null and limitEnd != 0" > limit #{limitStart} , #{limitEnd} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > select <include refid="Base_Column_List" /> from hfcfg_component_template where hfcfg_component_template_id = #{hfcfgComponentTemplateId,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > delete from hfcfg_component_template where hfcfg_component_template_id = #{hfcfgComponentTemplateId,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfcfgComponentTemplate_Example" > delete from hfcfg_component_template <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.hframe.domain.model.HfcfgComponentTemplate" > <selectKey resultType="java.lang.Long" keyProperty="hfcfgComponentTemplateId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfcfg_component_template (creator_id, hfcfg_component_template_code, modifier_id, hfcfg_component_template_type, create_time, hfcfg_component_template_desc, modify_time, hfcfg_component_template_name ) values (#{creatorId,jdbcType=BIGINT}, #{hfcfgComponentTemplateCode,jdbcType=VARCHAR}, #{modifierId,jdbcType=BIGINT}, #{hfcfgComponentTemplateType,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, #{hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{hfcfgComponentTemplateName,jdbcType=VARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.hframe.domain.model.HfcfgComponentTemplate" > <selectKey resultType="java.lang.Long" keyProperty="hfcfgComponentTemplateId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfcfg_component_template <trim prefix="(" suffix=")" suffixOverrides="," > <if test="creatorId != null" > creator_id, </if> <if test="hfcfgComponentTemplateCode != null" > hfcfg_component_template_code, </if> <if test="modifierId != null" > modifier_id, </if> <if test="hfcfgComponentTemplateType != null" > hfcfg_component_template_type, </if> <if test="createTime != null" > create_time, </if> <if test="hfcfgComponentTemplateDesc != null" > hfcfg_component_template_desc, </if> <if test="modifyTime != null" > modify_time, </if> <if test="hfcfgComponentTemplateName != null" > hfcfg_component_template_name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="creatorId != null" > #{creatorId,jdbcType=BIGINT}, </if> <if test="hfcfgComponentTemplateCode != null" > #{hfcfgComponentTemplateCode,jdbcType=VARCHAR}, </if> <if test="modifierId != null" > #{modifierId,jdbcType=BIGINT}, </if> <if test="hfcfgComponentTemplateType != null" > #{hfcfgComponentTemplateType,jdbcType=TINYINT}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="hfcfgComponentTemplateDesc != null" > #{hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="hfcfgComponentTemplateName != null" > #{hfcfgComponentTemplateName,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.hframe.domain.model.HfcfgComponentTemplate_Example" resultType="java.lang.Integer" > select count(*) from hfcfg_component_template <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update hfcfg_component_template <set > <if test="record.hfcfgComponentTemplateId != null" > hfcfg_component_template_id = #{record.hfcfgComponentTemplateId,jdbcType=BIGINT}, </if> <if test="record.creatorId != null" > creator_id = #{record.creatorId,jdbcType=BIGINT}, </if> <if test="record.hfcfgComponentTemplateCode != null" > hfcfg_component_template_code = #{record.hfcfgComponentTemplateCode,jdbcType=VARCHAR}, </if> <if test="record.modifierId != null" > modifier_id = #{record.modifierId,jdbcType=BIGINT}, </if> <if test="record.hfcfgComponentTemplateType != null" > hfcfg_component_template_type = #{record.hfcfgComponentTemplateType,jdbcType=TINYINT}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.hfcfgComponentTemplateDesc != null" > hfcfg_component_template_desc = #{record.hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, </if> <if test="record.modifyTime != null" > modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, </if> <if test="record.hfcfgComponentTemplateName != null" > hfcfg_component_template_name = #{record.hfcfgComponentTemplateName,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update hfcfg_component_template set hfcfg_component_template_id = #{record.hfcfgComponentTemplateId,jdbcType=BIGINT}, creator_id = #{record.creatorId,jdbcType=BIGINT}, hfcfg_component_template_code = #{record.hfcfgComponentTemplateCode,jdbcType=VARCHAR}, modifier_id = #{record.modifierId,jdbcType=BIGINT}, hfcfg_component_template_type = #{record.hfcfgComponentTemplateType,jdbcType=TINYINT}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, hfcfg_component_template_desc = #{record.hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, hfcfg_component_template_name = #{record.hfcfgComponentTemplateName,jdbcType=VARCHAR} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.hframe.domain.model.HfcfgComponentTemplate" > update hfcfg_component_template <set > <if test="creatorId != null" > creator_id = #{creatorId,jdbcType=BIGINT}, </if> <if test="hfcfgComponentTemplateCode != null" > hfcfg_component_template_code = #{hfcfgComponentTemplateCode,jdbcType=VARCHAR}, </if> <if test="modifierId != null" > modifier_id = #{modifierId,jdbcType=BIGINT}, </if> <if test="hfcfgComponentTemplateType != null" > hfcfg_component_template_type = #{hfcfgComponentTemplateType,jdbcType=TINYINT}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="hfcfgComponentTemplateDesc != null" > hfcfg_component_template_desc = #{hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="hfcfgComponentTemplateName != null" > hfcfg_component_template_name = #{hfcfgComponentTemplateName,jdbcType=VARCHAR}, </if> </set> where hfcfg_component_template_id = #{hfcfgComponentTemplateId,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfcfgComponentTemplate" > update hfcfg_component_template set creator_id = #{creatorId,jdbcType=BIGINT}, hfcfg_component_template_code = #{hfcfgComponentTemplateCode,jdbcType=VARCHAR}, modifier_id = #{modifierId,jdbcType=BIGINT}, hfcfg_component_template_type = #{hfcfgComponentTemplateType,jdbcType=TINYINT}, create_time = #{createTime,jdbcType=TIMESTAMP}, hfcfg_component_template_desc = #{hfcfgComponentTemplateDesc,jdbcType=VARCHAR}, modify_time = #{modifyTime,jdbcType=TIMESTAMP}, hfcfg_component_template_name = #{hfcfgComponentTemplateName,jdbcType=VARCHAR} where hfcfg_component_template_id = #{hfcfgComponentTemplateId,jdbcType=BIGINT} </update> </mapper>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy