This commit is contained in:
liuchengqian 2023-03-07 17:49:57 +08:00
parent 71e15bb54e
commit 930427d639

View File

@ -63,7 +63,17 @@ public class FirePointPushManager {
telephoneArray[i] = "86" + smsReceiverList.get(i).getUserName();
}
int resValue = SMSUtils.sendSmsToUser(telephoneArray, "1425995", new String[]{firePoint.getFirePointAddress()});
String sendResult = resValue == 0 ? "短信通知发送成功!" : "短信通知发送失败!";
String sendResult;
if (resValue == 0) {
//联系人列表发送短信成功在数据库中的已发短信数量字段加一
for (SysUserEntity smsReceiver : smsReceiverList) {
smsReceiver.setReceiveSmsCount(smsReceiver.getReceiveSmsCount() + 1);
}
sysUserDao.saveAll(smsReceiverList);
sendResult = "短信通知发送成功!";
} else {
sendResult = "短信通知发送失败!";
}
//记录短信通知日志
StringBuilder stringBuilder = new StringBuilder("发送人:青岛星科瑞升信息科技有限公司\n");
for (String telephone : telephoneArray) {