zhaops 4 lat temu
rodzic
commit
afd3083deb

+ 8 - 6
cdssman-service/src/main/java/com/diagbot/facade/MappingConfigFacade.java

@@ -177,6 +177,8 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         RespDTO<Page<MappingConfigWrapper>> respDTO = cdssClient.getPage(mappingConfigPageVO);
         if (RespDTOUtil.respIsOK(respDTO)) {
             page = respDTO.data;
+        } else {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
         return page;
     }
@@ -249,7 +251,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return false;
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }
 
@@ -264,7 +266,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return false;
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }
 
@@ -279,7 +281,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return null;
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }
 
@@ -294,7 +296,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return new ArrayList<>();
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }
 
@@ -309,7 +311,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return false;
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }
 
@@ -327,7 +329,7 @@ public class MappingConfigFacade extends MappingConfigServiceImpl {
         if (RespDTOUtil.respIsOK(respDTO)) {
             return respDTO.data;
         } else {
-            return false;
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, respDTO.msg);
         }
     }