lidongdong
2024-09-06 9861bc7b7699ef4216a427672fd7bb55ccf79cbc
花城 修改双报道个人服务统计时常次数不正确
1个文件已修改
34 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -590,9 +590,37 @@
            left join sys_user su on canc.solve_id = su.user_id  where order_type = 2 AND canc.is_del = 2 and solve_status = 4
                and su.phone = #{phone} and canc.order_time between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59'))
            union all
                (select duration as hours,caas.user_id as checkId from com_act_activity caa LEFT JOIN com_act_act_regist caas on caa.id = caas.activity_id
                left join sys_user su on caas.user_id = su.user_id where caas.sign_identity = 2 and caas.end_time is not null and su.phone =#{phone}
                and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59') group by caa.id)) t1
                (select ROUND((TIMESTAMPDIFF(SECOND, caas.start_time, caas.end_time) / 3600), 2) as hours,caas.user_id as checkId
                from com_act_activity caa LEFT JOIN com_act_act_regist caas on caa.id = caas.activity_id
                left join sys_user su on caas.user_id = su.user_id
                where caas.sign_identity = 2
                    and caas.end_time is not null and su.phone =#{phone}
                    and publish_at between concat(#{date},'-01-01 00:00:00') and concat(#{date},'-12-31 23:59:59')
                    and caas.start_time IS NOT NULL
                    and caas.end_time IS NOT NULL
                group by caa.id)
            <if test="checkUnitId != null and checkUnitId!='' ">
                UNION ALL
                (SELECT
                ROUND((TIMESTAMPDIFF(SECOND, s.start_time, s.end_time) / 3600), 2) as hours,
                a.id AS checkId
                FROM
                com_act_activity a
                LEFT JOIN com_act_act_regist s ON a.id = s.activity_id
                LEFT JOIN sys_user su ON su.user_id = s.user_id
                WHERE
                s.end_time IS NOT NULL
                AND s.check_unit_id = #{checkUnitId}
                AND su.phone = #{phone}
                AND s.start_time BETWEEN concat( #{date}, '-01-01 00:00:00' )
                AND concat( #{date}, '-12-31 23:59:59' )
                and s.start_time IS NOT NULL
                and s.end_time IS NOT NULL
                GROUP BY
                a.id)
            </if>
            ) t1
    </select>
    <select id="selectListByPhone" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO">