避免人脸抓怕也提前出现24年

develop
Angel 11 months ago
parent 6fea4ca252
commit d57a26ab20

@ -53,8 +53,22 @@ public class TStrhEntityInfoKsTask {
TransitUserRecord one = transitUserRecordService.getOne(queryWrapper); TransitUserRecord one = transitUserRecordService.getOne(queryWrapper);
Date partitionField = one.getPartitionField(); Date partitionField = one.getPartitionField();
maxTime = dateFormat.format(partitionField); maxTime = dateFormat.format(partitionField);
//将maxTime转换为Date对象
Date maxDate = dateFormat.parse(maxTime);
//计算2天后的日期
Calendar calendar = Calendar.getInstance();
calendar.setTime(maxDate);
calendar.add(Calendar.DAY_OF_MONTH, 2);
Date twoDaysAgo = calendar.getTime();
LambdaQueryWrapper<TStrhEntityInfoKs> Wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TStrhEntityInfoKs> Wrapper = Wrappers.lambdaQuery();
Wrapper.gt(TStrhEntityInfoKs::getCapturetime, maxTime); Wrapper.gt(TStrhEntityInfoKs::getCapturetime, maxTime);
Wrapper.le(TStrhEntityInfoKs::getCapturetime, twoDaysAgo);
int countTStrh = tStrhEntityInfoKsService.count(Wrapper); int countTStrh = tStrhEntityInfoKsService.count(Wrapper);
if (countTStrh > 0) { if (countTStrh > 0) {
int count = countTStrh / 1000; int count = countTStrh / 1000;

Loading…
Cancel
Save