mapper.HfsecMenuMapper.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.HfsecMenuMapper" > <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfsecMenu" > <constructor > <idArg column="hfsec_menu_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="hfsec_menu_code" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfsec_menu_name" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="hfsec_menu_desc" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="menu_level" jdbcType="INTEGER" javaType="java.lang.Integer" /> <arg column="icon" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="url" jdbcType="VARCHAR" javaType="java.lang.String" /> <arg column="parent_hfsec_menu_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="pri" jdbcType="DECIMAL" javaType="java.math.BigDecimal" /> <arg column="creator_id" jdbcType="BIGINT" javaType="java.lang.Long" /> <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date" /> <arg column="modifier_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" > hfsec_menu_id, hfsec_menu_code, hfsec_menu_name, hfsec_menu_desc, menu_level, icon, url, parent_hfsec_menu_id, pri, creator_id, create_time, modifier_id, modify_time, del_flag </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfsecMenu_Example" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from hfsec_menu <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 hfsec_menu where hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > delete from hfsec_menu where hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT} </delete> <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfsecMenu_Example" > delete from hfsec_menu <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.hframe.domain.model.HfsecMenu" > <selectKey resultType="java.lang.Long" keyProperty="hfsecMenuId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfsec_menu (hfsec_menu_code, hfsec_menu_name, hfsec_menu_desc, menu_level, icon, url, parent_hfsec_menu_id, pri, creator_id, create_time, modifier_id, modify_time, del_flag) values (#{hfsecMenuCode,jdbcType=VARCHAR}, #{hfsecMenuName,jdbcType=VARCHAR}, #{hfsecMenuDesc,jdbcType=VARCHAR}, #{menuLevel,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{parentHfsecMenuId,jdbcType=BIGINT}, #{pri,jdbcType=DECIMAL}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{modifierId,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}) </insert> <insert id="insertSelective" parameterType="com.hframe.domain.model.HfsecMenu" > <selectKey resultType="java.lang.Long" keyProperty="hfsecMenuId" order="AFTER" > SELECT LAST_INSERT_ID() </selectKey> insert into hfsec_menu <trim prefix="(" suffix=")" suffixOverrides="," > <if test="hfsecMenuCode != null" > hfsec_menu_code, </if> <if test="hfsecMenuName != null" > hfsec_menu_name, </if> <if test="hfsecMenuDesc != null" > hfsec_menu_desc, </if> <if test="menuLevel != null" > menu_level, </if> <if test="icon != null" > icon, </if> <if test="url != null" > url, </if> <if test="parentHfsecMenuId != null" > parent_hfsec_menu_id, </if> <if test="pri != null" > pri, </if> <if test="creatorId != null" > creator_id, </if> <if test="createTime != null" > create_time, </if> <if test="modifierId != null" > modifier_id, </if> <if test="modifyTime != null" > modify_time, </if> <if test="delFlag != null" > del_flag, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="hfsecMenuCode != null" > #{hfsecMenuCode,jdbcType=VARCHAR}, </if> <if test="hfsecMenuName != null" > #{hfsecMenuName,jdbcType=VARCHAR}, </if> <if test="hfsecMenuDesc != null" > #{hfsecMenuDesc,jdbcType=VARCHAR}, </if> <if test="menuLevel != null" > #{menuLevel,jdbcType=INTEGER}, </if> <if test="icon != null" > #{icon,jdbcType=VARCHAR}, </if> <if test="url != null" > #{url,jdbcType=VARCHAR}, </if> <if test="parentHfsecMenuId != null" > #{parentHfsecMenuId,jdbcType=BIGINT}, </if> <if test="pri != null" > #{pri,jdbcType=DECIMAL}, </if> <if test="creatorId != null" > #{creatorId,jdbcType=BIGINT}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifierId != null" > #{modifierId,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.HfsecMenu_Example" resultType="java.lang.Integer" > select count(*) from hfsec_menu <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update hfsec_menu <set > <if test="record.hfsecMenuId != null" > hfsec_menu_id = #{record.hfsecMenuId,jdbcType=BIGINT}, </if> <if test="record.hfsecMenuCode != null" > hfsec_menu_code = #{record.hfsecMenuCode,jdbcType=VARCHAR}, </if> <if test="record.hfsecMenuName != null" > hfsec_menu_name = #{record.hfsecMenuName,jdbcType=VARCHAR}, </if> <if test="record.hfsecMenuDesc != null" > hfsec_menu_desc = #{record.hfsecMenuDesc,jdbcType=VARCHAR}, </if> <if test="record.menuLevel != null" > menu_level = #{record.menuLevel,jdbcType=INTEGER}, </if> <if test="record.icon != null" > icon = #{record.icon,jdbcType=VARCHAR}, </if> <if test="record.url != null" > url = #{record.url,jdbcType=VARCHAR}, </if> <if test="record.parentHfsecMenuId != null" > parent_hfsec_menu_id = #{record.parentHfsecMenuId,jdbcType=BIGINT}, </if> <if test="record.pri != null" > pri = #{record.pri,jdbcType=DECIMAL}, </if> <if test="record.creatorId != null" > creator_id = #{record.creatorId,jdbcType=BIGINT}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.modifierId != null" > modifier_id = #{record.modifierId,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 hfsec_menu set hfsec_menu_id = #{record.hfsecMenuId,jdbcType=BIGINT}, hfsec_menu_code = #{record.hfsecMenuCode,jdbcType=VARCHAR}, hfsec_menu_name = #{record.hfsecMenuName,jdbcType=VARCHAR}, hfsec_menu_desc = #{record.hfsecMenuDesc,jdbcType=VARCHAR}, menu_level = #{record.menuLevel,jdbcType=INTEGER}, icon = #{record.icon,jdbcType=VARCHAR}, url = #{record.url,jdbcType=VARCHAR}, parent_hfsec_menu_id = #{record.parentHfsecMenuId,jdbcType=BIGINT}, pri = #{record.pri,jdbcType=DECIMAL}, creator_id = #{record.creatorId,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, modifier_id = #{record.modifierId,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.HfsecMenu" > update hfsec_menu <set > <if test="hfsecMenuCode != null" > hfsec_menu_code = #{hfsecMenuCode,jdbcType=VARCHAR}, </if> <if test="hfsecMenuName != null" > hfsec_menu_name = #{hfsecMenuName,jdbcType=VARCHAR}, </if> <if test="hfsecMenuDesc != null" > hfsec_menu_desc = #{hfsecMenuDesc,jdbcType=VARCHAR}, </if> <if test="menuLevel != null" > menu_level = #{menuLevel,jdbcType=INTEGER}, </if> <if test="icon != null" > icon = #{icon,jdbcType=VARCHAR}, </if> <if test="url != null" > url = #{url,jdbcType=VARCHAR}, </if> <if test="parentHfsecMenuId != null" > parent_hfsec_menu_id = #{parentHfsecMenuId,jdbcType=BIGINT}, </if> <if test="pri != null" > pri = #{pri,jdbcType=DECIMAL}, </if> <if test="creatorId != null" > creator_id = #{creatorId,jdbcType=BIGINT}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="modifierId != null" > modifier_id = #{modifierId,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 hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT} </update> <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfsecMenu" > update hfsec_menu set hfsec_menu_code = #{hfsecMenuCode,jdbcType=VARCHAR}, hfsec_menu_name = #{hfsecMenuName,jdbcType=VARCHAR}, hfsec_menu_desc = #{hfsecMenuDesc,jdbcType=VARCHAR}, menu_level = #{menuLevel,jdbcType=INTEGER}, icon = #{icon,jdbcType=VARCHAR}, url = #{url,jdbcType=VARCHAR}, parent_hfsec_menu_id = #{parentHfsecMenuId,jdbcType=BIGINT}, pri = #{pri,jdbcType=DECIMAL}, creator_id = #{creatorId,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=TIMESTAMP}, modifier_id = #{modifierId,jdbcType=BIGINT}, modify_time = #{modifyTime,jdbcType=TIMESTAMP}, del_flag = #{delFlag,jdbcType=INTEGER} where hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT} </update> </mapper>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy