소스 검색

修改推送消息接口容错

wangyc 7 년 전
부모
커밋
cf95542296
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main/java/com/uas/ps/message/service/impl/MessageServiceImpl.java

+ 2 - 1
src/main/java/com/uas/ps/message/service/impl/MessageServiceImpl.java

@@ -110,7 +110,7 @@ public class MessageServiceImpl implements MessageService {
         App consumerAppExists = new App();
         if (consumerAppObj != null && !StringUtils.isEmpty(String.valueOf(consumerAppObj))) {
             consumerAppExists = appDao.findByName(String.valueOf(consumerAppObj));
-            if (consumerAppExists.getId() == null) {
+            if (consumerAppExists == null) {
                 throw new IllegalOperatorException("接收应用不存在");
             }
         } else {
@@ -122,6 +122,7 @@ public class MessageServiceImpl implements MessageService {
             Constant.NO, Constant.NO);
 
         Map<String, Object> resultMap = sendMessageByAPI(messages, consumerApp);
+        resultMap.put("success", "success");
         return resultMap;
     }