소스 검색

优化小区查询代码

java110 5 년 전
부모
커밋
ae6e1826d9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml

+ 1 - 1
java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml

@@ -515,7 +515,7 @@
 
     <!-- 查询小区数量 add by wuxw 2018-07-03 -->
     <select id="queryCommunitysCount" parameterType="Map" resultType="Map">
-        select  count(1) count
+        select  count(DISTINCT(t.community_id)) count
         from s_community t,city_area ca
         <if test="memberId !=null and memberId !=''">
             ,s_community_member cm