zmc
2023-08-15 d95f78488e734c1defcad4af8b7e79c712937111
src/main/resources/com/job/zsc/mapper/AnalysisDataMapper.xml
@@ -120,21 +120,19 @@
    <!-- 去重-->
    <select id="search" resultType="Integer">
        select count(*) from fm_web_analysis_data
        select count(*)
        from fm_web_analysis_data as a join ea_t_device_info as b on a.fume_dev_id = b.DI_Code
        <where>
            <if test="shopname != null and shopname != '' ">
                fume_dev_id=(select fume_dev_id
                from shopname_data
                where shop_name like concat('%',#{shopname},'%'))
                a.fume_dev_id like concat('%',#{shopname},'%')
            </if>
            <if test="value != null and value != null">
                or shop_name like concat('%',#{value},'%')
                and b.DI_Name = #{value}
            </if>
            <if test="begin != null and end != null">
                and (fume_date between #{begin} and #{end})
                and a.fume_date between #{begin} and #{end}
            </if>
        </where>
        group by fume_dev_id
    </select>
</mapper>