|
@@ -48,17 +48,15 @@ public class DayAlertProcess implements ClazzEqualsProcess {
|
|
}
|
|
}
|
|
|
|
|
|
// 构建消息
|
|
// 构建消息
|
|
- for (int i = 0; i < listReportInvokes.size(); i++) {
|
|
|
|
- NameReport invoke = listReportInvokes.get(i);
|
|
|
|
|
|
+ for (NameReport invoke : listReportInvokes) {
|
|
String reportContent = invoke.formatReport(date);
|
|
String reportContent = invoke.formatReport(date);
|
|
if (reportContent != null) {
|
|
if (reportContent != null) {
|
|
- allMdAlertContent.append(reportContent + MdConstants.newLine);
|
|
|
|
|
|
+ allMdAlertContent.append(reportContent).append(MdConstants.newLine);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// 发送消息
|
|
// 发送消息
|
|
- for (int i = 0; i < alertMsgList.size(); i++) {
|
|
|
|
- AlertReportMsg alertMsgProcess = alertMsgList.get(i);
|
|
|
|
|
|
+ for (AlertReportMsg alertMsgProcess : alertMsgList) {
|
|
boolean msgSend = alertMsgProcess.send(date, allMdAlertContent.toString());
|
|
boolean msgSend = alertMsgProcess.send(date, allMdAlertContent.toString());
|
|
logger.info("消息发送[" + alertMsgProcess.alertType() + "]结果:" + msgSend);
|
|
logger.info("消息发送[" + alertMsgProcess.alertType() + "]结果:" + msgSend);
|
|
}
|
|
}
|