258 lines
8.9 KiB
XML
258 lines
8.9 KiB
XML
<?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.chaozhanggui.system.cashierservice.dao.SysMenuMapper">
|
|
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysMenu">
|
|
<id column="menu_id" jdbcType="BIGINT" property="menuId" />
|
|
<result column="pid" jdbcType="BIGINT" property="pid" />
|
|
<result column="sub_count" jdbcType="INTEGER" property="subCount" />
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="component" jdbcType="VARCHAR" property="component" />
|
|
<result column="menu_sort" jdbcType="INTEGER" property="menuSort" />
|
|
<result column="icon" jdbcType="VARCHAR" property="icon" />
|
|
<result column="path" jdbcType="VARCHAR" property="path" />
|
|
<result column="i_frame" jdbcType="BIT" property="iFrame" />
|
|
<result column="cache" jdbcType="BIT" property="cache" />
|
|
<result column="hidden" jdbcType="BIT" property="hidden" />
|
|
<result column="permission" jdbcType="VARCHAR" property="permission" />
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="active_menu" jdbcType="VARCHAR" property="activeMenu" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
menu_id, pid, sub_count, type, title, name, component, menu_sort, icon, path, i_frame,
|
|
cache, hidden, permission, create_by, update_by, create_time, update_time, active_menu
|
|
</sql>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from sys_menu
|
|
where menu_id = #{menuId,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from sys_menu
|
|
where menu_id = #{menuId,jdbcType=BIGINT}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
|
|
insert into sys_menu (menu_id, pid, sub_count,
|
|
type, title, name,
|
|
component, menu_sort, icon,
|
|
path, i_frame, cache, hidden,
|
|
permission, create_by, update_by,
|
|
create_time, update_time, active_menu
|
|
)
|
|
values (#{menuId,jdbcType=BIGINT}, #{pid,jdbcType=BIGINT}, #{subCount,jdbcType=INTEGER},
|
|
#{type,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
#{component,jdbcType=VARCHAR}, #{menuSort,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
|
|
#{path,jdbcType=VARCHAR}, #{iFrame,jdbcType=BIT}, #{cache,jdbcType=BIT}, #{hidden,jdbcType=BIT},
|
|
#{permission,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{activeMenu,jdbcType=VARCHAR}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
|
|
insert into sys_menu
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="menuId != null">
|
|
menu_id,
|
|
</if>
|
|
<if test="pid != null">
|
|
pid,
|
|
</if>
|
|
<if test="subCount != null">
|
|
sub_count,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="title != null">
|
|
title,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="component != null">
|
|
component,
|
|
</if>
|
|
<if test="menuSort != null">
|
|
menu_sort,
|
|
</if>
|
|
<if test="icon != null">
|
|
icon,
|
|
</if>
|
|
<if test="path != null">
|
|
path,
|
|
</if>
|
|
<if test="iFrame != null">
|
|
i_frame,
|
|
</if>
|
|
<if test="cache != null">
|
|
cache,
|
|
</if>
|
|
<if test="hidden != null">
|
|
hidden,
|
|
</if>
|
|
<if test="permission != null">
|
|
permission,
|
|
</if>
|
|
<if test="createBy != null">
|
|
create_by,
|
|
</if>
|
|
<if test="updateBy != null">
|
|
update_by,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="activeMenu != null">
|
|
active_menu,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="menuId != null">
|
|
#{menuId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="pid != null">
|
|
#{pid,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="subCount != null">
|
|
#{subCount,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="title != null">
|
|
#{title,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="component != null">
|
|
#{component,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="menuSort != null">
|
|
#{menuSort,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="icon != null">
|
|
#{icon,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="path != null">
|
|
#{path,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="iFrame != null">
|
|
#{iFrame,jdbcType=BIT},
|
|
</if>
|
|
<if test="cache != null">
|
|
#{cache,jdbcType=BIT},
|
|
</if>
|
|
<if test="hidden != null">
|
|
#{hidden,jdbcType=BIT},
|
|
</if>
|
|
<if test="permission != null">
|
|
#{permission,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createBy != null">
|
|
#{createBy,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateBy != null">
|
|
#{updateBy,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="activeMenu != null">
|
|
#{activeMenu,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
|
|
update sys_menu
|
|
<set>
|
|
<if test="pid != null">
|
|
pid = #{pid,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="subCount != null">
|
|
sub_count = #{subCount,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="title != null">
|
|
title = #{title,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="component != null">
|
|
component = #{component,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="menuSort != null">
|
|
menu_sort = #{menuSort,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="icon != null">
|
|
icon = #{icon,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="path != null">
|
|
path = #{path,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="iFrame != null">
|
|
i_frame = #{iFrame,jdbcType=BIT},
|
|
</if>
|
|
<if test="cache != null">
|
|
cache = #{cache,jdbcType=BIT},
|
|
</if>
|
|
<if test="hidden != null">
|
|
hidden = #{hidden,jdbcType=BIT},
|
|
</if>
|
|
<if test="permission != null">
|
|
permission = #{permission,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createBy != null">
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateBy != null">
|
|
update_by = #{updateBy,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="activeMenu != null">
|
|
active_menu = #{activeMenu,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where menu_id = #{menuId,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysMenu">
|
|
update sys_menu
|
|
set pid = #{pid,jdbcType=BIGINT},
|
|
sub_count = #{subCount,jdbcType=INTEGER},
|
|
type = #{type,jdbcType=INTEGER},
|
|
title = #{title,jdbcType=VARCHAR},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
component = #{component,jdbcType=VARCHAR},
|
|
menu_sort = #{menuSort,jdbcType=INTEGER},
|
|
icon = #{icon,jdbcType=VARCHAR},
|
|
path = #{path,jdbcType=VARCHAR},
|
|
i_frame = #{iFrame,jdbcType=BIT},
|
|
cache = #{cache,jdbcType=BIT},
|
|
hidden = #{hidden,jdbcType=BIT},
|
|
permission = #{permission,jdbcType=VARCHAR},
|
|
create_by = #{createBy,jdbcType=VARCHAR},
|
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
active_menu = #{activeMenu,jdbcType=VARCHAR}
|
|
where menu_id = #{menuId,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper> |