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