springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -3504,6 +3504,22 @@ realUserList.add(vo); } realUserVO.setRealUserList(realUserList); //使用索引迭代避免从列表移除数据后出现空指针异常 if (type.equals(BYSTREET) || type.equals(ALLCOMMUNITY)){ for (int i = 0; i <= realUserList.size() ; i++) { RealUserAnalysisVO realUserAnalysisVO = realUserList.get(i); if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(realUserAnalysisVO)){ if (StringUtils.isNotEmpty(realUserAnalysisVO.getName())){ if (realUserAnalysisVO.getName().equals("请选择社区")){ realUserList.remove(realUserAnalysisVO); } } } } }else { //只保留十条 realUserList.remove(10); } return R.ok(realUserVO); } springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -581,6 +581,7 @@ <if test="type == 4"> <if test="streetId != null"> and cs.street_id=#{streetId} and su.community_id<>11 group by su.community_id </if> </if> @@ -591,6 +592,7 @@ group by cs.street_id </if> <if test="type == 3"> and su.community_id<>11 group by su.community_id </if> order by user desc @@ -626,7 +628,7 @@ group by su.community_id </if> order by count desc limit 10 limit 11 </select> <select id="streetUserCount" resultType="Integer"> select count(user_id) from sys_user as su