优化 普通火点来了只发送微信群通知

This commit is contained in:
liuchengqian 2023-03-05 14:51:51 +08:00
parent 7be85ebda4
commit 070a2e8e22

View File

@ -36,18 +36,18 @@ public class FirePointPushManager {
private PushHelper pushHelper;
public void pushNotification(FirePointOrdinaryEntity firePointOrdinaryEntity) {
pushNotification(FirePointConvertUtils.convert(firePointOrdinaryEntity));
pushNotification(FirePointConvertUtils.convert(firePointOrdinaryEntity), false);
}
public void pushNotification(FirePointPreciseEntity firePointPreciseEntity) {
pushNotification(FirePointConvertUtils.convert(firePointPreciseEntity));
pushNotification(FirePointConvertUtils.convert(firePointPreciseEntity), true);
}
private void pushNotification(AllFirePointVo firePoint) {
private void pushNotification(AllFirePointVo firePoint, boolean precise) {
//发送微信群聊消息
sendWeChatGroupMessage(firePoint);
if ("耕地".equals(firePoint.getLandType())) {
if (precise && firePoint.getLandType().contains("耕地")) {
//过滤短信通知收件人
List<SysUserEntity> sysUserList = sysUserDao.findAll();
List<SysUserEntity> smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePoint.getTownCode(), sysUserList);
@ -61,6 +61,7 @@ public class FirePointPushManager {
//分发短信通知
smsHelper.dispatchSMSMessage(smsReceiverList, new String[]{firePoint.getFirePointAddress()}, new AllFirePointVo[]{firePoint});
}
}