From 466ee3bc7c7bccf1e74ba46289900e24e6784d7b Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Wed, 17 Mar 2021 11:49:41 +0800
Subject: [PATCH] common模块: 添加常量枚举
---
screen-manage/src/main/resources/mapper/ManageMenuMapper.xml | 75 +++++++++++++++++++++++++++++++++++++
1 files changed, 75 insertions(+), 0 deletions(-)
diff --git a/screen-manage/src/main/resources/mapper/ManageMenuMapper.xml b/screen-manage/src/main/resources/mapper/ManageMenuMapper.xml
index c1b2261..33dfcee 100644
--- a/screen-manage/src/main/resources/mapper/ManageMenuMapper.xml
+++ b/screen-manage/src/main/resources/mapper/ManageMenuMapper.xml
@@ -89,4 +89,79 @@
mm.`parent_id`=0;
</select>
+ <select id="getManageMenuByName" resultMap="BaseResultMap">
+ select * from manage_menu
+ where name = #{name}
+ and is_delete = 0
+ </select>
+
+ <select id="getManageMenuById" resultMap="BaseResultMap">
+ select * from manage_menu
+ where id = #{id}
+ and is_delete = 0
+ </select>
+
+ <insert id="insertOne" parameterType="java.util.Map">
+ INSERT INTO manage_menu
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="name != null">
+ name,
+ </if>
+ <if test="url != null">
+ url,
+ </if>
+ <if test="icon != null">
+ icon,
+ </if>
+ <if test="parent_id != null">
+ parent_id,
+ </if>
+ <if test="order != null">
+ `order`,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="name != null">
+ #{name},
+ </if>
+ <if test="url != null">
+ #{url},
+ </if>
+ <if test="icon != null">
+ #{icon},
+ </if>
+ <if test="parent_id != null">
+ #{parent_id},
+ </if>
+ <if test="order != null">
+ #{order},
+ </if>
+ </trim>
+ </insert>
+
+ <update id="updateManageMenuById" parameterType="java.util.Map">
+ update manage_menu
+ <set>
+ <if test="name != null">
+ name = #{name},
+ </if>
+ <if test="url != null">
+ url = #{url},
+ </if>
+ <if test="icon != null">
+ icon = #{icon},
+ </if>
+ <if test="parent_id != null">
+ parent_id = #{parent_id},
+ </if>
+ <if test="order != null">
+ `order` = #{order},
+ </if>
+ <if test="is_delete != null">
+ is_delete = #{is_delete},
+ </if>
+ </set>
+ where id = #{id}
+ </update>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0