-- 快速检查数据库中是否有主播数据

-- 1. 检查有多少主播
SELECT '主播总数' as info, COUNT(*) as count FROM eb_user WHERE is_streamer = 1;

-- 2. 列出所有主播
SELECT uid, nickname, phone, is_streamer, streamer_level, streamer_certified_time 
FROM eb_user 
WHERE is_streamer = 1
LIMIT 10;

-- 3. 检查主播的统计数据
SELECT 
    u.uid,
    u.nickname,
    (SELECT COUNT(*) FROM eb_follow_record f WHERE f.followed_id = u.uid AND f.follow_status IN ('1', '关注') AND f.is_deleted = 0) as fansCount,
    (SELECT COUNT(*) FROM eb_live_room r WHERE r.uid = u.uid) as roomCount,
    (SELECT COALESCE(SUM(r.like_count), 0) FROM eb_live_room r WHERE r.uid = u.uid) as totalLikeCount
FROM eb_user u 
WHERE u.is_streamer = 1
LIMIT 10;
