ludc
2024-04-07 4994a4f75e977e9bf9c1cef23d7c443b33112bc5
Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java
@@ -1194,19 +1194,20 @@
      if(StringUtils.isBlank(componentOid)){
         return null;
      }
//      if(!QUERY_BY_CACHE){
//         try {
//            return uiComponentDO2VO(platformClientUtil.getPortalService().getPLPageDefinationById(componentOid),true);
//         } catch (VCIError vciError) {
//            throw WebUtil.getVciBaseException(vciError);
//         }
//      }else{
//         List<UIComponentVO> componentVOS = self.selectAllUIComponent();
//         List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList());
//         if(!CollectionUtils.isEmpty(componentVOList)){
//            return componentVOList.get(0);
//         }
//      }
      if(!QUERY_BY_CACHE){
         try {
            platformClientUtil.getPortalService().getPLPageDefinationById(componentOid);
            return uiComponentDO2VO(null,true);
         } catch (VCIError vciError) {
            throw WebUtil.getVciBaseException(vciError);
         }
      }else{
         List<UIComponentVO> componentVOS = self.selectAllUIComponent();
         List<UIComponentVO> componentVOList = Optional.ofNullable(componentVOS).orElseGet(() -> new ArrayList<>()).stream().filter(s -> s.getOid().equalsIgnoreCase(componentOid)).collect(Collectors.toList());
         if(!CollectionUtils.isEmpty(componentVOList)){
            return componentVOList.get(0);
         }
      }
      return null;
   }