Browse Source

优化代码

gaodm 6 years atrás
parent
commit
60a2d7cc6d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java

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

@@ -91,6 +91,9 @@ public class PushFacade {
         searchData.setLength(10);
 
         Response<ResponseData> res = aiServiceClient.bayesPageData(searchData);
+        if (null == res || null == res.getData()) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "AI没有返回结果");
+        }
         return res.getData();
     }