방선주 방선주 03-12
250312 방선주 PrvcInqHstry throw 삭제 및 주석 수정
@91e20fb39cb6f8cba3c181d34fe5a5128fe1f92f
src/main/java/com/takensoft/cms/accesCtrl/service/Impl/SystemAccesCtrlServiceImpl.java
--- src/main/java/com/takensoft/cms/accesCtrl/service/Impl/SystemAccesCtrlServiceImpl.java
+++ src/main/java/com/takensoft/cms/accesCtrl/service/Impl/SystemAccesCtrlServiceImpl.java
@@ -68,8 +68,8 @@
             return matches(list, path);
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (UnknownHostException uhe) {
-            throw uhe;
+        } catch (UnknownHostException ukhe) {
+            throw new RuntimeException("호스트의 IP정보를 알 수가 없습니다.", ukhe);
         } catch (Exception e) {
             throw e;
         }
src/main/java/com/takensoft/cms/prvcInqHstry/dao/PrvcInqHstryDAO.java
--- src/main/java/com/takensoft/cms/prvcInqHstry/dao/PrvcInqHstryDAO.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/dao/PrvcInqHstryDAO.java
@@ -8,42 +8,46 @@
 import java.util.List;
 
 /**
- * @author  : 박정하
- * @since   : 2024.05.22
+ * @author 박정하
+ * @since 2024.05.22
+ * @modification
+ *     since    |    author    | description
+ *  2024.05.22  |    박정하     | 최초 등록
  *
  * 개인정보 조회 이력 관련 Mapper
  */
 @Mapper("prvcInqHstryDAO")
 public interface PrvcInqHstryDAO {
+
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.22
+     * @param prvcInqHstryVO - 개인정보 조회 이력 VO
+     * @return int - 이력 등록 여부(성공:1, 실패:0)
      *
      * 개인정보 조회 이력 등록
      */
-    public int insertPrvcInqHstry(PrvcInqHstryVO prvcInqHstryVO) throws Exception;
+    int insertPrvcInqHstry(PrvcInqHstryVO prvcInqHstryVO);
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param pagination - 페이징 처리 객체
+     * @return int - 조회된 개인정보 이력 목록 개수
      *
      * 개인정보 조회 이력 목록 갯수
      */
-    public int selectPrvcInqHstryListCnt(Pagination pagination) throws Exception;
+    int selectPrvcInqHstryListCnt(Pagination pagination);
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param pagination - 페이징 처리 객체
+     * @return List<PrvcInqHstryVO> - 조회된 개인정보 이력 목록
      *
      * 개인정보 조회 이력 목록 조회
      */
-    public List<PrvcInqHstryVO> selectPrvcInqHstryList(Pagination pagination) throws Exception;
+    List<PrvcInqHstryVO> selectPrvcInqHstryList(Pagination pagination);
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param inqHstryId - 조회 이력 ID
+     * @return PrvcInqHstryVO - 조회된 개인정보 이력 상세 정보
      *
      * 개인정보 조회 이력 상세 조회
      */
-    public PrvcInqHstryVO selectPrvcInqHstryDetail(int inqHstryId) throws Exception;
+    PrvcInqHstryVO selectPrvcInqHstryDetail(int inqHstryId);
 }
(No newline at end of file)
src/main/java/com/takensoft/cms/prvcInqHstry/service/Impl/PrvcInqHstryServiceImpl.java
--- src/main/java/com/takensoft/cms/prvcInqHstry/service/Impl/PrvcInqHstryServiceImpl.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/service/Impl/PrvcInqHstryServiceImpl.java
@@ -7,80 +7,121 @@
 import com.takensoft.cms.prvcInqHstry.service.PrvcInqHstryService;
 import com.takensoft.cms.prvcInqHstry.vo.PrvcInqHstryVO;
 import com.takensoft.common.Pagination;
+import com.takensoft.common.exception.CustomInsertFailException;
+import com.takensoft.common.exception.CustomNotFoundException;
 import com.takensoft.common.util.CommonUtils;
 import com.takensoft.common.util.JWTUtil;
 import lombok.RequiredArgsConstructor;
 import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
+import org.springframework.dao.DataAccessException;
 import org.springframework.stereotype.Service;
 
 import jakarta.servlet.http.HttpServletRequest;
