This commit is contained in:
qaq
2025-08-15 12:57:56 +08:00
parent 6f80e26a8f
commit 23980578d7
5 changed files with 42 additions and 51 deletions
@@ -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);
}