diff --git a/src/main/java/nlib/bbs/web/QnaController.java b/src/main/java/nlib/bbs/web/QnaController.java index 94cab854..371a2658 100644 --- a/src/main/java/nlib/bbs/web/QnaController.java +++ b/src/main/java/nlib/bbs/web/QnaController.java @@ -15,6 +15,7 @@ import org.apache.commons.lang.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; +import org.springframework.security.access.annotation.Secured; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; @@ -168,6 +169,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping({"/bbs/insertQnaForm.do", "/bbs/updateQnaForm.do"}) public String insertQnaForm( HttpServletRequest request @@ -213,6 +215,7 @@ public class QnaController extends NlibCommonController { * @param model * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/insertQnaArticle.do") public String insertQna(HttpServletRequest request , Authentication authentication @@ -332,6 +335,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/updateQnaArticle.do") public String updateQnaArticle( HttpServletRequest request @@ -504,6 +508,7 @@ public class QnaController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/bbs/deleteQnaArticle.do") public String deleteQnaArticle( HttpServletRequest request diff --git a/src/main/java/nlib/cmm/web/MainController.java b/src/main/java/nlib/cmm/web/MainController.java index c101896b..da39374f 100644 --- a/src/main/java/nlib/cmm/web/MainController.java +++ b/src/main/java/nlib/cmm/web/MainController.java @@ -96,6 +96,7 @@ public class MainController extends NlibCommonController { model.addAttribute("listKeywords", listKeywords); // 문화원 PICK + model.addAttribute("mngOrgNm", getCurCouncilNm(request)); model.addAttribute("listOrgPicks", mainService.listOrgPicks(mngOrgCd)); // 유형별 인기자료 diff --git a/src/main/java/nlib/cmm/web/NotificationController.java b/src/main/java/nlib/cmm/web/NotificationController.java index c3d691b7..60177dd7 100644 --- a/src/main/java/nlib/cmm/web/NotificationController.java +++ b/src/main/java/nlib/cmm/web/NotificationController.java @@ -69,6 +69,7 @@ public class NotificationController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/cmm/listNotifications.do") public String listNotifications( HttpServletRequest req, @@ -158,6 +159,7 @@ public class NotificationController extends NlibCommonController { * @param req * @return */ + @Secured("ROLE_USER") @RequestMapping("/cmm/selectNotificationAjax.do") public ResponseEntity selectNotificationAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map paramMap) throws Exception { diff --git a/src/main/java/nlib/col/service/ReserveService.java b/src/main/java/nlib/col/service/ReserveService.java deleted file mode 100644 index 456e343f..00000000 --- a/src/main/java/nlib/col/service/ReserveService.java +++ /dev/null @@ -1,10 +0,0 @@ -package nlib.col.service; - -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -public interface ReserveService -{ - - -} \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/ReadServiceImpl.java b/src/main/java/nlib/col/service/impl/ReadServiceImpl.java index 49c7823a..98e78779 100644 --- a/src/main/java/nlib/col/service/impl/ReadServiceImpl.java +++ b/src/main/java/nlib/col/service/impl/ReadServiceImpl.java @@ -206,7 +206,7 @@ public class ReadServiceImpl implements ReadService { reqVO.setMbInfoId(searchVO.getMbInfoId()); // 통신 시, 암호화되어 송수신됨 reqVO.setPageSize(searchVO.getPageSize()); reqVO.setPageIndex(searchVO.getPageIndex()); - reqVO.putInfoItem("mngOrgCd", StringUtil.getString(searchVO.getMngOrgCd(), "KCCF")); // DDDDDDDDDDDDDDDDDDDd api 변경시까지 유지 + reqVO.putInfoItem("mngOrgCd", searchVO.getMngOrgCd()); reqVO.putInfoItem("reqStatusDivCd", searchVO.getReqStatusDivCd()); return dataApi.request(reqVO); } diff --git a/src/main/java/nlib/col/service/impl/RentDAO.java b/src/main/java/nlib/col/service/impl/RentDAO.java index ac5cca19..bfda4904 100644 --- a/src/main/java/nlib/col/service/impl/RentDAO.java +++ b/src/main/java/nlib/col/service/impl/RentDAO.java @@ -12,12 +12,4 @@ public interface RentDAO { public List> listRentMngOrg(String mbInfoId); - - /** - * 사용자의 대출현황을 조회한다. - * - * @param mbInfoId - * @return - */ - public Map getRentStats(String mbInfoId); } diff --git a/src/main/java/nlib/col/service/impl/ReserveDAO.java b/src/main/java/nlib/col/service/impl/ReserveDAO.java deleted file mode 100644 index 83563578..00000000 --- a/src/main/java/nlib/col/service/impl/ReserveDAO.java +++ /dev/null @@ -1,16 +0,0 @@ -package nlib.col.service.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Repository; - -import nlib.restful.DataApi; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Repository("reserveDAO") -public class ReserveDAO extends DataApi -{ - private static final Logger log = LoggerFactory.getLogger(ReserveDAO.class); - -} \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java b/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java deleted file mode 100644 index 5fc995a9..00000000 --- a/src/main/java/nlib/col/service/impl/ReserveServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package nlib.col.service.impl; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Service; - -import nlib.col.service.ReserveService; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; - -@Service("reserveService") -public class ReserveServiceImpl implements ReserveService -{ - private static final Logger log = LoggerFactory.getLogger(ReserveServiceImpl.class); - - @Resource(name="reserveDAO") - private ReserveDAO reserveDAO; -} \ No newline at end of file diff --git a/src/main/java/nlib/col/web/CartController.java b/src/main/java/nlib/col/web/CartController.java index 8a376d19..859fb843 100644 --- a/src/main/java/nlib/col/web/CartController.java +++ b/src/main/java/nlib/col/web/CartController.java @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; +import org.springframework.security.access.annotation.Secured; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestBody; @@ -281,6 +282,7 @@ public class CartController extends NlibCommonController * @return * @throws Exception */ + @Secured("ROLE_USER") @RequestMapping("/cart/mergeCartItemsAjax.do") public ResponseEntity mergeCartItemsAjax(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws Exception { diff --git a/src/main/java/nlib/col/web/ReserveController.java b/src/main/java/nlib/col/web/ReserveController.java deleted file mode 100644 index 010d8dee..00000000 --- a/src/main/java/nlib/col/web/ReserveController.java +++ /dev/null @@ -1,48 +0,0 @@ -package nlib.col.web; - -import javax.annotation.Resource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Controller; - -import nlib.cmm.NlibCommonController; -import nlib.cmm.service.CodeService; -import nlib.cmm.service.NlibProperty; -import nlib.col.service.RentService; - -/** - *
- * @Class Name : ReserveController.java
- * 
- * @Description : 자료열람 컨트롤러
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 2021. 10. 01. JSYOO 최초 생성 - * - * - * @author 이씨플라자 * DIGITALSHIP JSYOO - * @since 2021. 10. 01. - * @version 1.0 - * - */ -@Controller -public class ReserveController extends NlibCommonController -{ - private static final Logger log = LoggerFactory.getLogger(ReserveController.class); - static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size"); - - @Resource(name = "rentService") - private RentService rentService; - - @Resource(name = "codeService") - private CodeService codeService; - -} \ No newline at end of file diff --git a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java index 28e19566..a9c75696 100644 --- a/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java +++ b/src/main/java/nlib/sch/service/impl/NlibSearchServiceImpl.java @@ -1,302 +1,308 @@ -package nlib.sch.service.impl; - - - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.lang.reflect.Type; -import java.net.URL; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; - -import javax.annotation.Resource; - -import org.apache.commons.beanutils.BeanUtils; -import org.json.JSONException; -import org.json.JSONObject; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.stereotype.Service; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; - -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import com.google.gson.reflect.TypeToken; - -import nlib.sch.service.NlibSearchVO; -import nlib.col.service.CollectionVO; -import nlib.restful.DataApi; -import nlib.restful.service.DataApiInterface; -import nlib.restful.service.DataApiReqVO; -import nlib.restful.service.DataApiResVO; -import nlib.restful.service.impl.DataApiRESTful; -import nlib.sch.service.NlibSearchCollectionVO; -import nlib.sch.service.NlibSearchInterface; -import nlib.sch.service.NlibSearchService; -import nlib.util.StringUtil; - - -@Service("nlibSearchService") -public class NlibSearchServiceImpl implements NlibSearchService{ - - private static final Logger log = LoggerFactory.getLogger(NlibSearchServiceImpl.class); - - /* DataApi 접속 서버 정보 */ - @Value("#{properties['search.searchIp']}") - private String SEARCH_IP; - - @Value("#{properties['search.searchPort']}") - private String SEARCH_PORT; - - @Value("#{properties['search.protocol']}") - private String SEARCH_PROTOCOL; - - /** RESTFul API 송수신 모듈 */ - @Resource(name = "dataApi") - private DataApi dataApi; - - public NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception { - try { - //검색엔진 페이지 셋팅 - searchVO.setListCount(Integer.toString(searchVO.getPageSize())); - searchVO.setStartCount(Integer.toString(searchVO.getPageIndex())); - - - String collectionTemp=""; - String nameTemp=""; - //----------------------------------- - // 입력값 검증작업 - //----------------------------------- - /*resVO = DataApiInterface.checkReqCommonParams(reqVO); - if(resVO != null) return resVO; - HttpMethod method = reqVO.getReqMethod();*/ - - //----------------------------------- - // 폼 파라메터 생성 작업 및 요청 처리 - //----------------------------------- - String url = SEARCH_PROTOCOL + "://" + SEARCH_IP + ("80".equals(SEARCH_PORT) ? "" : ":" + SEARCH_PORT) + "/searchApi/searchApi.jsp"; - log.debug("REQ URL : " + url); - - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - - ResponseEntity responseEntity = null; - ResponseEntity allResponseEntity = null; - RestTemplate restTemplate = new RestTemplate(); - restTemplate.getMessageConverters() - .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); - - //단일 탭 검색 - MultiValueMap parameters= searchVO.getSearchMap(); - - //전체 검색 (각 탭별 count가 목적) - collectionTemp = searchVO.getCollection(); - if("".equals(StringUtil.getString(searchVO.getCollectionList(), "")) || "ALL".equals(StringUtil.getString(searchVO.getCollectionList(), ""))) - { - searchVO.setCollection("ALL"); - }else - { - //상세검색시 콜렉션리스트만 카운트하기위해 추가. - searchVO.setCollection(searchVO.getCollectionList()); - } - - MultiValueMap allParameters= searchVO.getSearchMap(); - searchVO.setCollection(collectionTemp); - //post방식 - parameters.forEach((k, v) -> log.debug("params > " + k + " : " + v)); - allParameters.forEach((k, v) -> log.debug("allParams > " + k + " : " + v)); - HttpEntity> requestEntity = new HttpEntity(parameters, headers); - HttpEntity> allRequestEntity = new HttpEntity(allParameters, headers); - responseEntity = restTemplate.postForEntity(url, requestEntity , String.class); - allResponseEntity = restTemplate.postForEntity(url, allRequestEntity , String.class); - - //----------------------------------- - // 응답 처리 - //----------------------------------- - HttpStatus statusCode = responseEntity.getStatusCode(); - log.debug("RES StatusCode : " + statusCode); - String resultXML = responseEntity.getBody(); - log.debug("RES resultXML : " + resultXML); - - HttpStatus allStatusCode = allResponseEntity.getStatusCode(); - log.debug("RES allStatusCode : " + allStatusCode); - String allResultXML = allResponseEntity.getBody(); - log.debug("RES allResultXML : " + allResultXML); - - //검색엔진 결과 json 파싱 - JsonParser jsonParser = new JsonParser(); - - - JsonObject jsonObject = null; - JsonObject tmp = null; - String collection = ""; - String totalCount = ""; - JsonArray jsonArray = null; - - //전체검색 결과 탭별 count - jsonObject = (JsonObject) jsonParser.parse(allResultXML); - jsonObject = (JsonObject) jsonObject.get("SearchQueryResult"); - jsonArray = (JsonArray) jsonObject.get("Collection"); - - for(int i=0;i list = new ArrayList<>(); - List> subjectMap = new ArrayList>(); - List> typeMap = new ArrayList>(); - List> orgMap = new ArrayList>(); - String code=""; - String code_up=""; - int j; - int k; - - for(int i=0;i0) - { - filterObject =(JsonObject) subjectList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - subjectList = (JsonArray) filterObject.get("Category"); - }; - if(typeList.size()>0) - { - filterObject =(JsonObject) typeList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - typeList = (JsonArray) filterObject.get("Category"); - }; - if(orgList.size()>0) - { - filterObject =(JsonObject) orgList.get(0); - filterObject = (JsonObject) filterObject.get("Categories"); - orgList = (JsonArray) filterObject.get("Category"); - }; - for(k = 0; k < subjectList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)subjectList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("category_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("category_nm",code); - temp.put("category_cnt",filterObject.get("Count").getAsString()); - subjectMap.add(temp); - } - for(k = 0; k < typeList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)typeList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - //상위코드값 - code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); - temp.put("class_nm_up",code_up); - - //코드값 - code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); - temp.put("class_nm",code); - temp.put("class_cnt",filterObject.get("Count").getAsString()); - typeMap.add(temp); - } - for(k = 0; k < orgList.size(); k++){ - HashMap temp = new HashMap(); - filterObject = (JsonObject)orgList.get(k); - nameTemp = filterObject.get("Name").getAsString(); - if(!"null".equals(nameTemp)) { - temp.put("org_nm",nameTemp); - temp.put("org_cnt",filterObject.get("Count").getAsString()); - orgMap.add(temp); - } - } - - tmp = (JsonObject) tmp.get("DocumentSet"); - searchVO.setTotalCount(tmp.get("TotalCount").getAsString()); - colArray = (JsonArray) tmp.get("Document"); - - //vo list로 json list 파싱 - for(j=0;j Exception 발생 : " + e.toString()); - } - return searchVO; - } -}; +package nlib.sch.service.impl; + + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.lang.reflect.Type; +import java.net.URL; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + +import javax.annotation.Resource; + +import org.apache.commons.beanutils.BeanUtils; +import org.json.JSONException; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.stereotype.Service; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.reflect.TypeToken; + +import nlib.sch.service.NlibSearchVO; +import nlib.col.service.CollectionVO; +import nlib.restful.DataApi; +import nlib.restful.service.DataApiInterface; +import nlib.restful.service.DataApiReqVO; +import nlib.restful.service.DataApiResVO; +import nlib.restful.service.impl.DataApiRESTful; +import nlib.sch.service.NlibSearchCollectionVO; +import nlib.sch.service.NlibSearchInterface; +import nlib.sch.service.NlibSearchService; +import nlib.util.StringUtil; + + +@Service("nlibSearchService") +public class NlibSearchServiceImpl implements NlibSearchService{ + + private static final Logger log = LoggerFactory.getLogger(NlibSearchServiceImpl.class); + + /* DataApi 접속 서버 정보 */ + @Value("#{properties['search.searchIp']}") + private String SEARCH_IP; + + @Value("#{properties['search.searchPort']}") + private String SEARCH_PORT; + + @Value("#{properties['search.protocol']}") + private String SEARCH_PROTOCOL; + + /** RESTFul API 송수신 모듈 */ + @Resource(name = "dataApi") + private DataApi dataApi; + + public NlibSearchVO getSearch(NlibSearchVO searchVO) throws Exception { + try { + //검색엔진 페이지 셋팅 + searchVO.setListCount(Integer.toString(searchVO.getPageSize())); + searchVO.setStartCount(Integer.toString(searchVO.getPageIndex())); + + + String collectionTemp=""; + String nameTemp=""; + //----------------------------------- + // 입력값 검증작업 + //----------------------------------- + /*resVO = DataApiInterface.checkReqCommonParams(reqVO); + if(resVO != null) return resVO; + HttpMethod method = reqVO.getReqMethod();*/ + + //----------------------------------- + // 폼 파라메터 생성 작업 및 요청 처리 + //----------------------------------- + String url = SEARCH_PROTOCOL + "://" + SEARCH_IP + ("80".equals(SEARCH_PORT) ? "" : ":" + SEARCH_PORT) + "/searchApi/searchApi.jsp"; + log.debug("REQ URL : " + url); + + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + + ResponseEntity responseEntity = null; + ResponseEntity allResponseEntity = null; + RestTemplate restTemplate = new RestTemplate(); + restTemplate.getMessageConverters() + .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); + + //단일 탭 검색 + MultiValueMap parameters= searchVO.getSearchMap(); + + //전체 검색 (각 탭별 count가 목적) + collectionTemp = searchVO.getCollection(); + if("".equals(StringUtil.getString(searchVO.getCollectionList(), "")) || "ALL".equals(StringUtil.getString(searchVO.getCollectionList(), ""))) + { + searchVO.setCollection("ALL"); + }else + { + //상세검색시 콜렉션리스트만 카운트하기위해 추가. + searchVO.setCollection(searchVO.getCollectionList()); + } + + MultiValueMap allParameters= searchVO.getSearchMap(); + searchVO.setCollection(collectionTemp); + //post방식 + parameters.forEach((k, v) -> log.debug("params > " + k + " : " + v)); + allParameters.forEach((k, v) -> log.debug("allParams > " + k + " : " + v)); + HttpEntity> requestEntity = new HttpEntity(parameters, headers); + HttpEntity> allRequestEntity = new HttpEntity(allParameters, headers); + responseEntity = restTemplate.postForEntity(url, requestEntity , String.class); + allResponseEntity = restTemplate.postForEntity(url, allRequestEntity , String.class); + + //----------------------------------- + // 응답 처리 + //----------------------------------- + HttpStatus statusCode = responseEntity.getStatusCode(); + log.debug("RES StatusCode : " + statusCode); + String resultXML = responseEntity.getBody(); + log.debug("RES resultXML : " + resultXML); + + HttpStatus allStatusCode = allResponseEntity.getStatusCode(); + log.debug("RES allStatusCode : " + allStatusCode); + String allResultXML = allResponseEntity.getBody(); + log.debug("RES allResultXML : " + allResultXML); + + //검색엔진 결과 json 파싱 + JsonParser jsonParser = new JsonParser(); + + + JsonObject jsonObject = null; + JsonObject tmp = null; + String collection = ""; + String totalCount = ""; + JsonArray jsonArray = null; + + //전체검색 결과 탭별 count + jsonObject = (JsonObject) jsonParser.parse(allResultXML); + jsonObject = (JsonObject) jsonObject.get("SearchQueryResult"); + jsonArray = (JsonArray) jsonObject.get("Collection"); + + for(int i=0;i list = new ArrayList<>(); + List> subjectMap = new ArrayList>(); + List> typeMap = new ArrayList>(); + List> orgMap = new ArrayList>(); + String code=""; + String code_up=""; + int j; + int k; + + for(int i=0;i0) + { + filterObject =(JsonObject) subjectList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + subjectList = (JsonArray) filterObject.get("Category"); + }; + if(typeList.size()>0) + { + filterObject =(JsonObject) typeList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + typeList = (JsonArray) filterObject.get("Category"); + }; + if(orgList.size()>0) + { + filterObject =(JsonObject) orgList.get(0); + filterObject = (JsonObject) filterObject.get("Categories"); + orgList = (JsonArray) filterObject.get("Category"); + }; + for(k = 0; k < subjectList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)subjectList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("category_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("category_nm",code); + temp.put("category_cnt",filterObject.get("Count").getAsString()); + subjectMap.add(temp); + } + for(k = 0; k < typeList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)typeList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + //상위코드값 + code_up = nameTemp.substring(nameTemp.indexOf("@")+1,nameTemp.indexOf("^")); + temp.put("class_nm_up",code_up); + + //코드값 + code = nameTemp.substring(nameTemp.lastIndexOf("@")+1); + temp.put("class_nm",code); + temp.put("class_cnt",filterObject.get("Count").getAsString()); + typeMap.add(temp); + } + for(k = 0; k < orgList.size(); k++){ + HashMap temp = new HashMap(); + filterObject = (JsonObject)orgList.get(k); + nameTemp = filterObject.get("Name").getAsString(); + if(!"null".equals(nameTemp)) { + temp.put("org_nm",nameTemp); + temp.put("org_cnt",filterObject.get("Count").getAsString()); + orgMap.add(temp); + } + } + } + + tmp = (JsonObject) tmp.get("DocumentSet"); + searchVO.setTotalCount(tmp.get("TotalCount").getAsString()); + colArray = (JsonArray) tmp.get("Document"); + + if(colArray != null) + { + //vo list로 json list 파싱 + for(j=0;j Exception 발생 : " + e.toString()); + } + return searchVO; + } +} + diff --git a/src/main/java/nlib/user/web/MemberController.java b/src/main/java/nlib/user/web/MemberController.java index caa7dc55..7c8e9659 100644 --- a/src/main/java/nlib/user/web/MemberController.java +++ b/src/main/java/nlib/user/web/MemberController.java @@ -359,7 +359,7 @@ public class MemberController extends NlibCommonController{ String jsessionId = session.getId(); OAuthUniversalUser oauthUser = SessionConfig.popNewMemberInfo(jsessionId); - if(oauthUser.getNlibVO()!=null) + if(oauthUser != null && oauthUser.getNlibVO()!=null) { //핸드폰인증시 sns제공 번호와 회원가입폼 번호 비교 if(!(vo.getMobileNo().equals(oauthUser.getSnsMobileNo()))) @@ -808,6 +808,7 @@ public class MemberController extends NlibCommonController{ public @ResponseBody String changePassword(Authentication authentication,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{ //사용자 정보를 가져온다. NlibLoginVO loginVO = getNlibLoginVO(authentication); + loginVO.setJoinCouncilCd(getCurCouncilCd(request)); loginVO = loginService.selectLoginUserInfo(loginVO); diff --git a/src/main/java/nlib/user/web/UserInfoController.java b/src/main/java/nlib/user/web/UserInfoController.java index 4ed39cbb..61c87535 100644 --- a/src/main/java/nlib/user/web/UserInfoController.java +++ b/src/main/java/nlib/user/web/UserInfoController.java @@ -114,6 +114,7 @@ public class UserInfoController extends NlibCommonController { * 내 정보 조회 * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/getMyInfo.do") public String getMyInfo(HttpServletResponse response,HttpServletRequest request) throws Exception{ return "nlib/userInfo/getMyInfo"; @@ -123,14 +124,28 @@ public class UserInfoController extends NlibCommonController { * 내 정보 수정 페이지 * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/putMyInfo.do") public String putMyInfo(NlibLoginVO vo,HttpServletResponse response,HttpServletRequest request,Authentication authentication,ModelMap model) throws Exception{ //사용자 정보를 가져온다. NlibLoginVO loginVO = getNlibLoginVO(authentication); + + if(loginVO == null) + { + model.addAttribute("msg","비정상적인 접근입니다. 관리자에게 문의하여 주시기 바랍니다."); + model.addAttribute("url","/userInfo/pwCertMyInfo.do"); + return "nlib/cmm/alert"; + } + loginVO.setJoinCouncilCd(getCurCouncilCd(request)); loginVO = loginService.selectLoginUserInfo(loginVO); - + if(loginVO == null) + { + model.addAttribute("msg","비정상적인 접근입니다. 관리자에게 문의하여 주시기 바랍니다."); + model.addAttribute("url","/userInfo/pwCertMyInfo.do"); + return "nlib/cmm/alert"; + } List snsList = new ArrayList(); @@ -158,6 +173,7 @@ public class UserInfoController extends NlibCommonController { * @return * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/updateMyInfo.do" , method=RequestMethod.POST) public String updateMyInfo(NlibLoginVO vo,Authentication authentication,HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{ @@ -209,6 +225,7 @@ public class UserInfoController extends NlibCommonController { * 내 정보 수정 전 password 인증 * @exception Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/pwCertMyInfo.do") public String pwCertMyInfo(HttpServletResponse response,HttpServletRequest request,ModelMap model) throws Exception{ NlibLoginVO nlibLoginVO = getNlibLoginVO(request); @@ -240,6 +257,7 @@ public class UserInfoController extends NlibCommonController { * @param model * @return */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/getMemberQrcodeFormPopup.do") public String getMemberQrcodeFormPopup(HttpServletRequest request, ModelMap model) { @@ -262,6 +280,7 @@ public class UserInfoController extends NlibCommonController { * @return * @throws Exception */ + @Secured("ROLE_USER") @RequestMapping(value="/userInfo/getMemberQrcode.do", produces=MediaType.IMAGE_JPEG_VALUE) public ResponseEntity getMemberQrcode(HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -347,7 +366,7 @@ public class UserInfoController extends NlibCommonController { model.addAttribute("rentTotalCount", resRentVO.getRecordTotCount()); // 방문열람내역 (최근 5개) - searchCollectionVO.setReqStatusDivCd("A"); // API 변경될떄까지 임시 값 보냄 DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD + searchCollectionVO.setReqStatusDivCd(null); DataApiResVO resReadVO = readService.listReadItems(searchCollectionVO); List readList = collectionService.setDetailInfoForHashList(resReadVO.getRecordList(), searchCollectionVO.getMbInfoId(), NlibProperty.getString("thumbnail.image.url.small")); model.addAttribute("readList", readList); diff --git a/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml index 8682bbfb..e552d611 100644 --- a/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/col/RentDAO_SQL.xml @@ -20,14 +20,4 @@ ORDER BY C.DEPT_NM - \ No newline at end of file diff --git a/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml b/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml index 5a496088..e67fa76a 100644 --- a/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml +++ b/src/main/resources/egovframework/mapper/nlib/user/LoginDAO_SQL.xml @@ -37,9 +37,9 @@ FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */ JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */ ON A.MB_INFO_ID = B.MB_INFO_ID - WHERE B.SNS_ID = #{snsId} - AND UPPER(SNS_TYPE) = UPPER(#{snsType}) + WHERE A.MB_INFO_ID = #{mbInfoId} AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */ + ORDER BY B.REG_DD LIMIT 1 ]]> diff --git a/src/main/resources/egovframework/spring/context-datasource.xml b/src/main/resources/egovframework/spring/context-datasource.xml index 8304b063..c65d8681 100644 --- a/src/main/resources/egovframework/spring/context-datasource.xml +++ b/src/main/resources/egovframework/spring/context-datasource.xml @@ -24,7 +24,17 @@ + + + + + + + + + + @@ -33,17 +43,6 @@ - + - - - - - - diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index 11afcae4..dfef19a8 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -17,10 +17,10 @@ $(document).ready(function() { }); function goSearch(){ - if($("#top_query").val() != "") + /* if($("#top_query").val() != "") { $('#searchHeaderForm input[name=filter_mylist]').val("search_query,"); - } + } */ document.searchHeaderForm.submit(); } @@ -62,14 +62,14 @@ function fn_getMemberCard() {
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp index 6134f0a4..f92513a1 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp @@ -259,11 +259,11 @@ function d_search(){ }else{ $("#d_filter_creatYyyy").val("all"); } - if($("#d_query").val() != "") +/* if($("#d_query").val() != "") { filter_myList+= "search_query,"; } - if($("#d_bookIndex").val() != "") + */ if($("#d_bookIndex").val() != "") { filter_myList+= "search_bookIndex,"; } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp index 1b25df5a..ad1f430c 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMyHome.jsp @@ -229,6 +229,7 @@
${item.reqStatusDivNm} ${item.reqStatusDivNm} + ${item.reqStatusDivNm} ${item.reqStatusDivNm} ${item.reqStatusDivNm} ${item.reqStatusDivNm} diff --git a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp index b53db13a..d323addc 100644 --- a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp @@ -64,16 +64,6 @@ $(document).ready(function() {
  • 관심자료
  • 대출관리
  • 방문열람관리
  • - - -
  • --- 이하 임시 추가 메뉴 ---
  • -
  • ID/PW찾기
  • -
  • 암호화
  • -
  • 환경설정갱신
  • -
  • 코드조회
  • -
  • API샘플
  • - - diff --git a/src/main/webapp/js/default.js b/src/main/webapp/js/default.js index 11688d41..d66944d0 100644 --- a/src/main/webapp/js/default.js +++ b/src/main/webapp/js/default.js @@ -123,9 +123,9 @@ $(document).ready(function(){ jQuery(function($) { // 상세검색 팝업 열기 $('.btn-search-detail').on('click', function () { - // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 DDDDDDDDDD 추가) : 시작 + // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 시작 fn_layerPopWithClass("/search/getDetailedSearchFormPopup.do", "popup pop-advanced-search"); - // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 DDDDDDDDDD 추가) : 종료 + // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 종료 }); }); diff --git a/src/main/webapp/js/search/reference.js b/src/main/webapp/js/search/reference.js index 2eca2fe7..b4ac3a39 100644 --- a/src/main/webapp/js/search/reference.js +++ b/src/main/webapp/js/search/reference.js @@ -310,9 +310,9 @@ function fnLabel_reference(){ }else if(mylist_arr[j].indexOf("agency") >= 0){ var second_cate_nm = mylist_arr[j].substring(mylist_arr[j].indexOf("_")+1); $("#reference_fillter_append").append("
  • 생산기관 > "+ second_cate_nm + "
  • ").text(); - }else if(mylist_arr[j].indexOf("search_query") >= 0){ + }/*else if(mylist_arr[j].indexOf("search_query") >= 0){ $("#reference_fillter_append").append("
  • 검색어 > "+ $("#realQuery").val() + "
  • ").text(); - }else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){ + }*/else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){ $("#reference_fillter_append").append("
  • 목차 > "+ $("#bookIndex").val() + "
  • ").text(); }else if(mylist_arr[j].indexOf("search_mngtNo") >= 0){ $("#reference_fillter_append").append("
  • 관리번호 > "+ $("#mngtNo").val() + "
  • ").text(); diff --git a/src/main/webapp/temp/grid_dropzone.html b/src/main/webapp/temp/grid_dropzone.html deleted file mode 100644 index dccd17d8..00000000 --- a/src/main/webapp/temp/grid_dropzone.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - -
    -
    -
    -
    - 이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요. -
    -
    -
    - - - - - diff --git a/src/main/webapp/temp/grid_jqgrid.html b/src/main/webapp/temp/grid_jqgrid.html deleted file mode 100644 index 9d08ae24..00000000 --- a/src/main/webapp/temp/grid_jqgrid.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Grid - - - - - - -
    - - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/grid_jsgrid.html b/src/main/webapp/temp/grid_jsgrid.html deleted file mode 100644 index ca517566..00000000 --- a/src/main/webapp/temp/grid_jsgrid.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - -Grid - - - - - - - - - - -
    - - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/grid_w2ui.html b/src/main/webapp/temp/grid_w2ui.html deleted file mode 100644 index 08a2a881..00000000 --- a/src/main/webapp/temp/grid_w2ui.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -Grid - - - - - -
    - - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup.html b/src/main/webapp/temp/layerPopup.html deleted file mode 100644 index 5688a228..00000000 --- a/src/main/webapp/temp/layerPopup.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - -Insert title here - - - - | - | - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup2.html b/src/main/webapp/temp/layerPopup2.html deleted file mode 100644 index ac793f9b..00000000 --- a/src/main/webapp/temp/layerPopup2.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - -Insert title here - - - - - - - - - - - - - -

    -
    POP
    - - \ No newline at end of file diff --git a/src/main/webapp/temp/layerPopup_data1.html b/src/main/webapp/temp/layerPopup_data1.html deleted file mode 100644 index 42c83801..00000000 --- a/src/main/webapp/temp/layerPopup_data1.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -감사 - - -감사합니다. - - \ No newline at end of file diff --git a/src/main/webapp/test/callback.html b/src/main/webapp/test/callback.html deleted file mode 100644 index fe4b3854..00000000 --- a/src/main/webapp/test/callback.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/naverLogin.html b/src/main/webapp/test/naverLogin.html deleted file mode 100644 index 400ba602..00000000 --- a/src/main/webapp/test/naverLogin.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 네이버 로그인 - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/test.html b/src/main/webapp/test/test.html deleted file mode 100644 index cd2b8f46..00000000 --- a/src/main/webapp/test/test.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -소장자료관 - - - - - - -
    - - - - - - - - - - - - -Insert title here - - -가입되셨습니다. 환영합니다 - - - - - - -
    - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/test/testRest.html b/src/main/webapp/test/testRest.html deleted file mode 100644 index 62994b79..00000000 --- a/src/main/webapp/test/testRest.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -소장자료관 - - - - - - -
    - - - - - - - - - - - - - - - - - - -
    -

    안내 섹션영역

    -
    -
    -
    자물쇠 아이콘
    -

    로그인 및 회원가입 안내

    -
    -
    -
    -
    -
    -

    먼저 회원가입하신 후, 이용하여 주시기 바랍니다.

    -
    -
    -

    위의 안내 메시지를 확인하신 후, 다시 로그인하시거나 회원가입을 진행해 주시기 바랍니다.

    -
    -
    - 홈으로 -   -   - -   -   - - - 회원가입 - -
    -
    -
    -
    -
    -
    - - - - -
    - - -
    -
    - - - \ No newline at end of file