From d31920a1233ab14cdd5e33756bb1b0e3ed235e66 Mon Sep 17 00:00:00 2001
From: 1098226878 <1098226878@qq.com>
Date: 星期三, 08 九月 2021 12:39:48 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

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

diff --git a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index d0aafa3..0d4d9b2
--- a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -7,18 +7,17 @@
     <!-- 淇濆瓨灏忓尯淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessCommunityInfo" parameterType="Map">
         insert into business_community(community_id,b_id,name,address,city_code,
-        nearby_landmarks,map_x,map_y,month,state,operate,community_area)
+        nearby_landmarks,map_x,map_y,month,state,operate,community_area,tel)
         values(#{communityId},#{bId},#{name},#{address},#{cityCode},
-        #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea})
+        #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea},#{tel})
     </insert>
 
-    <!-- 淇濆瓨灏忓尯淇℃伅 -->
-    <insert id="saveCommunity" parameterType="Map">
-        insert into s_community(community_id,b_id,name,address,city_code,
-        nearby_landmarks,map_x,map_y,create_time,state,tel,community_area)
-        values(#{communityId},#{bId},#{name},#{address},#{cityCode},
-        #{nearbyLandmarks},#{mapX},#{mapY},#{createTime},#{state},#{tel},#{communityArea})
+    <!-- 淇濆瓨灏忓尯灞炴�т俊鎭�  add by wuxw 2018-07-03 -->
+    <insert id="saveCommunityAttr" parameterType="Map">
+        insert into s_community_attr(b_id,attr_id,community_id,spec_cd,value,month,status_cd)
+        values(#{bId},#{attrId},#{communityId},#{specCd},#{value},#{month},#{statusCd})
     </insert>
+
 
     <!-- 淇濆瓨灏忓尯灞炴�т俊鎭�  add by wuxw 2018-07-03 -->
     <insert id="saveBusinessCommunityAttr" parameterType="Map">
@@ -36,7 +35,7 @@
     <!-- 鏌ヨ灏忓尯淇℃伅锛圔usiness锛� add by wuxw 2018-07-03 -->
     <select id="getBusinessCommunityInfo" parameterType="Map" resultType="Map">
         select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks,
-        s.map_x,s.map_y,s.operate,s.state,s.community_area communityArea,s.community_area
+        s.map_x,s.map_y,s.operate,s.state,s.community_area communityArea,s.community_area,s.tel
         from business_community s where 1 = 1
         <if test="operate != null and operate != ''">
             and s.operate = #{operate}
@@ -85,8 +84,8 @@
     <!-- 淇濆瓨灏忓尯淇℃伅鑷� 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,state,community_area)
-        values(#{community_id},#{b_id},#{name},#{address},#{city_code},#{nearby_landmarks},#{map_x},#{map_y},'0',#{state},#{communityArea})
+        s_community(community_id,b_id,name,address,city_code,nearby_landmarks,map_x,map_y,status_cd,state,community_area,tel)
+        values(#{community_id},#{b_id},#{name},#{address},#{city_code},#{nearby_landmarks},#{map_x},#{map_y},'0',#{state},#{communityArea},#{tel})
     </insert>
 
     <!-- 淇濆瓨灏忓尯灞炴�т俊鎭埌 instance add by wuxw 2018-07-03 -->
@@ -149,6 +148,12 @@
         <if test="communityId != null and communityId !=''">
             and sa.community_id = #{communityId}
         </if>
+        <if test="specCd != null and specCd !=''">
+            and sa.spec_cd = #{specCd}
+        </if>
+        <if test="value != null and value !=''">
+            and sa.value = #{value}
+        </if>
         <if test="communityIds != null ">
             and sa.community_id in
             <foreach collection="communityIds" item="item" index="index" open="(" close=")" separator=",">
@@ -203,7 +208,9 @@
         <if test="state != null and state != ''">
             ,s.state = #{state}
         </if>
-        ,s.tel = #{tel}
+        <if test="tel != null and tel != ''">
+            ,s.tel = #{tel}
+        </if>
         <if test="communityArea != null and communityArea != ''">
             ,s.community_area = #{communityArea}
         </if>
@@ -464,7 +471,7 @@
     <!-- 鏌ヨ灏忓尯淇℃伅 add by wuxw 2018-07-03 -->
     <select id="getCommunityInfoNew" parameterType="Map" resultType="Map">
         select t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks,
-        t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,
+        t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,t.tel,
         t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY,
         t.map_x,t.map_x mapX,t.state,(CASE
         WHEN t.state='1000'
@@ -534,9 +541,11 @@
             </foreach>
         </if>
         group by t.community_id
+        order by t.create_time ASC
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
+
     </select>
 
 

--
Gitblit v1.8.0