优化定时刷新上麦时间逻辑fixed
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user