写死菜单
This commit is contained in:
@@ -0,0 +1,239 @@
|
||||
<?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.cool.store.mapper.SysMenuMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.SysMenuDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
|
||||
<result column="code" jdbcType="VARCHAR" property="code"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias"/>
|
||||
<result column="path" jdbcType="VARCHAR" property="path"/>
|
||||
<result column="perms" jdbcType="VARCHAR" property="perms"/>
|
||||
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
||||
<result column="category" jdbcType="INTEGER" property="category"/>
|
||||
<result column="action" jdbcType="INTEGER" property="action"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="platform" jdbcType="VARCHAR" property="platform"/>
|
||||
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="target" jdbcType="VARCHAR" property="target"/>
|
||||
<result column="component" jdbcType="VARCHAR" property="component"/>
|
||||
<result column="icon" jdbcType="VARCHAR" property="icon"/>
|
||||
<result column="menu_type" jdbcType="TINYINT" property="menuType"/>
|
||||
<result column="env" jdbcType="VARCHAR" property="env"/>
|
||||
<result column="common_functions_icon" jdbcType="VARCHAR" property="commonFunctionsIcon"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, code, name, alias, path, perms, source, sort, category, action, remark,
|
||||
platform, is_deleted, type, target, component, icon, menu_type, env, common_functions_icon
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into sys_menu
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
path,
|
||||
</if>
|
||||
<if test="perms != null">
|
||||
perms,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort,
|
||||
</if>
|
||||
<if test="category != null">
|
||||
category,
|
||||
</if>
|
||||
<if test="action != null">
|
||||
action,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
platform,
|
||||
</if>
|
||||
<if test="isDeleted != null">
|
||||
is_deleted,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="target != null">
|
||||
target,
|
||||
</if>
|
||||
<if test="component != null">
|
||||
component,
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
icon,
|
||||
</if>
|
||||
<if test="menuType != null">
|
||||
menu_type,
|
||||
</if>
|
||||
<if test="env != null">
|
||||
env,
|
||||
</if>
|
||||
<if test="commonFunctionsIcon != null">
|
||||
common_functions_icon,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">
|
||||
#{parentId},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path},
|
||||
</if>
|
||||
<if test="perms != null">
|
||||
#{perms},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
#{sort},
|
||||
</if>
|
||||
<if test="category != null">
|
||||
#{category},
|
||||
</if>
|
||||
<if test="action != null">
|
||||
#{action},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
#{platform},
|
||||
</if>
|
||||
<if test="isDeleted != null">
|
||||
#{isDeleted},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type},
|
||||
</if>
|
||||
<if test="target != null">
|
||||
#{target},
|
||||
</if>
|
||||
<if test="component != null">
|
||||
#{component},
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
#{icon},
|
||||
</if>
|
||||
<if test="menuType != null">
|
||||
#{menuType},
|
||||
</if>
|
||||
<if test="env != null">
|
||||
#{env},
|
||||
</if>
|
||||
<if test="commonFunctionsIcon != null">
|
||||
#{commonFunctionsIcon},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update sys_menu
|
||||
<set>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
path = #{path},
|
||||
</if>
|
||||
<if test="perms != null">
|
||||
perms = #{perms},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source},
|
||||
</if>
|
||||
<if test="sort != null">
|
||||
sort = #{sort},
|
||||
</if>
|
||||
<if test="category != null">
|
||||
category = #{category},
|
||||
</if>
|
||||
<if test="action != null">
|
||||
action = #{action},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
<if test="platform != null">
|
||||
platform = #{platform},
|
||||
</if>
|
||||
<if test="isDeleted != null">
|
||||
is_deleted = #{isDeleted},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type},
|
||||
</if>
|
||||
<if test="target != null">
|
||||
target = #{target},
|
||||
</if>
|
||||
<if test="component != null">
|
||||
component = #{component},
|
||||
</if>
|
||||
<if test="icon != null">
|
||||
icon = #{icon},
|
||||
</if>
|
||||
<if test="menuType != null">
|
||||
menu_type = #{menuType},
|
||||
</if>
|
||||
<if test="env != null">
|
||||
env = #{env},
|
||||
</if>
|
||||
<if test="commonFunctionsIcon != null">
|
||||
common_functions_icon = #{commonFunctionsIcon},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectMenuAll" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
sys_menu
|
||||
where
|
||||
platform=#{platformType}
|
||||
<if test="list!=null and list.size>0">
|
||||
and parent_id in
|
||||
<foreach collection="list" item="parentId" open="(" close=")" separator=",">
|
||||
#{parentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user