Parcourir la source

处理查询重复数据问题

java110 il y a 6 ans
Parent
commit
04bb0bfb6f

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

@@ -339,6 +339,7 @@
         <if test="communityName != null and communityName != '' and needCommunityInfo == true">
             and sc.name like concat('%',#{communityName},'%')
         </if>
+        group by ms.community_id
         order by ms.create_time desc
         <if test="page != -1 and page != null">
             limit #{page},#{row}
@@ -424,6 +425,7 @@
         <if test="communityName != null and communityName != '' and needCommunityInfo == true">
             and sc.name like concat('%',#{communityName},'%')
         </if>
+        group by ms.community_id
     </select>
 
     <!-- 查询小区信息 add by wuxw 2018-07-03 -->