소스 검색

异常提示修改

Zhaops 6 년 전
부모
커밋
68d1299fb5
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java

+ 4 - 3
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -156,8 +156,10 @@ public class PushFacade {
      */
     public ResponseData pushAipt(SearchData searchData) {
         Response<ResponseData> res = aiptServiceClient.aiptData(searchData);
-        if (null == res || null == res.getData()) {
+        if (null == res) {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
+        } else if (null == res.getData()) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, res.getMsg());
         }
         return res.getData();
     }
@@ -171,8 +173,7 @@ public class PushFacade {
     public Map<String, Object> scale(SearchData searchData) {
         Response<Map<String, Object>> res = aiptServiceClient.scale(searchData);
         if (null == res || null == res.getData()) {
-            //            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "中间层没有返回结果");
-            return new HashMap<String, Object>();
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "量表数据暂无内容");
         }
         return res.getData();
     }