<?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.ruoyi.benyun.mapper.AttentionPoolStatisticsDao">
    <resultMap type="com.ruoyi.benyun.entity.AttentionPoolStatistics" id="StatisticsResult">
        <result property="statId" column="stat_id"/>
        <result property="attentionCount" column="attention_count"/>
        <result property="clueCount" column="clue_count"/>
        <result property="onlineCount" column="online_count"/>
        <result property="offlineCount" column="offline_count"/>
        <result property="userId" column="user_id"/>
        <result property="statTime" column="stat_time"/>
    </resultMap>
    <select id="searchAllByUserId" resultMap="StatisticsResult">
        select * from `bl_attention_pool_statistics`
        <where>
            <if test="userId != null">
                user_id = #{userId}
            </if>
        </where>
    </select>
</mapper>
