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);