mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 16:06:36 +08:00
优化
This commit is contained in:
@@ -37,11 +37,11 @@ public class StatisticsFlowAsync {
|
||||
long time = new Date().getTime();
|
||||
|
||||
// 删除48小时前的数据
|
||||
long nowMs = System.currentTimeMillis();
|
||||
long nowMs = new Date().getTime();
|
||||
long cutoffMs = nowMs - 48L * 60 * 60 * 1000;
|
||||
statisticsFlowService.remove(
|
||||
new LambdaQueryWrapper<StatisticsFlow>()
|
||||
.lt(StatisticsFlow::getCreateTime, cutoffMs)
|
||||
.lt(StatisticsFlow::getCreatedTime, cutoffMs)
|
||||
);
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class StatisticsFlowAsync {
|
||||
statisticsFlow.setFlow(incrementFlow);
|
||||
statisticsFlow.setTotalFlow(currentTotalFlow);
|
||||
statisticsFlow.setTime(hourString);
|
||||
statisticsFlow.setCreateTime(time);
|
||||
statisticsFlow.setCreatedTime(time);
|
||||
|
||||
statisticsFlowList.add(statisticsFlow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user