1.清除日志,月份调整
This commit is contained in:
@@ -80,6 +80,8 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
||||
private final RedisUtil redisUtil;
|
||||
private final UserFeignClient userFeignClient;
|
||||
|
||||
@Value("${clear.num}")
|
||||
private Integer clearHistoryLog;
|
||||
@Override
|
||||
public Page<AuditLogVO> getAuditLog(AuditParam auditParam) {
|
||||
List<AuditLogVO> auditLogVOS = new ArrayList<>();
|
||||
@@ -318,7 +320,7 @@ public class AuditServiceImpl extends ServiceImpl<UserLogMapper, UserLog> implem
|
||||
@Override
|
||||
public void clearHistoryLog() {
|
||||
LocalDate nowDate = LocalDate.now();
|
||||
LocalDate agoDate = nowDate.minusMonths(6).with(TemporalAdjusters.firstDayOfMonth());
|
||||
LocalDate agoDate = nowDate.minusMonths(clearHistoryLog).with(TemporalAdjusters.firstDayOfMonth());
|
||||
String date = agoDate.format(DateTimeFormatter.ISO_LOCAL_DATE);
|
||||
|
||||
QueryWrapper<UserLog> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
@@ -59,5 +59,8 @@ runTake:
|
||||
#等待时间(毫秒)
|
||||
delayTime: 25000
|
||||
|
||||
#清除日志月份
|
||||
clear:
|
||||
num: 1
|
||||
mqtt:
|
||||
client-id: @artifactId@${random.value}
|
||||
|
||||
Reference in New Issue
Block a user