|
|
@@ -67,6 +67,9 @@ public class PlatformNotifyServiceImpl implements PlatformNotifyService {
|
|
|
@Value("${kym.notify-email}")
|
|
|
private String notifyEmail;
|
|
|
|
|
|
+ @Value("${kym.notify-email-switch}")
|
|
|
+ private boolean notifyEmailSwitch;
|
|
|
+
|
|
|
public PlatformNotifyServiceImpl(ChargeOrderService chargeOrderService, ChargeService chargeService,
|
|
|
AccountService accountService, WalletDetailService walletDetailService,
|
|
|
MonitorLogService monitorLogService, EquipmentInfoService equipmentInfoService,
|
|
|
@@ -157,7 +160,7 @@ public class PlatformNotifyServiceImpl implements PlatformNotifyService {
|
|
|
.set(MonitorLog::getRecoverTime, LocalDateTime.now()).set(MonitorLog::getIsRecover, MonitorLog.IS_RECOVER_已恢复) // 设置为已恢复
|
|
|
.update();
|
|
|
}
|
|
|
- if (exist != null && exist > 0) {
|
|
|
+ if (exist != null && exist > 0 && notifyEmailSwitch) {
|
|
|
MailUtil.send(notifyEmail, "【设备上线通知】", "站点:%s,设备%s恢复上线".formatted(KymCache.INSTANCE.getStationNameByConnectorId(connectorStatusInfo.getConnectorId()), KymCache.INSTANCE.getShortIdByEquipmentIdOrConnectorId(connectorStatusInfo.getConnectorId())), false);
|
|
|
}
|
|
|
}
|