feat:自动处理邮箱邮件监控时间单位
This commit is contained in:
parent
fc978d459e
commit
ebf8958f60
|
@ -147,8 +147,10 @@ public class EmailJob extends Monitor{
|
|||
int res = 1;
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateConstant.DATE_TIME);
|
||||
LocalDateTime minusHours = LocalDateTime.now().minusHours(undealHours);
|
||||
LocalDateTime minusMinutes = LocalDateTime.now().minusMinutes(undealHours);
|
||||
String hoursAgo = minusHours.format(formatter);
|
||||
Boolean result = getAlarmClient().hoursAgo(emailId, hoursAgo);
|
||||
String minutesAgo = minusMinutes.format(formatter);
|
||||
Boolean result = getAlarmClient().hoursAgo(emailId, minutesAgo);
|
||||
if (ObjectUtil.isNotNull(result) && result)
|
||||
res = 0;
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user