From c2614ad5c7d1e27fae68e52cd058af363464cdb4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 21 五月 2022 23:16:38 +0800
Subject: [PATCH] 优化代码

---
 java110-db/src/main/resources/mapper/user/MenuGroupCommunityV1ServiceDaoImplMapper.xml |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/user/MenuGroupCommunityV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/MenuGroupCommunityV1ServiceDaoImplMapper.xml
index 331b69f..36020b4 100644
--- a/java110-db/src/main/resources/mapper/user/MenuGroupCommunityV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/MenuGroupCommunityV1ServiceDaoImplMapper.xml
@@ -16,9 +16,9 @@
     <insert id="saveMenuGroupCommunitys" parameterType="Map">
         insert into m_menu_group_community(
         g_id,gc_id,name,community_name,community_id
-        )
+        ) values
         <foreach collection="menuGroupCommunityPos" item="item" separator=",">
-            (#{item.gId},'0',#{item.gcId},#{item.name},#{item.communityName},#{item.communityId})
+            (#{item.gId},#{item.gcId},#{item.name},#{item.communityName},#{item.communityId})
         </foreach>
     </insert>
 
@@ -71,13 +71,14 @@
         <if test="communityName !=null and communityName != ''">
             , t.community_name= #{communityName}
         </if>
-        <if test="communityId !=null and communityId != ''">
-            , t.community_id= #{communityId}
-        </if>
+
         where 1=1
         <if test="gcId !=null and gcId != ''">
             and t.gc_id= #{gcId}
         </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
     </update>
 

--
Gitblit v1.8.0