From 7b43c04dd530bdd193e0cf02c4e19ba7c2ee2c11 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期三, 11 五月 2022 10:41:31 +0800
Subject: [PATCH] 设备归属
---
dao/src/main/resources/mapper/MenuMapper.xml | 61 ++++++++++++++++++++++++------
1 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/dao/src/main/resources/mapper/MenuMapper.xml b/dao/src/main/resources/mapper/MenuMapper.xml
index 443eab1..c00f974 100644
--- a/dao/src/main/resources/mapper/MenuMapper.xml
+++ b/dao/src/main/resources/mapper/MenuMapper.xml
@@ -5,19 +5,19 @@
<mapper namespace="com.sandu.ximon.dao.mapper.MenuMapper">
<resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.Menu">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="title" column="title" jdbcType="VARCHAR"/>
- <result property="pid" column="pid" jdbcType="BIGINT"/>
- <result property="seq" column="seq" jdbcType="INTEGER"/>
- <result property="icon" column="icon" jdbcType="VARCHAR"/>
- <result property="path" column="path" jdbcType="VARCHAR"/>
- <result property="hidden" column="hidden" jdbcType="BOOLEAN"/>
- <result property="component" column="component" jdbcType="VARCHAR"/>
- <result property="routerName" column="router_name" jdbcType="VARCHAR"/>
- <result property="permission" column="permission" jdbcType="VARCHAR"/>
- <result property="type" column="type" jdbcType="INTEGER"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+ <id property="id" column="id" jdbcType="BIGINT"/>
+ <result property="title" column="title" jdbcType="VARCHAR"/>
+ <result property="pid" column="pid" jdbcType="BIGINT"/>
+ <result property="seq" column="seq" jdbcType="INTEGER"/>
+ <result property="icon" column="icon" jdbcType="VARCHAR"/>
+ <result property="path" column="path" jdbcType="VARCHAR"/>
+ <result property="hidden" column="hidden" jdbcType="BOOLEAN"/>
+ <result property="component" column="component" jdbcType="VARCHAR"/>
+ <result property="routerName" column="router_name" jdbcType="VARCHAR"/>
+ <result property="permission" column="permission" jdbcType="VARCHAR"/>
+ <result property="type" column="type" jdbcType="INTEGER"/>
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
@@ -27,4 +27,39 @@
permission,type,create_time,
update_time
</sql>
+ <select id="listMenu" resultType="java.lang.Long">
+ SELECT id FROM menu
+ </select>
+
+ <select id="listMenuIfBinding" resultType="java.lang.Long">
+ SELECT t1.id
+ FROM menu t1
+ LEFT JOIN role_menu_relation t2 ON t1.id = t2.menu_id
+ <where>
+ t2.menu_id = #{id}
+ </where>
+ </select>
+ <select id="listMenuIfBinding1" resultType="java.lang.Long" parameterType="java.lang.Long">
+ SELECT t1.id
+ FROM menu t1
+ <where>
+ t1.pid = #{id}
+ </where>
+
+ </select>
+
+ <select id="listMenuById" resultType="com.sandu.ximon.dao.domain.Menu">
+ SELECT
+ *
+ FROM
+ menu t1
+ <where>
+ t1.id IN
+ <foreach collection="menuIdList" open="(" close=")" item="id" separator=",">
+ #{id}
+ </foreach>
+ </where>
+ ORDER BY t1.seq ASC
+
+ </select>
</mapper>
--
Gitblit v1.9.3