From 034d11ec2b7ba2aa66b80fae465689999e9cb622 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 1 Feb 2024 20:15:33 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=B6=88=E6=81=AF=E5=8D=B3=E6=97=B6?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/message/fegin/MessageClient.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java index ebfbd6e..2f59dc8 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java @@ -167,7 +167,12 @@ public class MessageClient extends BladeController implements IMessageClient{ }).collect(Collectors.toList()); boolean saveResult = recordService.saveBatch(pushRecords); if(saveResult) { - return R.status(recordService.sendMailMsgByUsers(pushRecords)); + List appRecords = pushRecords.stream().filter(record -> MessageConstants.APP_PUSH.equals(record.getType())).collect(Collectors.toList()); + // 推送消息 - app + Boolean appFlag = recordService.sendAppMsgByUsers(request, appRecords); + // 推送消息 - web + Boolean wsFlag = recordService.sendWsMsgByUsers(new ArrayList<>(CollectionUtils.subtract(pushRecords, appRecords))); + return R.data(appFlag && wsFlag); } else { return R.data(false);