Browse Source

# 解决消息APP/WEB多人即时推送feign接口接收问题

zhongwei
haungxing 1 year ago
parent
commit
ce9330e8a8
  1. 8
      hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

8
hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

@ -138,13 +138,13 @@ public class MessageClient extends BladeController implements IMessageClient{
if(saveResult) {
List<MessagePushRecordEntity> appRecords = pushRecords.stream().filter(record -> MessageConstants.APP_PUSH.equals(record.getType())).collect(Collectors.toList());
// 推送消息 - app
recordService.sendAppMsgByUsers(request,appRecords);
Boolean appFlag = recordService.sendAppMsgByUsers(request, appRecords);
// 推送消息 - web
recordService.sendWsMsgByUsers(CollectionUtils.subtract(pushRecords,appRecords).stream().collect(Collectors.toList()));
return R.success("推送成功");
Boolean wsFlag = recordService.sendWsMsgByUsers(CollectionUtils.subtract(pushRecords, appRecords).stream().collect(Collectors.toList()));
return R.data(appFlag && wsFlag);
}
else {
return R.fail("保存消息失败");
return R.data(false);
}
}

Loading…
Cancel
Save