ソースを参照

异常提示修改

Zhaops 6 年 前
コミット
68d1299fb5

+ 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();
     }