发送短信后记录发送过的数量

This commit is contained in:
liuchengqian 2023-03-25 21:02:51 +08:00
parent e75e86ac07
commit fe754c6ac9

View File

@ -66,7 +66,12 @@ public class FirePointPushManager {
if (resValue == 0) {
//联系人列表发送短信成功在数据库中的已发短信数量字段加一
for (SysUserEntity smsReceiver : smsReceiverList) {
smsReceiver.setReceiveSmsCount(smsReceiver.getReceiveSmsCount() + 1);
Long oldReceiveSmsCount = smsReceiver.getReceiveSmsCount();
if (oldReceiveSmsCount == null || oldReceiveSmsCount <= 0L) {
smsReceiver.setReceiveSmsCount(1L);
} else {
smsReceiver.setReceiveSmsCount(oldReceiveSmsCount + 1);
}
}
sysUserDao.saveAll(smsReceiverList);
sendResult = "短信通知发送成功!";