diff --git a/src/main/java/nlib/col/service/impl/CollectionServiceImpl.java b/src/main/java/nlib/col/service/impl/CollectionServiceImpl.java index 09b497c2..7e3d3c16 100644 --- a/src/main/java/nlib/col/service/impl/CollectionServiceImpl.java +++ b/src/main/java/nlib/col/service/impl/CollectionServiceImpl.java @@ -63,6 +63,20 @@ public class CollectionServiceImpl implements CollectionService { */ public CollectionVO getItemInfo(CollectionVO searchVO) throws Exception { + return getItemInfo(searchVO, null); + } + + /** + * 자료 상세정보를 조회한다. + * 썸네일이 정보가 없는 경우, defaultThumnailUrl로 설정한다. + * + * @param searchVO + * @param defaultThumnailUrl + * @return + * @throws Exception + */ + public CollectionVO getItemInfo(CollectionVO searchVO, String defaultThumnailUrl) throws Exception { + String message = null; // 입력값 확인 @@ -84,6 +98,12 @@ public class CollectionServiceImpl implements CollectionService { // 결과값 전달 CollectionVO retVO = (CollectionVO)XmlConverter.convertMapToObject(resVO.getInfo(), CollectionVO.class); + if(retVO == null) { + log.error("getItemInfo > 조회된 자료 정보가 없습니다."); + return null; + } + + if(StringUtil.isEmpty(retVO.getRprsThumbUrl())) retVO.setRprsThumbUrl(defaultThumnailUrl); retVO.setResultCode(resVO.getResultCode()); retVO.setResultMessage(resVO.getResultMessage());