feat: 관리자 - 컨텐츠관리 - 건설기준연구 관리에서 수정 기능 구현 back-end
parent
e2e4c075b7
commit
8797ad9570
|
|
@ -39,7 +39,7 @@ public class AdminStandardResearchController {
|
|||
@Operation(
|
||||
summary = "'건설기준연구 관리' 페이지에서 목록 불러오는 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 목록 불러오는 API",
|
||||
tags = {"PopUpApiController"}
|
||||
tags = {"AdminStandardResearchController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
|
|
@ -76,9 +76,9 @@ public class AdminStandardResearchController {
|
|||
|
||||
|
||||
@Operation(
|
||||
summary = "팝업 추가 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 팝업을 추가하는 API",
|
||||
tags = {"PopUpApiController"}
|
||||
summary = "추가 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 항목을 추가하는 API",
|
||||
tags = {"AdminStandardResearchController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||
|
|
@ -118,26 +118,26 @@ public class AdminStandardResearchController {
|
|||
|
||||
|
||||
@Operation(
|
||||
summary = "팝업 수정 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 팝업을 수정하는 API",
|
||||
tags = {"PopUpApiController"}
|
||||
summary = "수정 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 항목을 수정하는 API",
|
||||
tags = {"AdminStandardResearchController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
|
||||
})
|
||||
@PutMapping(value = "/contents/standard-research/{popupId}")
|
||||
@PutMapping(value = "/contents/standard-research/{rsId}")
|
||||
public ResultVO contentsStandardResearchUpdate(
|
||||
HttpServletRequest request,
|
||||
@AuthenticationPrincipal LoginVO loginVO,
|
||||
UpdateStandardResearchVO updateStandardResearchVO,
|
||||
@PathVariable("popupId") Long popupId
|
||||
@PathVariable("rsId") Long rsId
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
||||
try {
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchUpdate(resultVO, request, loginVO, updateStandardResearchVO, popupId);
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchUpdate(resultVO, request, loginVO, updateStandardResearchVO, rsId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
|
|
@ -159,26 +159,26 @@ public class AdminStandardResearchController {
|
|||
|
||||
|
||||
@Operation(
|
||||
summary = "팝업 비활성화 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 팝업을 비활성화 API. 삭제가 아닌 비활성화 임. 삭제는 없음.",
|
||||
tags = {"PopUpApiController"}
|
||||
summary = "삭제 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 항목을 삭제하는 API",
|
||||
tags = {"AdminStandardResearchController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "등록 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
|
||||
})
|
||||
@DeleteMapping(value = "/contents/standard-research/{popupId}")
|
||||
@DeleteMapping(value = "/contents/standard-research/{rsId}")
|
||||
public ResultVO contentsStandardResearchDelete
|
||||
(
|
||||
@AuthenticationPrincipal LoginVO user,
|
||||
HttpServletRequest request,
|
||||
@PathVariable("popupId") String strPopupId
|
||||
@PathVariable("rsId") String strPopupId
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Long popupId = Long.valueOf(strPopupId);
|
||||
Long rsId = Long.valueOf(strPopupId);
|
||||
try {
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchDelete(resultVO, request, user, popupId);
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchDelete(resultVO, request, user, rsId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
|
|
@ -198,24 +198,24 @@ public class AdminStandardResearchController {
|
|||
|
||||
|
||||
@Operation(
|
||||
summary = "팝업 내용 불러오기 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 저장된 팝업을 불러오는 API",
|
||||
tags = {"PopUpApiController"}
|
||||
summary = "내용 불러오기 API",
|
||||
description = "관리자 단에서 '컨텐츠 관리' > '건설기준연구 관리' 페이지에서 저장된 항목을 불러오는 API",
|
||||
tags = {"AdminStandardResearchController"}
|
||||
)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "조회 성공")
|
||||
})
|
||||
@GetMapping(value = "/contents/standard-research/{popupId}")
|
||||
@GetMapping(value = "/contents/standard-research/{rsId}")
|
||||
public ResultVO contentsStandardResearchRead(
|
||||
HttpServletRequest request,
|
||||
@AuthenticationPrincipal LoginVO loginVO,
|
||||
@PathVariable("popupId") Long popupId
|
||||
@PathVariable("rsId") Long rsId
|
||||
) throws Exception {
|
||||
|
||||
ResultVO resultVO = new ResultVO();
|
||||
|
||||
try {
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchRead(resultVO, request, loginVO, popupId);
|
||||
resultVO = adminStandardResearchService.contentsStandardResearchRead(resultVO, request, loginVO, rsId);
|
||||
} catch (Exception e) {
|
||||
resultVO.setResultCode(ResponseCode.FAILED.getCode());
|
||||
resultVO.setResultMessage(e.getMessage());
|
||||
|
|
|
|||
|
|
@ -106,15 +106,6 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
// 첨부파일 관련 첨부파일ID 생성
|
||||
List<FileVO> _result = null;
|
||||
String _atchFileId = "";
|
||||
|
||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||
|
||||
if (!files.isEmpty()) {
|
||||
//_atchFileId = fileMngService.insertFileInfs(_result); //파일이 생성되고나면 생성된 첨부파일 ID를 리턴한다.
|
||||
}
|
||||
|
||||
Map<String, Object> response = tnResearchRepository.spAddTnResearch(
|
||||
createStandardResearchVO.getTitle(),
|
||||
|
|
@ -167,10 +158,10 @@ public class AdminStandardResearchServiceImpl extends EgovAbstractServiceImpl im
|
|||
dto.put("effectContent", tnResearch.getRsEffect());
|
||||
dto.put("id", tnResearch.getRsSeq());
|
||||
dto.put("purpose", tnResearch.getRsPurpose());
|
||||
dto.put("researchEndDate", tnResearch.getRsEndDate().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
||||
dto.put("researchStartDate", tnResearch.getRsStartDate().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시 - yyyyMMddHHmmss
|
||||
dto.put("researchEndDate", tnResearch.getRsEndDate().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 시작 일시 - yyyyMMddHHmmss
|
||||
dto.put("researchStartDate", tnResearch.getRsStartDate().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시 - yyyyMMddHHmmss
|
||||
dto.put("title", tnResearch.getRsTitle());
|
||||
dto.put("updateDate", tnResearch.getLastChgDt().plusHours(9).format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); // 날짜/시간의 종료 일시 - yyyyMMddHHmmss
|
||||
dto.put("updateDate", tnResearch.getLastChgDt()); // 날짜/시간의 종료 일시 - yyyyMMddHHmmss
|
||||
dto.put("updateUserId", tnResearch.getLastChgId());
|
||||
dto.put("useYn", tnResearch.getUseYn());
|
||||
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ public interface TnResearchRepository extends JpaRepository<TnResearch, Long> {
|
|||
|
||||
@Query(value = "CALL sp_add_tn_research (" +
|
||||
":_rs_title, " +
|
||||
"TO_TIMESTAMP(" +
|
||||
"TO_DATE(" +
|
||||
" :_rs_start_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"TO_TIMESTAMP(" +
|
||||
"), " +
|
||||
"TO_DATE(" +
|
||||
" :_rs_end_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"), " +
|
||||
":_rs_director, " +
|
||||
":_rs_purpose, " +
|
||||
":_rs_contents, " +
|
||||
|
|
@ -47,14 +47,14 @@ public interface TnResearchRepository extends JpaRepository<TnResearch, Long> {
|
|||
|
||||
@Query(value = "CALL sp_update_tn_research (" +
|
||||
":_rs_seq, " +
|
||||
"TO_TIMESTAMP(" +
|
||||
"TO_DATE(" +
|
||||
" :_rs_start_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"TO_TIMESTAMP(" +
|
||||
"), " +
|
||||
"TO_DATE(" +
|
||||
" :_rs_end_date," +
|
||||
" 'YYYYMMDDHH24MISS'" +
|
||||
")::::timestamptz AT TIME ZONE 'UTC', " +
|
||||
"), " +
|
||||
":_rs_director, " +
|
||||
":_rs_purpose, " +
|
||||
":_rs_contents, " +
|
||||
|
|
|
|||
Loading…
Reference in New Issue