From 070a2e8e222debc495ff4ce9ace16a15836cd3ed Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Sun, 5 Mar 2023 14:51:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E7=81=AB=E7=82=B9=E6=9D=A5=E4=BA=86=E5=8F=AA=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=BE=A4=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/straw/utils/FirePointPushManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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}); } + }