<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.citygis.web.mapper.TabKafkalogMapper">

    <select id="getKafkaLogList" resultType="com.citygis.web.domain.TabKafkalog"
            parameterType="com.citygis.web.domain.TabKafkalog">
        SELECT tabName,MAX(time) time, SUM(CAST(receiveCount as int)) num
        FROM tab_kafkaLog
        <where>
            <if test="tabName != null">
                tabName like concat('%',#{tabName},'%')
            </if>
        </where>
        group by tabName
    </select>

</mapper>
