优化定时刷新上麦时间逻辑fixed

This commit is contained in:
2025-09-05 17:53:16 +08:00
parent 6aec5657e6
commit ddaa15e7f5

View File

@@ -377,7 +377,7 @@ public class GuildMemberRoomMicRecordService extends ServiceImpl<GuildMemberRoom
return;
}
Long maxUpTime = lastUpMic.get();
if (maxUpTime == null || maxUpTime < timeInMillis) {
if (maxUpTime == null) {
micRecordMap.remove(uid);
return;
}
@@ -396,7 +396,9 @@ public class GuildMemberRoomMicRecordService extends ServiceImpl<GuildMemberRoom
}
long splitMinutes = (timeInMillis - maxUpTime)/1000/60;
Integer addMinutes = splitMinutes > 5 ? 5 : (int) splitMinutes;
guildPolicy2Service.updateDayMicStatistics(cycleDate, statDate, guildMember, addMinutes);
if (addMinutes > 0) {
guildPolicy2Service.updateDayMicStatistics(cycleDate, statDate, guildMember, addMinutes);
}
} catch (Exception e) {
log.error("statMicRecordTask uid {} roomId {} pos {} timeInMillis {}", uid, roomId, pos, timeInMillis, e);
} finally {