-- 更新签到记录测试数据
-- 确保 eb_user_signin_record 表数据正确

-- 更新现有记录的 continuous_days 字段（随机1-7天）
UPDATE eb_user_signin_record 
SET continuous_days = FLOOR(1 + RAND() * 7)
WHERE continuous_days IS NULL OR continuous_days = 0;

-- 确保 reward_value 有值（根据连续天数计算）
UPDATE eb_user_signin_record 
SET reward_value = continuous_days * 10
WHERE reward_value IS NULL OR reward_value = 0;

-- 查看更新后的数据
SELECT r.*, u.avatar as user_avatar, u.nickname as db_nickname
FROM eb_user_signin_record r
LEFT JOIN eb_user u ON r.uid = u.uid
ORDER BY r.id DESC
LIMIT 20;
