Browse Source

朗通产品线修改

wangyu 6 years ago
parent
commit
448272fb13

+ 8 - 0
diagbotman-service/src/main/java/com/diagbot/facade/ProductOrderFacade.java

@@ -234,12 +234,20 @@ public class ProductOrderFacade extends ProductOrderServiceImpl {
 		//TODO
         if(productOrderVO.getOrgName()!=null&&productOrderVO.getOrgName()!=""){
             RespDTO<List<Long>> rlist = userServiceClient.getUserByOrgName(productOrderVO.getOrgName());
+            if(rlist == null || !"0".equals(rlist.code) ) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "获取用户和机构信息失败");
+            }
             if(rlist.data.size() == 0){
                 rlist.data.add(-1L);
             }
             productOrderIndex.setUserId(rlist.data);
         }else{
             RespDTO<List<User>> userInfiList = userServiceClient.getUserAllInfo();
+            if(userInfiList == null || !"0".equals(userInfiList.code) ) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "获取用户和机构信息失败");
+            }
             List<Long> userIds =new ArrayList<>();
             for (User user:userInfiList.data) {
                 userIds.add(user.getId());