chenw 6 жил өмнө
parent
commit
8d2c05a992

+ 7 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -1117,8 +1117,13 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
      */
     @Override
     public IPage<DeviceDTO> getDevice(DeviceReqDTO deviceReqDTO) {
-        SearchComponentResp searchComponentResp = searchApi.getInquiry(deviceReqDTO.getKeyword(),deviceReqDTO.getCount(),deviceReqDTO.getSorting(),
-                deviceReqDTO.getType(),deviceReqDTO.getPage(),deviceReqDTO.getFilter());
+        SearchComponentResp searchComponentResp = null;
+        try {
+            searchComponentResp = searchApi.getInquiry(deviceReqDTO.getKeyword(), deviceReqDTO.getCount(), deviceReqDTO.getSorting(),
+                    deviceReqDTO.getType(), deviceReqDTO.getPage(), deviceReqDTO.getFilter());
+        }catch (Exception e){
+            throw new BizException(78001, "系统错误");
+        }
         List<ProductEntity> productEntities = searchComponentResp.getFutures().getContent();
         if (CollectionUtils.isEmpty(productEntities)){
             return null;