发送短信后记录发送过的数量
This commit is contained in:
parent
e75e86ac07
commit
fe754c6ac9
@ -66,7 +66,12 @@ public class FirePointPushManager {
|
|||||||
if (resValue == 0) {
|
if (resValue == 0) {
|
||||||
//联系人列表发送短信成功,在数据库中的已发短信数量字段加一
|
//联系人列表发送短信成功,在数据库中的已发短信数量字段加一
|
||||||
for (SysUserEntity smsReceiver : smsReceiverList) {
|
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);
|
sysUserDao.saveAll(smsReceiverList);
|
||||||
sendResult = "短信通知发送成功!";
|
sendResult = "短信通知发送成功!";
|
||||||
|
Loading…
Reference in New Issue
Block a user