101captain
2022-08-18 cb7ba7879d92ed53b5c97ab64c130fc489eb8bc0
bug修改
2个文件已修改
18 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -2928,9 +2928,9 @@
            page.setSize(20L);
        }
        if(dataKanBansDto.getType() != null && dataKanBansDto.getType().equals(DataKanBansDto.type.by)){
            dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(page, dataKanBansDto.getAreaCode()).getRecords();
            dataKanbanDTOS = userDao.selectCommunityUserOrderMonth(page, dataKanBansDto.getAppId()).getRecords();
        }else{
            dataKanbanDTOS = userDao.selectCommunityUserOrder(page, dataKanBansDto.getAreaCode()).getRecords();
            dataKanbanDTOS = userDao.selectCommunityUserOrder(page, dataKanBansDto.getAppId()).getRecords();
        }
        if (!ObjectUtils.isEmpty(dataKanbanDTOS)) {
            dataKanbanDTOS.forEach(dataKanbanDTO -> {
@@ -2943,7 +2943,7 @@
        List<Date> serverndays = com.panzhihua.common.utlis.DateUtils.getOldDays();
        serverndays.forEach(date -> {
            // 查询社区活动数量
            DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(dataKanBansDto.getAreaCode(),date);
            DataKanbanDTO dataKanbanDTO = userDao.selectCommunityAddUserOrder(dataKanBansDto.getAppId(),date);
            communityActiveUserX.add(DateFormatUtils.format(date, "MM-dd"));
            communityActiveUserY.add(dataKanbanDTO.getNum());
            communityActiveUserZ.add(dataKanbanDTO.getDayNum());
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml
@@ -135,8 +135,8 @@
            t1.dayNum
        FROM
            com_act a
                LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0
                left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1
                LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 and u.app_id=#{areaCode}
                left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1 and app_id=#{areaCode}
                                                                                       AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id GROUP BY a.community_id
    </select>
@@ -145,12 +145,12 @@
        SELECT
        a.`name`,
        COUNT(u.user_id)num,
        (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id
        (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id and app_id=#{areaCode}
        AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum
        FROM
        com_act a
        LEFT JOIN sys_user u ON a.community_id = u.community_id
        and u.type=1 and a.state=0 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day)
        and u.type=1 and a.state=0 and u.app_id=#{areaCode} and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day)
        GROUP BY a.community_id)t ORDER BY t.num desc
    </select>
@@ -203,12 +203,12 @@
    <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO">
        select count(user_id) as num,
        (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1
        (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t.app_id = #{areaCode}
        AND last_login_time <![CDATA[ >= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 00:00:00')
        AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su LEFT JOIN com_act t1 on su.community_id = t1.community_id
        where su.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY)
        and su.create_at <![CDATA[ <= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 23:59:59'),INTERVAL 0 DAY)
        and su.type = 1
        and su.type = 1 and su.app_id = #{areaCode}
    </select>
    <update id="gridMemberEditStatus">