From 9592a96bc773354e93b048df7183cc6accfe5229 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期四, 16 五月 2019 00:27:21 +0800
Subject: [PATCH] 数据库分片未开发完成

---
 java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
index 207804c..2bbb03d 100644
--- a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -74,9 +74,7 @@
     <!-- 淇濆瓨灏忓尯淇℃伅鑷� instance琛ㄤ腑 add by wuxw 2018-07-03 -->
     <insert id="saveCommunityInfoInstance" parameterType="Map">
         insert into s_community(community_id,b_id,name,address,city_code,nearby_landmarks,map_x,map_y,status_cd)
-        select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks,s.map_x,s.map_y,'0'
-        from business_community s where 
-        s.operate = 'ADD' and s.b_id=#{bId}
+        values(#{community_id},#{b_id},#{name},#{address},#{city_code},#{nearby_landmarks},#{map_x},#{map_y},'0')
     </insert>
 
     <!-- 淇濆瓨灏忓尯灞炴�т俊鎭埌 instance add by wuxw 2018-07-03 -->
@@ -85,6 +83,9 @@
         select sa.b_id,sa.attr_id,sa.community_id,sa.spec_cd,sa.value,'0'
         from business_community_attr sa
         where sa.operate = 'ADD' and sa.b_id=#{bId}
+        <if test="communityId != null and communityId != ''">
+            and sa.community_id = #{communityId}
+        </if>
     </insert>
     
     <!-- 淇濆瓨 灏忓尯鐓х墖淇℃伅 instance add by wuxw 2018-07-03 -->
@@ -93,6 +94,9 @@
         select sp.community_photo_id,sp.b_id,sp.community_id,sp.community_photo_type_cd,sp.photo,'0'
         from business_community_photo sp
         where  sp.operate = 'ADD' and sp.b_id=#{bId}
+        <if test="communityId != null and communityId != ''">
+            and sp.community_id = #{communityId}
+        </if>
     </insert>
 
 
@@ -247,6 +251,9 @@
         select ms.community_member_id,ms.b_id,ms.community_id,ms.member_id,ms.member_type_cd,'0',ms.audit_status_cd
         from business_community_member ms where
         ms.operate = 'ADD' and ms.b_id=#{bId}
+        <if test="communityId != null and communityId != ''">
+            and ms.community_id = #{communityId}
+        </if>
     </insert>
 
     <!-- 鏌ヨ灏忓尯鎴愬憳 add by wuxw 2018-10-27 getBusinessCommunityMember-->

--
Gitblit v1.8.0