张天森
2022-07-08 5b6552d241b1d6c541fd1ceeab5594882b74f034
update
2个文件已修改
23 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -324,7 +324,7 @@
        left join com_pb_check_unit as cpcu on ca.community_id=cpcu.community_id
        where canc.solve_id<>''
        <if test="beginTime != null">
            and caa.create_at between #{beginTime} and #{endTime}
            and canc.create_at between #{beginTime} and #{endTime}
        </if>
        <if test="belongTo != null and belongTo != ''">
            and belong_to=#{belongTo}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -3374,8 +3374,8 @@
            vo.setActiveUserYMonth(activeUserYMonth);
            if (type.equals(BYSTREET) || type.equals(ALLCOMMUNITY) || type.equals(ALLSTREET)){
                //获取其他用户
                vo.setOtherUser(indexDataKanbanVO.getAllUser()-vo.getAllUser());
                vo.setOtherUserRate(getRate(indexDataKanbanVO.getAllUser(),vo.getAllUser()));
                vo.setOtherUser(indexDataKanbanVO.getAllUser()-countUser(vo.getUserProportionTotal()));
                vo.setOtherUserRate(getRate(indexDataKanbanVO.getAllUser(),vo.getOtherUser()));
            }
        return R.ok(vo);
    }
@@ -3451,4 +3451,21 @@
        return count;
    }
    /**
     * 计算当前统计范围内的所有用户数
     * */
    public Integer countUser(List<UserProportion> list){
        Integer count=0;
        if (list.size()>0){
            for (UserProportion proportion : list) {
                if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(proportion)){
                    if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(proportion.getUser())){
                        count+=proportion.getUser();
                    }
                }
            }
        }
        return count;
    }
}