优化
This commit is contained in:
parent
64a3426f92
commit
71e15bb54e
@ -57,33 +57,26 @@ public class FirePointPushManager {
|
|||||||
// } catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// }
|
// }
|
||||||
String[] templateParamArray = new String[]{firePoint.getFirePointAddress()};
|
|
||||||
AllFirePointVo[] detailParamArray = new AllFirePointVo[]{firePoint};
|
|
||||||
if (smsReceiverList.size() > 0) {
|
if (smsReceiverList.size() > 0) {
|
||||||
String[] telephoneArray = new String[smsReceiverList.size()];
|
String[] telephoneArray = new String[smsReceiverList.size()];
|
||||||
for (int i = 0; i < smsReceiverList.size(); i++) {
|
for (int i = 0; i < smsReceiverList.size(); i++) {
|
||||||
telephoneArray[i] = "86" + smsReceiverList.get(i).getUserName();
|
telephoneArray[i] = "86" + smsReceiverList.get(i).getUserName();
|
||||||
}
|
}
|
||||||
int resValue = SMSUtils.sendSmsToUser(telephoneArray, "1425995", templateParamArray);
|
int resValue = SMSUtils.sendSmsToUser(telephoneArray, "1425995", new String[]{firePoint.getFirePointAddress()});
|
||||||
String sendResult = resValue == 0 ? "短信通知发送成功!" : "短信通知发送失败!";
|
String sendResult = resValue == 0 ? "短信通知发送成功!" : "短信通知发送失败!";
|
||||||
//记录短信通知日志
|
//记录短信通知日志
|
||||||
StringBuilder stringBuilder = new StringBuilder("发送人:青岛星科瑞升信息科技有限公司\n");
|
StringBuilder stringBuilder = new StringBuilder("发送人:青岛星科瑞升信息科技有限公司\n");
|
||||||
for (String telephone : telephoneArray) {
|
for (String telephone : telephoneArray) {
|
||||||
stringBuilder.append("接收人:").append(telephone).append("\n");
|
stringBuilder.append("接收人:").append(telephone).append("\n");
|
||||||
}
|
}
|
||||||
for (String templateParam : templateParamArray) {
|
stringBuilder.append("模板参数:").append(firePoint.getFirePointAddress()).append("\n");
|
||||||
stringBuilder.append("模板参数:").append(templateParam).append("\n");
|
stringBuilder.append("超级详细的参数:").append(firePoint.toString()).append("\n");
|
||||||
}
|
|
||||||
for (AllFirePointVo detailParam : detailParamArray) {
|
|
||||||
stringBuilder.append("超级详细的参数:").append(detailParam.toString()).append("\n");
|
|
||||||
}
|
|
||||||
stringBuilder.append(sendResult);
|
stringBuilder.append(sendResult);
|
||||||
log.info(stringBuilder.toString());
|
log.info(stringBuilder.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送微信消息
|
* 发送微信消息
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user