From 1fa49d1398ccc62966f65d1eb0344792cba7111a Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 12 Apr 2023 14:43:24 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hnac/hzims/message/service/IMessageService.java | 2 +- .../com/hnac/hzims/message/service/impl/MailMessageServiceImpl.java | 4 ++-- .../com/hnac/hzims/message/service/impl/PushMessageServiceImpl.java | 2 +- .../com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java | 2 +- .../com/hnac/hzims/message/service/impl/WebsocketServiceImpl.java | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/IMessageService.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/IMessageService.java index fbb4ae0..a929844 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/IMessageService.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/IMessageService.java @@ -17,6 +17,6 @@ public interface IMessageService { */ R send(T pushObject); - Boolean send(MessagePushRecordEntity request); + boolean send(MessagePushRecordEntity request); } diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MailMessageServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MailMessageServiceImpl.java index 03051ba..d0aa1fc 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MailMessageServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MailMessageServiceImpl.java @@ -77,8 +77,8 @@ public class MailMessageServiceImpl implements IMessageService { } @Override - public Boolean send(MessagePushRecordEntity request) { - return null; + public boolean send(MessagePushRecordEntity request) { + return false; } } diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessageServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessageServiceImpl.java index 6f19844..f3ba8b9 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessageServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/PushMessageServiceImpl.java @@ -85,7 +85,7 @@ public class PushMessageServiceImpl implements IMessageService { } @Override - public Boolean send(MessagePushRecordEntity request) { + public boolean send(MessagePushRecordEntity request) { PushInfoVO pushInfoVO = new PushInfoVO(); pushInfoVO.setTenantId(Func.isNotEmpty(AuthUtil.getTenantId()) ? AuthUtil.getTenantId() : request.getTenantId()); ArrayList platformTypes = Lists.newArrayList(PlatformType.Android, PlatformType.IOS); diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java index b614eb6..b4058d6 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/SmsMessageServiceImpl.java @@ -47,7 +47,7 @@ public class SmsMessageServiceImpl implements IMessageService { } @Override - public Boolean send(MessagePushRecordEntity request) { + public boolean send(MessagePushRecordEntity request) { R response = smsClient.sendMessage( Func.isNotEmpty(AuthUtil.getTenantId()) ? AuthUtil.getTenantId() : request.getTenantId(), request.getResourceCode(), diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/WebsocketServiceImpl.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/WebsocketServiceImpl.java index 161e8eb..07730aa 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/WebsocketServiceImpl.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/WebsocketServiceImpl.java @@ -86,7 +86,7 @@ public class WebsocketServiceImpl implements IMessageService { } @Override - public Boolean send(MessagePushRecordEntity request) { + public boolean send(MessagePushRecordEntity request) { String userId = request.getAccount(); request.setPushTime(LocalDateTime.now()); WebSocketSession webSocketSession = SessionManager.SESSION_POOL.get(userId); @@ -104,6 +104,6 @@ public class WebsocketServiceImpl implements IMessageService { redisTemplate.opsForList().leftPush(key,message); redisTemplate.expire(key,24, TimeUnit.HOURS); } - return null; + return true; } }