From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能
---
java110-db/src/main/resources/mapper/user/MenuUserV1ServiceDaoImplMapper.xml | 196 ++++++++++++++++++++++--------------------------
1 files changed, 90 insertions(+), 106 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/MenuUserV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/MenuUserV1ServiceDaoImplMapper.xml
index fcf0c39..c7b6e3d 100644
--- a/java110-db/src/main/resources/mapper/user/MenuUserV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/MenuUserV1ServiceDaoImplMapper.xml
@@ -1,124 +1,108 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="menuUserV1ServiceDaoImpl">
-
-
-
-
<!-- 淇濆瓨鑷畾涔夎彍鍗曚俊鎭� add by wuxw 2018-07-03 -->
<insert id="saveMenuUserInfo" parameterType="Map">
- insert into m_menu_user(
-mu_id,name,icon,m_id,staff_id,url,seq
-) values (
-#{muId},#{name},#{icon},#{mId},#{staffId},#{url},#{seq}
-)
+ insert into m_menu_user(mu_id, name, icon, m_id, staff_id, url, seq)
+ values (#{muId}, #{name}, #{icon}, #{mId}, #{staffId}, #{url}, #{seq})
</insert>
-
-
<!-- 鏌ヨ鑷畾涔夎彍鍗曚俊鎭� add by wuxw 2018-07-03 -->
<select id="getMenuUserInfo" parameterType="Map" resultType="Map">
- select t.mu_id,t.mu_id muId,t.name,t.icon,t.m_id,t.m_id mId,t.status_cd,t.status_cd statusCd,t.staff_id,t.staff_id staffId,t.url,t.seq
-from m_menu_user t
-where 1 =1
-<if test="muId !=null and muId != ''">
- and t.mu_id= #{muId}
-</if>
-<if test="name !=null and name != ''">
- and t.name= #{name}
-</if>
-<if test="icon !=null and icon != ''">
- and t.icon= #{icon}
-</if>
-<if test="mId !=null and mId != ''">
- and t.m_id= #{mId}
-</if>
-<if test="statusCd !=null and statusCd != ''">
- and t.status_cd= #{statusCd}
-</if>
-<if test="staffId !=null and staffId != ''">
- and t.staff_id= #{staffId}
-</if>
-<if test="url !=null and url != ''">
- and t.url= #{url}
-</if>
-<if test="seq !=null and seq != ''">
- and t.seq= #{seq}
-</if>
-order by t.create_time desc
-<if test="page != -1 and page != null ">
- limit #{page}, #{row}
-</if>
-
+ select t.mu_id,t.mu_id muId,t.name,t.icon,t.m_id,t.m_id mId,t.status_cd,t.status_cd
+ statusCd,t.staff_id,t.staff_id staffId,t.url,t.seq
+ from m_menu_user t
+ where 1 =1
+ <if test="muId !=null and muId != ''">
+ and t.mu_id= #{muId}
+ </if>
+ <if test="name !=null and name != ''">
+ and t.name= #{name}
+ </if>
+ <if test="icon !=null and icon != ''">
+ and t.icon= #{icon}
+ </if>
+ <if test="mId !=null and mId != ''">
+ and t.m_id= #{mId}
+ </if>
+ <if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+ </if>
+ <if test="staffId !=null and staffId != ''">
+ and t.staff_id= #{staffId}
+ </if>
+ <if test="url !=null and url != ''">
+ and t.url= #{url}
+ </if>
+ <if test="seq !=null and seq != ''">
+ and t.seq= #{seq}
+ </if>
+ order by t.seq
+ <if test="page != -1 and page != null ">
+ limit #{page}, #{row}
+ </if>
</select>
-
-
-
<!-- 淇敼鑷畾涔夎彍鍗曚俊鎭� add by wuxw 2018-07-03 -->
<update id="updateMenuUserInfo" parameterType="Map">
- update m_menu_user t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if>
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if>
-<if test="icon !=null and icon != ''">
-, t.icon= #{icon}
-</if>
-<if test="mId !=null and mId != ''">
-, t.m_id= #{mId}
-</if>
-<if test="staffId !=null and staffId != ''">
-, t.staff_id= #{staffId}
-</if>
-<if test="url !=null and url != ''">
-, t.url= #{url}
-</if>
-<if test="seq !=null and seq != ''">
-, t.seq= #{seq}
-</if>
- where 1=1 <if test="muId !=null and muId != ''">
-and t.mu_id= #{muId}
-</if>
-
+ update m_menu_user t set t.status_cd = #{statusCd}
+ <if test="newBId != null and newBId != ''">
+ ,t.b_id = #{newBId}
+ </if>
+ <if test="name !=null and name != ''">
+ , t.name= #{name}
+ </if>
+ <if test="icon !=null and icon != ''">
+ , t.icon= #{icon}
+ </if>
+ <if test="mId !=null and mId != ''">
+ , t.m_id= #{mId}
+ </if>
+ <if test="staffId !=null and staffId != ''">
+ , t.staff_id= #{staffId}
+ </if>
+ <if test="url !=null and url != ''">
+ , t.url= #{url}
+ </if>
+ <if test="seq !=null and seq != ''">
+ , t.seq= #{seq}
+ </if>
+ where 1=1
+ <if test="muId !=null and muId != ''">
+ and t.mu_id= #{muId}
+ </if>
</update>
<!-- 鏌ヨ鑷畾涔夎彍鍗曟暟閲� add by wuxw 2018-07-03 -->
- <select id="queryMenuUsersCount" parameterType="Map" resultType="Map">
- select count(1) count
-from m_menu_user t
-where 1 =1
-<if test="muId !=null and muId != ''">
- and t.mu_id= #{muId}
-</if>
-<if test="name !=null and name != ''">
- and t.name= #{name}
-</if>
-<if test="icon !=null and icon != ''">
- and t.icon= #{icon}
-</if>
-<if test="mId !=null and mId != ''">
- and t.m_id= #{mId}
-</if>
-<if test="statusCd !=null and statusCd != ''">
- and t.status_cd= #{statusCd}
-</if>
-<if test="staffId !=null and staffId != ''">
- and t.staff_id= #{staffId}
-</if>
-<if test="url !=null and url != ''">
- and t.url= #{url}
-</if>
-<if test="seq !=null and seq != ''">
- and t.seq= #{seq}
-</if>
-
-
- </select>
-
+ <select id="queryMenuUsersCount" parameterType="Map" resultType="Map">
+ select count(1) count
+ from m_menu_user t
+ where 1 =1
+ <if test="muId !=null and muId != ''">
+ and t.mu_id= #{muId}
+ </if>
+ <if test="name !=null and name != ''">
+ and t.name= #{name}
+ </if>
+ <if test="icon !=null and icon != ''">
+ and t.icon= #{icon}
+ </if>
+ <if test="mId !=null and mId != ''">
+ and t.m_id= #{mId}
+ </if>
+ <if test="statusCd !=null and statusCd != ''">
+ and t.status_cd= #{statusCd}
+ </if>
+ <if test="staffId !=null and staffId != ''">
+ and t.staff_id= #{staffId}
+ </if>
+ <if test="url !=null and url != ''">
+ and t.url= #{url}
+ </if>
+ <if test="seq !=null and seq != ''">
+ and t.seq= #{seq}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.8.0