diff --git a/src/main/java/com/xkrs/straw/utils/FirePointPushManager.java b/src/main/java/com/xkrs/straw/utils/FirePointPushManager.java index a36dd04..fbac7cc 100644 --- a/src/main/java/com/xkrs/straw/utils/FirePointPushManager.java +++ b/src/main/java/com/xkrs/straw/utils/FirePointPushManager.java @@ -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 sysUserList = sysUserDao.findAll(); List smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePoint.getTownCode(), sysUserList); @@ -61,6 +61,7 @@ public class FirePointPushManager { //分发短信通知 smsHelper.dispatchSMSMessage(smsReceiverList, new String[]{firePoint.getFirePointAddress()}, new AllFirePointVo[]{firePoint}); } + }