|
|
@@ -1,5 +1,8 @@
|
|
|
package com.uas.search.console.b2b.service.impl;
|
|
|
|
|
|
+import java.net.Inet4Address;
|
|
|
+import java.net.UnknownHostException;
|
|
|
+
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -107,8 +110,14 @@ public class RealTimeUpdateMonitorServiceImpl implements RealTimeUpdateMonitorSe
|
|
|
* 发送警告短信
|
|
|
*/
|
|
|
private void sendWarnSms() {
|
|
|
+ String message = "B2B实时更新服务出现问题,正在自动重启实时更新服务";
|
|
|
+ try {
|
|
|
+ message += ",来自" + Inet4Address.getLocalHost().toString();
|
|
|
+ } catch (UnknownHostException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
smsService.sendAll(systemProperties.getSmsTemplateId(), systemProperties.getSmsReceivers(),
|
|
|
- new Object[] { "B2B实时更新服务出现问题,正在自动重启实时更新服务" });
|
|
|
+ new Object[] { message });
|
|
|
}
|
|
|
|
|
|
}
|