+
+import java.net.UnknownHostException;
 import java.util.HashMap;
 import java.util.List;
 
 /**
- * @author  : 박정하
- * @since   : 2024.05.22
+ * @author 박정하
+ * @since 2024.05.22
+ * @modification
+ *     since    |    author    | description
+ *  2024.05.22  |    박정하     | 최초 등록
+ *
+ * EgovAbstractServiceImpl - 전자정부 프레임워크에서 제공하는 추상 서비스 구현 클래스
+ * PrvcInqHstryService - 개인정보 조회 이력 관련 서비스 인터페이스
  *
  * 개인정보 조회 이력 관련 구현체
- * EgovAbstractServiceImpl : 전자정부 상속
- * PrvcInqHstryService : 팝업 관련 인터페이스 상속
  */
 @Service("prvcInqHstryService")
 @RequiredArgsConstructor
 public class PrvcInqHstryServiceImpl extends EgovAbstractServiceImpl implements PrvcInqHstryService {
+
     private final JWTUtil jwtUtil;
     private final CommonUtils commonUtils;
     private final PrvcInqHstryDAO prvcInqHstryDAO;
     private final CodeManageService codeManageService;
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.22
+     * @param request - HttpServletRequest 객체
+     * @param prvcInqHstryVO - 개인정보 조회 이력 VO 객체
+     * @return int - 개인정보 조회 이력 등록 여부 (성공:1, 실패:0)
+     * @throws CustomInsertFailException - 등록 실패 예외 발생 시
+     * @throws DataAccessException - 데이터베이스 접근 예외 발생 시
+     * @throws NullPointerException - Null 값이 발생할 경우
+     * @throws Exception - 그 외 예외 발생 시
      *
      * 개인정보 조회 이력 등록
      */
-    public int prvcInqHstryInsert(HttpServletRequest request, PrvcInqHstryVO prvcInqHstryVO) throws Exception {
-        // 조회 아이피 삽입
-        String ipAdd = commonUtils.getIp(request);
-        prvcInqHstryVO.setInqIp(ipAdd);
+    public int prvcInqHstryInsert(HttpServletRequest request, PrvcInqHstryVO prvcInqHstryVO) {
+        try {
+            // 조회 아이피 삽입
+            String ipAdd = commonUtils.getIp(request);
+            prvcInqHstryVO.setInqIp(ipAdd);
 
-        // 조회자 삽입
-        String writer = jwtUtil.getWriter();
-        prvcInqHstryVO.setRdr(writer);
+            // 조회자 삽입
+            String writer = jwtUtil.getWriter();
+            prvcInqHstryVO.setRdr(writer);
 
-        return prvcInqHstryDAO.insertPrvcInqHstry(prvcInqHstryVO);
+            return prvcInqHstryDAO.insertPrvcInqHstry(prvcInqHstryVO);
+        } catch (CustomInsertFailException cife) {
+            throw cife;
+        } catch (DataAccessException dae) {
+            throw dae;
+        } catch (UnknownHostException ukhe) {
+            throw new RuntimeException("호스트의 IP정보를 알 수가 없습니다.", ukhe);
+        } catch (Exception e) {
+            throw e;
+        }
     }
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param params - pagination HashMap
+     * @return HashMap<String, Object> - 검색 결과 목록
+     * @throws DataAccessException - 데이터베이스 접근 예외 발생 시
+     * @throws Exception - 그 외 예외 발생 시
      *
      * 개인정보 조회 이력 목록 조회
      */
     @Override
-    public HashMap<String, Object> prvcInqHstryList(HashMap<String, String> params) throws Exception {
-        Pagination search = new Pagination(0, params);
-        int cnt = prvcInqHstryDAO.selectPrvcInqHstryListCnt(search);
+    public HashMap<String, Object> prvcInqHstryList(HashMap<String, String> params) {
+        try {
+            Pagination search = new Pagination(0, params);
+            int cnt = prvcInqHstryDAO.selectPrvcInqHstryListCnt(search);
 
-        Pagination pagination = new Pagination(cnt, params);
-        List<PrvcInqHstryVO> list = prvcInqHstryDAO.selectPrvcInqHstryList(pagination);
-        List<CodeManageVO> codeList = codeManageService.findByChildCdCache("prvcInqHstry"); // 검색 조건
+            Pagination pagination = new Pagination(cnt, params);
+            List<PrvcInqHstryVO> list = prvcInqHstryDAO.selectPrvcInqHstryList(pagination);
+            List<CodeManageVO> codeList = codeManageService.findByChildCdCache("prvcInqHstry"); // 검색 조건
 
-        HashMap<String, Object> result = new HashMap<>();
-        result.put("list", list);
-        result.put("pagination", pagination);
-        result.put("codeList", codeList);
-        return result;
+            HashMap<String, Object> result = new HashMap<>();
+            result.put("list", list);
+            result.put("pagination", pagination);
+            result.put("codeList", codeList);
+            return result;
+        } catch (DataAccessException dae) {
+            throw dae;
+        } catch (Exception e) {
+            throw e;
+        }
     }
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param inqHstryId - 조회 이력 ID
+     * @return PrvcInqHstryVO - 개인정보 조회 이력 VO 객체
+     * @throws DataAccessException - 데이터베이스 접근 예외 발생 시
+     * @throws Exception - 그 외 예외 발생 시
      *
      * 개인정보 조회 이력 상세 조회
      */
     @Override
-    public PrvcInqHstryVO prvcInqHstryDetail(int inqHstryId) throws Exception {
-        return prvcInqHstryDAO.selectPrvcInqHstryDetail(inqHstryId);
+    public PrvcInqHstryVO prvcInqHstryDetail(int inqHstryId){
+        try {
+            return prvcInqHstryDAO.selectPrvcInqHstryDetail(inqHstryId);
+        } catch (DataAccessException dae) {
+            throw dae;
+        } catch (Exception e) {
+            throw e;
+        }
     }
 }
(No newline at end of file)
src/main/java/com/takensoft/cms/prvcInqHstry/service/PrvcInqHstryService.java
--- src/main/java/com/takensoft/cms/prvcInqHstry/service/PrvcInqHstryService.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/service/PrvcInqHstryService.java
@@ -6,33 +6,37 @@
 import java.util.HashMap;
 
 /**
- * @author  : 박정하
- * @since   : 2024.05.22
+ * @author 박정하
+ * @since 2024.05.22
+ * @modification
+ *     since    |    author    | description
+ *  2024.05.22  |    박정하     | 최초 등록
  *
  * 개인정보 조회 이력 관련 인터페이스
  */
 public interface PrvcInqHstryService {
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.22
+     * @param request - HttpServletRequest 객체
+     * @param prvcInqHstryVO - 개인정보 조회 이력 VO
+     * @return int - 등록 여부 (성공:1, 실패:0)
      *
      * 개인정보 조회 이력 등록
      */
-    public int prvcInqHstryInsert(HttpServletRequest request, PrvcInqHstryVO prvcInqHstryVO) throws Exception;
+    int prvcInqHstryInsert(HttpServletRequest request, PrvcInqHstryVO prvcInqHstryVO);
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param params - Pagination 객체
+     * @return HashMap<String, Object> - 개인정보 죄회 이력 목록
      *
      * 개인정보 조회 이력 목록 조회
      */
-    public HashMap<String, Object> prvcInqHstryList(HashMap<String, String> params) throws Exception;
+    HashMap<String, Object> prvcInqHstryList(HashMap<String, String> params);
 
     /**
-     * @author  : 박정하
-     * @since   : 2024.05.27
+     * @param inqHstryId - 개인정보 조회 이력 ID
+     * @return PrvcInqHstryVO - 개인정보 조회 이력 상세 정보
      *
      * 개인정보 조회 이력 상세 조회
      */
-    public PrvcInqHstryVO prvcInqHstryDetail(int inqHstryId) throws Exception;
+    PrvcInqHstryVO prvcInqHstryDetail(int inqHstryId);
 }
(No newline at end of file)
src/main/java/com/takensoft/cms/prvcInqHstry/vo/PrvcInqHstryVO.java
--- src/main/java/com/takensoft/cms/prvcInqHstry/vo/PrvcInqHstryVO.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/vo/PrvcInqHstryVO.java
@@ -1,29 +1,27 @@
 package com.takensoft.cms.prvcInqHstry.vo;
 
-import lombok.Data;
+import lombok.*;
 
 /**
  * @author  : 박정하
  * @since   : 2024.05.22
+ * @modification
+ *     since    |    author    | description
+ *  2024.05.22  |    박정하     | 최초 등록
  *
  * 개인정보 조회 이력 관련 VO
  */
-@Data
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
 public class PrvcInqHstryVO {
-    // 조회 이력 아이디
-    private int inqHstryId;
-    // 조회 대상자 아이디
-    private String inqTrprId;
-    // 조회 사유
-    private String inqRsn;
-    // 조회 아이피
-    private String inqIp;
-    // 조회자
-    private String rdr;
-    // 조회일
-    private String inqDt;
-    // 조회자 이름
-    private String mbrNm;
-    // 조회 대상자 로그인 아이디
-    private String lgnId;
+    private int inqHstryId;     // 조회 이력 아이디
+    private String inqTrprId;   // 조회 대상자 아이디
+    private String inqRsn;      // 조회 사유
+    private String inqIp;       // 조회 아이피
+    private String rdr;         // 조회자
+    private String inqDt;       // 조회일
+    private String mbrNm;       // 조회자 이름
+    private String lgnId;       // 조회 대상자 로그인 아이디
 }
(No newline at end of file)
src/main/java/com/takensoft/cms/prvcInqHstry/web/PrvcInqHstryController.java
--- src/main/java/com/takensoft/cms/prvcInqHstry/web/PrvcInqHstryController.java
+++ src/main/java/com/takensoft/cms/prvcInqHstry/web/PrvcInqHstryController.java
@@ -32,16 +32,14 @@
     private final ResponseUtil resUtil;
 
     /**
-     * @author 박정하
-     * @since 2024.05.22
-     * @param prvcInqHstryVO
-     * @return
-     * @throws Exception
+     * @param request - HTTP 요청 객체
+     * @param prvcInqHstryVO - 개인정보 조회 이력 VO
+     * @return ResponseEntity - 개인정보 죄회 이력 등록 여부(성공/실패)
      *
      * 개인정보 조회 이력 등록
      */
     @PostMapping("/insertProc.json")
-    public ResponseEntity<?> insertProc(HttpServletRequest request, @RequestBody PrvcInqHstryVO prvcInqHstryVO) throws Exception {
+    public ResponseEntity<?> insertProc(HttpServletRequest request, @RequestBody PrvcInqHstryVO prvcInqHstryVO){
         int result = prvcInqHstryService.prvcInqHstryInsert(request, prvcInqHstryVO);
 
         // 응답 처리
@@ -53,16 +51,13 @@
     }
 
     /**
-     * @author 박정하
-     * @since 2024.05.27
-     * @param params
-     * @return
-     * @throws Exception
+     * @param params - pagination hashmap
+     * @return ResponseEntity - 개인정보 조회 이력 목록
      *
      * 개인정보 조회 이력 목록 조회
      */
     @PostMapping("/listProc.json")
-    public ResponseEntity<?> listProc(@RequestBody HashMap<String, String> params) throws Exception {
+    public ResponseEntity<?> listProc(@RequestBody HashMap<String, String> params){
         HashMap<String, Object> result = prvcInqHstryService.prvcInqHstryList(params);
 
         // 응답 처리
@@ -70,16 +65,13 @@
     }
 
     /**
-     * @author 박정하
-     * @since 2024.05.27
-     * @param prvcInqHstryVO
-     * @return
-     * @throws Exception
+     * @param prvcInqHstryVO - 개인정보 조회 이력 VO
+     * @return ResponseEntity - 개인정보 조회 이력 상세 정보
      *
      * 개인정보 조회 이력 상세 조회
      */
     @PostMapping("/detailProc.json")
-    public ResponseEntity<?> listProc(@RequestBody PrvcInqHstryVO prvcInqHstryVO) throws Exception {
+    public ResponseEntity<?> listProc(@RequestBody PrvcInqHstryVO prvcInqHstryVO){
         PrvcInqHstryVO result = prvcInqHstryService.prvcInqHstryDetail(prvcInqHstryVO.getInqHstryId());
 
         // 응답 처리
src/main/java/com/takensoft/cms/search/service/Impl/SearchServiceImpl.java
--- src/main/java/com/takensoft/cms/search/service/Impl/SearchServiceImpl.java
+++ src/main/java/com/takensoft/cms/search/service/Impl/SearchServiceImpl.java
@@ -66,8 +66,6 @@
             return searchResultVO;
         } catch (DataAccessException dae) {
             throw dae;
-        } catch(NullPointerException npe) {
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -177,8 +175,6 @@
             }
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -245,8 +241,6 @@
             }
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -287,8 +281,6 @@
             }
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -329,8 +321,6 @@
             }
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -372,8 +362,6 @@
             }
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -397,8 +385,6 @@
             searchMenu.setTotalListCount(totalListCount);
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
         } catch (Exception e) {
             throw e;
         }
@@ -427,9 +413,7 @@
             contentList.add(searchContentVO);
         } catch (DataAccessException dae) {
             throw dae;
-        } catch (NullPointerException npe){
-            throw npe;
-        } catch (Exception e) {
+        }  catch (Exception e) {
             throw e;
         }
     }
Add a comment
List