mapper.HfmdEnumMapper.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.HfmdEnumMapper" > <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfmdEnum" > <constructor > <idArg column="hfmd_enum_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="hfmd_enum_value" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfmd_enum_text" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfmd_enum_desc" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="is_default" jdbcType="INTEGER" javaType="java.lang.Integer" /> <arg column="pri" jdbcType="DECIMAL" javaType="java.math.BigDecimal" /> <arg column="ext1" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="ext2" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfmd_enum_class_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="hfmd_enum_class_code" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfpm_program_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="op_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date" /> <arg column="modify_op_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="modify_time" jdbcType="TIMESTAMP" javaType="java.util.Date" /> <arg column="del_flag" jdbcType="INTEGER" javaType="java.lang.Integer" /> </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" > hfmd_enum_id, hfmd_enum_value, hfmd_enum_text, hfmd_enum_desc, is_default, pri, ext1, ext2, hfmd_enum_class_id, hfmd_enum_class_code, hfpm_program_id, op_id, create_time, modify_op_id, modify_time, del_flag </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfmdEnum_Example" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from hfmd_enum <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 hfmd_enum where hfmd_enum_id = #{hfmdEnumId,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > delete from hfmd_enum where hfmd_enum_id = #{hfmdEnumId,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfmdEnum_Example" > delete from hfmd_enum <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.hframe.domain.model.HfmdEnum" > <selectKey resultType="java.lang.Long" keyProperty="hfmdEnumId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfmd_enum (hfmd_enum_value, hfmd_enum_text, hfmd_enum_desc, is_default, pri, ext1, ext2, hfmd_enum_class_id, hfmd_enum_class_code, hfpm_program_id, op_id, create_time, modify_op_id, modify_time, del_flag ) values (#{hfmdEnumValue,jdbcType=VARCHAR}, #{hfmdEnumText,jdbcType=VARCHAR}, #{hfmdEnumDesc,jdbcType=VARCHAR}, #{isDefault,jdbcType=INTEGER}, #{pri,jdbcType=DECIMAL}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{hfmdEnumClassId,jdbcType=VARCHAR}, #{hfmdEnumClassCode,jdbcType=VARCHAR}, #{hfpmProgramId,jdbcType=BIGINT}, #{opId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{modifyOpId,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER} ) </insert> <insert id="insertSelective" parameterType="com.hframe.domain.model.HfmdEnum" > <selectKey resultType="java.lang.Long" keyProperty="hfmdEnumId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfmd_enum <trim prefix="(" suffix=")" suffixOverrides="," > <if test="hfmdEnumValue != null" > hfmd_enum_value, </if> <if test="hfmdEnumText != null" > hfmd_enum_text, </if> <if test="hfmdEnumDesc != null" > hfmd_enum_desc, </if> <if test="isDefault != null" > is_default, </if> <if test="pri != null" > pri, </if> <if test="ext1 != null" > ext1, </if> <if test="ext2 != null" > ext2, </if> <if test="hfmdEnumClassId != null" > hfmd_enum_class_id, </if> <if test="hfmdEnumClassCode != null" > hfmd_enum_class_code, </if> <if test="hfpmProgramId != null" > hfpm_program_id, </if> <if test="opId != null" > op_id, </if> <if test="createTime != null" > create_time, </if> <if test="modifyOpId != null" > modify_op_id, </if> <if test="modifyTime != null" > modify_time, </if> <if test="delFlag != null" > del_flag, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="hfmdEnumValue != null" > #{hfmdEnumValue,jdbcType=VARCHAR}, </if> <if test="hfmdEnumText != null" > #{hfmdEnumText,jdbcType=VARCHAR}, </if> <if test="hfmdEnumDesc != null" > #{hfmdEnumDesc,jdbcType=VARCHAR}, </if> <if test="isDefault != null" > #{isDefault,jdbcType=INTEGER}, </if> <if test="pri != null" > #{pri,jdbcType=DECIMAL}, </if> <if test="ext1 != null" > #{ext1,jdbcType=VARCHAR}, </if> <if test="ext2 != null" > #{ext2,jdbcType=VARCHAR}, </if> <if test="hfmdEnumClassId != null" > #{hfmdEnumClassId,jdbcType=VARCHAR}, </if> <if test="hfmdEnumClassCode != null" > #{hfmdEnumClassCode,jdbcType=VARCHAR}, </if> <if test="hfpmProgramId != null" > #{hfpmProgramId,jdbcType=BIGINT}, </if> <if test="opId != null" > #{opId,jdbcType=BIGINT}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifyOpId != null" > #{modifyOpId,jdbcType=BIGINT}, </if> <if test="modifyTime != null" > #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="delFlag != null" > #{delFlag,jdbcType=INTEGER}, </if> </trim> </insert> <select id="countByExample" parameterType="com.hframe.domain.model.HfmdEnum_Example" resultType="java.lang.Integer" > select count(*) from hfmd_enum <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update hfmd_enum <set > <if test="record.hfmdEnumId != null" > hfmd_enum_id = #{record.hfmdEnumId,jdbcType=BIGINT}, </if> <if test="record.hfmdEnumValue != null" > hfmd_enum_value = #{record.hfmdEnumValue,jdbcType=VARCHAR}, </if> <if test="record.hfmdEnumText != null" > hfmd_enum_text = #{record.hfmdEnumText,jdbcType=VARCHAR}, </if> <if test="record.hfmdEnumDesc != null" > hfmd_enum_desc = #{record.hfmdEnumDesc,jdbcType=VARCHAR}, </if> <if test="record.isDefault != null" > is_default = #{record.isDefault,jdbcType=INTEGER}, </if> <if test="record.pri != null" > pri = #{record.pri,jdbcType=DECIMAL}, </if> <if test="record.ext1 != null" > ext1 = #{record.ext1,jdbcType=VARCHAR}, </if> <if test="record.ext2 != null" > ext2 = #{record.ext2,jdbcType=VARCHAR}, </if> <if test="record.hfmdEnumClassId != null" > hfmd_enum_class_id = #{record.hfmdEnumClassId,jdbcType=BIGINT}, </if> <if test="record.hfmdEnumClassCode != null" > hfmd_enum_class_code = #{record.hfmdEnumClassCode,jdbcType=VARCHAR}, </if> <if test="record.hfpmProgramId != null" > hfpm_program_id = #{record.hfpmProgramId,jdbcType=BIGINT}, </if> <if test="record.opId != null" > op_id = #{record.opId,jdbcType=BIGINT}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.modifyOpId != null" > modify_op_id = #{record.modifyOpId,jdbcType=BIGINT}, </if> <if test="record.modifyTime != null" > modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, </if> <if test="record.delFlag != null" > del_flag = #{record.delFlag,jdbcType=INTEGER}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update hfmd_enum set hfmd_enum_id = #{record.hfmdEnumId,jdbcType=BIGINT}, hfmd_enum_value = #{record.hfmdEnumValue,jdbcType=VARCHAR}, hfmd_enum_text = #{record.hfmdEnumText,jdbcType=VARCHAR}, hfmd_enum_desc = #{record.hfmdEnumDesc,jdbcType=VARCHAR}, is_default = #{record.isDefault,jdbcType=INTEGER}, pri = #{record.pri,jdbcType=DECIMAL}, ext1 = #{record.ext1,jdbcType=VARCHAR}, ext2 = #{record.ext2,jdbcType=VARCHAR}, hfmd_enum_class_id = #{record.hfmdEnumClassId,jdbcType=BIGINT}, hfmd_enum_class_code = #{record.hfmdEnumClassCode,jdbcType=VARCHAR}, hfpm_program_id = #{record.hfpmProgramId,jdbcType=BIGINT}, op_id = #{record.opId,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, modify_op_id = #{record.modifyOpId,jdbcType=BIGINT}, modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, del_flag = #{record.delFlag,jdbcType=INTEGER} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.hframe.domain.model.HfmdEnum" > update hfmd_enum <set > <if test="hfmdEnumValue != null" > hfmd_enum_value = #{hfmdEnumValue,jdbcType=VARCHAR}, </if> <if test="hfmdEnumText != null" > hfmd_enum_text = #{hfmdEnumText,jdbcType=VARCHAR}, </if> <if test="hfmdEnumDesc != null" > hfmd_enum_desc = #{hfmdEnumDesc,jdbcType=VARCHAR}, </if> <if test="isDefault != null" > is_default = #{isDefault,jdbcType=INTEGER}, </if> <if test="pri != null" > pri = #{pri,jdbcType=DECIMAL}, </if> <if test="ext1 != null" > ext1 = #{ext1,jdbcType=VARCHAR}, </if> <if test="ext2 != null" > ext2 = #{ext2,jdbcType=VARCHAR}, </if> <if test="hfmdEnumClassId != null" > hfmd_enum_class_id = #{hfmdEnumClassId,jdbcType=BIGINT}, </if> <if test="hfmdEnumClassCode != null" > hfmd_enum_class_code = #{hfmdEnumClassCode,jdbcType=VARCHAR}, </if> <if test="hfpmProgramId != null" > hfpm_program_id = #{hfpmProgramId,jdbcType=BIGINT}, </if> <if test="opId != null" > op_id = #{opId,jdbcType=BIGINT}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifyOpId != null" > modify_op_id = #{modifyOpId,jdbcType=BIGINT}, </if> <if test="modifyTime != null" > modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="delFlag != null" > del_flag = #{delFlag,jdbcType=INTEGER}, </if> </set> where hfmd_enum_id = #{hfmdEnumId,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfmdEnum" > update hfmd_enum set hfmd_enum_value = #{hfmdEnumValue,jdbcType=VARCHAR}, hfmd_enum_text = #{hfmdEnumText,jdbcType=VARCHAR}, hfmd_enum_desc = #{hfmdEnumDesc,jdbcType=VARCHAR}, is_default = #{isDefault,jdbcType=INTEGER}, pri = #{pri,jdbcType=DECIMAL}, ext1 = #{ext1,jdbcType=VARCHAR}, ext2 = #{ext2,jdbcType=VARCHAR}, hfmd_enum_class_id = #{hfmdEnumClassId,jdbcType=BIGINT}, hfmd_enum_class_code = #{hfmdEnumClassCode,jdbcType=VARCHAR}, hfpm_program_id = #{hfpmProgramId,jdbcType=BIGINT}, op_id = #{opId,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=TIMESTAMP}, modify_op_id = #{modifyOpId,jdbcType=BIGINT}, modify_time = #{modifyTime,jdbcType=TIMESTAMP}, del_flag = #{delFlag,jdbcType=INTEGER} where hfmd_enum_id = #{hfmdEnumId,jdbcType=BIGINT} </update> </mapper>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy