记录发送的微信短信通知消息

This commit is contained in:
liuchengqian 2022-06-20 10:21:35 +08:00
parent 6a6302ff43
commit 963483d534

View File

@ -366,14 +366,18 @@ public class FirePointServiceImpl implements FirePointService {
}
}
if (weixinIdList.size() > 0) {
StringBuilder stringBuilder = new StringBuilder("发送微信消息通知:\n");
String messageContent = getMessageContent(firePointEntity);
for (String weixinId : weixinIdList) {
stringBuilder.append(weixinId).append("\n");
try {
WDWxSendMsgUtil.sendMsg(weixinId, messageContent, 0);
} catch (Exception e) {
e.printStackTrace();
}
}
stringBuilder.append("火情信息:").append(messageContent);
log.info(stringBuilder.toString());
}
}
@ -448,6 +452,12 @@ public class FirePointServiceImpl implements FirePointService {
if (telephoneList.size() > 0) {
String[] telephoneArray = telephoneList.toArray(new String[]{});
SendSms.sendSmsToUser(telephoneArray, "1425995", new String[]{firePointEntity.getFirePointAddress()});
StringBuilder stringBuilder = new StringBuilder("发送短信消息通知:\n");
for (String telephone : telephoneArray) {
stringBuilder.append("telephone:").append(telephone).append("\n");
}
stringBuilder.append("短信模版ID1425995\n").append("短信内容:").append(firePointEntity.getFirePointAddress());
log.info(stringBuilder.toString());
}
}