101captain
2022-08-18 cb7ba7879d92ed53b5c97ab64c130fc489eb8bc0
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">