From 9efb739152062fed7a1b073cbb0034d519283f2d Mon Sep 17 00:00:00 2001
From: mrzcc <121184950@qq.com>
Date: 星期三, 19 二月 2020 13:36:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 56 insertions(+), 4 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
index aa52be1..3bfa864 100644
--- a/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -315,8 +315,12 @@
         <if test="memberId != null and memberId != '' and needCommunityInfo == true">
             AND ms.`community_id` = msc.`community_id`
             and msc.member_id = #{memberId}
+            and msc.status_cd = '0'
         </if>
         <if test="memberId != null and memberId != '' and needCommunityInfo == false">
+            and ms.member_id = #{memberId}
+        </if>
+        <if test="subMemberId != null and subMemberId != ''">
             and ms.member_id = #{memberId}
         </if>
         <if test="noAuditEnterCommunity == true">
@@ -332,6 +336,10 @@
         <if test="communityId != null and communityId != ''">
             and ms.community_id = #{communityId}
         </if>
+        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
+            and sc.name like concat('%',#{communityName},'%')
+        </if>
+        order by ms.create_time desc
         <if test="page != -1 and page != null">
             limit #{page},#{row}
         </if>
@@ -383,8 +391,13 @@
         <if test="memberId != null and memberId != '' and needCommunityInfo == true">
             AND ms.`community_id` = msc.`community_id`
             and msc.member_id = #{memberId}
+            and msc.status_cd = '0'
         </if>
         <if test="memberId != null and memberId != '' and needCommunityInfo == false">
+            and ms.member_id = #{memberId}
+        </if>
+
+        <if test="subMemberId != null and subMemberId != ''">
             and ms.member_id = #{memberId}
         </if>
 
@@ -399,8 +412,17 @@
             and ms.audit_status_cd = #{auditStatusCd}
         </if>
 
+        <if test="auditStatusCds != null and auditStatusCds != null">
+            and ms.audit_status_cd in
+            <foreach collection="auditStatusCds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="communityId != null and communityId != ''">
             and ms.community_id = #{communityId}
+        </if>
+        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
+            and sc.name like concat('%',#{communityName},'%')
         </if>
     </select>
 
@@ -432,13 +454,19 @@
             and t.city_code= #{cityCode}
         </if>
         <if test="name !=null and name != ''">
-            and t.name= #{name}
+            and t.name like concat('%',#{name},'%')
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
+        </if>
+        <if test="communityIds !=null">
+            and t.community_id in
+            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
         </if>
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
@@ -456,6 +484,15 @@
             and cm.community_id = t.community_id
             and cm.member_id = #{memberId}
             and cm.status_cd = '0'
+        </if>
+        <if test="memberId !=null and memberId !='' and auditStatusCd != null and auditStatusCd !=''">
+            and cm.audit_status_cd = #{auditStatusCd}
+        </if>
+        <if test="notInCommunityId != null ">
+            and t.community_id not in
+            <foreach collection="notInCommunityId" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
         </if>
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -483,13 +520,19 @@
             and t.city_code= #{cityCode}
         </if>
         <if test="name !=null and name != ''">
-            and t.name= #{name}
+            and t.name like concat('%',#{name},'%')
         </if>
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
+        </if>
+        <if test="communityIds !=null">
+            and t.community_id in
+            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
         </if>
         <if test="bId !=null and bId != ''">
             and t.b_id= #{bId}
@@ -505,8 +548,17 @@
         </if>
         <if test="memberId !=null and memberId !=''">
             and cm.community_id = t.community_id
-                and cm.member_id = #{memberId}
-                and cm.status_cd = '0'
+            and cm.member_id = #{memberId}
+            and cm.status_cd = '0'
+        </if>
+        <if test="memberId !=null and memberId !='' and auditStatusCd != null and auditStatusCd !=''">
+            and cm.audit_status_cd = #{auditStatusCd}
+        </if>
+        <if test="notInCommunityId != null ">
+            and t.community_id not in
+            <foreach collection="notInCommunityId" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
         </if>
 
 

--
Gitblit v1.8.0