[사이트관리 > 게시판사용관리] 롬복 생성자 기반 종속성 주입

main
이백행 1 year ago
parent c4bd52ec02
commit 0598be50d7

@ -24,10 +24,11 @@ import egovframework.let.cop.com.service.BoardUseInfVO;
* 2009.04.02 * 2009.04.02
* 2011.05.31 JJY * 2011.05.31 JJY
* 2024.08.12 (Problems) * 2024.08.12 (Problems)
* 2024.08.29
* *
* </pre> * </pre>
*/ */
@Repository("BBSUseInfoManageDAO") @Repository
public class BBSUseInfoManageDAO extends EgovAbstractMapper { public class BBSUseInfoManageDAO extends EgovAbstractMapper {
/** /**

@ -5,184 +5,198 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;
import egovframework.let.cop.com.service.BoardUseInf; import egovframework.let.cop.com.service.BoardUseInf;
import egovframework.let.cop.com.service.BoardUseInfVO; import egovframework.let.cop.com.service.BoardUseInfVO;
import egovframework.let.cop.com.service.EgovBBSUseInfoManageService; import egovframework.let.cop.com.service.EgovBBSUseInfoManageService;
import lombok.RequiredArgsConstructor;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/** /**
* *
*
* @author * @author
* @since 2009.04.02 * @since 2009.04.02
* @version 1.0 * @version 1.0
* @see * @see
* *
* <pre> * <pre>
* << (Modification Information) >> * << (Modification Information) >>
* *
* *
* ------- -------- --------------------------- * ------- -------- ---------------------------
* 2009.04.02 * 2009.04.02
* 2011.08.31 JJY 릿 * 2011.08.31 JJY 릿
* 2024.08.29
* *
* </pre> * </pre>
*/ */
@Service("EgovBBSUseInfoManageService") @Service
@RequiredArgsConstructor
public class EgovBBSUseInfoManageServiceImpl extends EgovAbstractServiceImpl implements EgovBBSUseInfoManageService { public class EgovBBSUseInfoManageServiceImpl extends EgovAbstractServiceImpl implements EgovBBSUseInfoManageService {
@Resource(name = "BBSUseInfoManageDAO") // @Resource(name = "BBSUseInfoManageDAO")
private BBSUseInfoManageDAO bbsUseDAO; // private BBSUseInfoManageDAO bbsUseDAO;
private final BBSUseInfoManageDAO bbsUseInfoManageDAO;
/**
* . /**
* * .
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#deleteBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf) *
*/ * @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#deleteBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
public void deleteBBSUseInf(BoardUseInf bdUseInf) throws Exception { */
bbsUseDAO.deleteBBSUseInf(bdUseInf); @Override
} public void deleteBBSUseInf(BoardUseInf bdUseInf) throws Exception {
bbsUseInfoManageDAO.deleteBBSUseInf(bdUseInf);
/** }
* .
* /**
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#insertBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf) * .
*/ *
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception { * @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#insertBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
bbsUseDAO.insertBBSUseInf(bdUseInf); */
} @Override
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception {
/** bbsUseInfoManageDAO.insertBBSUseInf(bdUseInf);
* . }
*
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInfs(egovframework.let.cop.bbs.com.service.BoardUseInfVO) /**
*/ * .
public Map<String, Object> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception { *
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInfs(egovframework.let.cop.bbs.com.service.BoardUseInfVO)
List<BoardUseInfVO> result = bbsUseDAO.selectBBSUseInfs(bdUseVO); */
int cnt = bbsUseDAO.selectBBSUseInfsCnt(bdUseVO); @Override
public Map<String, Object> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
List<BoardUseInfVO> result = bbsUseInfoManageDAO.selectBBSUseInfs(bdUseVO);
map.put("resultList", result); int cnt = bbsUseInfoManageDAO.selectBBSUseInfsCnt(bdUseVO);
map.put("resultCnt", Integer.toString(cnt));
Map<String, Object> map = new HashMap<String, Object>();
return map;
} map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
/**
* . return map;
* }
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#updateBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
*/ /**
public void updateBBSUseInf(BoardUseInf bdUseInf) throws Exception { * .
bbsUseDAO.updateBBSUseInf(bdUseInf); *
} * @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#updateBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
*/
/** @Override
* . public void updateBBSUseInf(BoardUseInf bdUseInf) throws Exception {
* bbsUseInfoManageDAO.updateBBSUseInf(bdUseInf);
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInfVO) }
*/
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception { /**
return bbsUseDAO.selectBBSUseInf(bdUseVO); * .
} *
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#selectBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInfVO)
/** */
* . @Override
* public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception {
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInf) return bbsUseInfoManageDAO.selectBBSUseInf(bdUseVO);
*/
public void deleteBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseDAO.selectBBSUseInfByClub(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = (BoardUseInf)iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
//bdUseInf.setTrgetId(bdUseVO.getClbId()); // 사용자 ID를 넘겨야 함..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseDAO.deleteBBSUseInf(bdUseInf);
} }
}
/**
/** * .
* . *
* * @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInf)
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByCmmnty(egovframework.let.cop.com.service.BoardUseInf) */
*/ @Override
public void deleteBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception { public void deleteBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseDAO.selectBBSUseInfByCmmnty(bdUseVO); List<BoardUseInf> result = bbsUseInfoManageDAO.selectBBSUseInfByClub(bdUseVO);
BoardUseInf bdUseInf = null; BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator(); Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
while (iter.hasNext()) { bdUseInf = iter.next();
bdUseInf = (BoardUseInf)iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId()); // bdUseInf.setTrgetId(bdUseVO.getClbId()); // 사용자 ID를 넘겨야 함..
//bdUseInf.setTrgetId(bdUseVO.getCmmntyId()); // 사용자 ID를 넘겨야 함.. bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseInfoManageDAO.deleteBBSUseInf(bdUseInf);
bbsUseDAO.deleteBBSUseInf(bdUseInf); }
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByCmmnty(egovframework.let.cop.com.service.BoardUseInf)
*/
@Override
public void deleteBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseInfoManageDAO.selectBBSUseInfByCmmnty(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
// bdUseInf.setTrgetId(bdUseVO.getCmmntyId()); // 사용자 ID를 넘겨야 함..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseInfoManageDAO.deleteBBSUseInf(bdUseInf);
}
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInfVO)
*/
@Override
public void deleteAllBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
bbsUseInfoManageDAO.deleteAllBBSUseInfByClub(bdUseVO);
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByCmmnty(egovframework.let.cop.com.service.BoardUseInfVO)
*/
@Override
public void deleteAllBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
bbsUseInfoManageDAO.deleteAllBBSUseInfByCmmnty(bdUseVO);
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByBoardId(egovframework.let.cop.com.service.BoardUseInf)
*/
@Override
public void deleteBBSUseInfByBoardId(BoardUseInf bdUseInf) throws Exception {
bbsUseInfoManageDAO.deleteBBSUseInfByBoardId(bdUseInf);
}
/**
* , .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#selectBBSUseInfsByTrget(egovframework.let.cop.com.service.BoardUseInfVO)
*/
@Override
public Map<String, Object> selectBBSUseInfsByTrget(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInfVO> result = bbsUseInfoManageDAO.selectBBSUseInfsByTrget(bdUseVO);
int cnt = bbsUseInfoManageDAO.selectBBSUseInfsCntByTrget(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* , .
*/
@Override
public void updateBBSUseInfByTrget(BoardUseInf bdUseInf) throws Exception {
bbsUseInfoManageDAO.updateBBSUseInfByTrget(bdUseInf);
} }
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInfVO)
*/
public void deleteAllBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
bbsUseDAO.deleteAllBBSUseInfByClub(bdUseVO);
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteAllBBSUseInfByCmmnty(egovframework.let.cop.com.service.BoardUseInfVO)
*/
public void deleteAllBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
bbsUseDAO.deleteAllBBSUseInfByCmmnty(bdUseVO);
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByBoardId(egovframework.let.cop.com.service.BoardUseInf)
*/
public void deleteBBSUseInfByBoardId(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.deleteBBSUseInfByBoardId(bdUseInf);
}
/**
* , .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#selectBBSUseInfsByTrget(egovframework.let.cop.com.service.BoardUseInfVO)
*/
public Map<String, Object> selectBBSUseInfsByTrget(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInfVO> result = bbsUseDAO.selectBBSUseInfsByTrget(bdUseVO);
int cnt = bbsUseDAO.selectBBSUseInfsCntByTrget(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
map.put("resultList", result);
map.put("resultCnt", Integer.toString(cnt));
return map;
}
/**
* , .
*/
public void updateBBSUseInfByTrget(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.updateBBSUseInfByTrget(bdUseInf);
}
} }

@ -3,12 +3,10 @@ package egovframework.let.cop.com.web;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.egovframe.rte.fdl.property.EgovPropertyService; import org.egovframe.rte.fdl.property.EgovPropertyService;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -20,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springmodules.validation.commons.DefaultBeanValidator; import org.springmodules.validation.commons.DefaultBeanValidator;
import egovframework.com.cmm.EgovMessageSource;
import egovframework.com.cmm.LoginVO; import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.ResponseCode; import egovframework.com.cmm.ResponseCode;
import egovframework.com.cmm.service.ResultVO; import egovframework.com.cmm.service.ResultVO;
@ -38,48 +35,51 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
/** /**
* *
*
* @author * @author
* @since 2009.04.02 * @since 2009.04.02
* @version 1.0 * @version 1.0
* @see * @see
* *
* <pre> * <pre>
* << (Modification Information) >> * << (Modification Information) >>
* *
* *
* ------- -------- --------------------------- * ------- -------- ---------------------------
* 2009.04.02 * 2009.04.02
* 2011.08.31 JJY 릿 * 2011.08.31 JJY 릿
* 2024.08.29
* *
* </pre> * </pre>
*/ */
@RestController @RestController
@Tag(name="EgovBBSUseInfoManageApiController",description = "게시판 이용정보 관리") @Tag(name = "EgovBBSUseInfoManageApiController", description = "게시판 이용정보 관리")
@RequiredArgsConstructor
public class EgovBBSUseInfoManageApiController { public class EgovBBSUseInfoManageApiController {
/** EgovBBSUseInfoManageService */ /** EgovBBSUseInfoManageService */
@Resource(name = "EgovBBSUseInfoManageService") // @Resource(name = "EgovBBSUseInfoManageService")
private EgovBBSUseInfoManageService bbsUseService; // private EgovBBSUseInfoManageService bbsUseService;
private final EgovBBSUseInfoManageService egovBBSUseInfoManageService;
/** EgovPropertyService */ /** EgovPropertyService */
@Resource(name = "propertiesService") // @Resource(name = "propertiesService")
protected EgovPropertyService propertyService; // protected EgovPropertyService propertyService;
private final EgovPropertyService egovPropertyService;
/** EgovBBSAttributeManageService */ /** EgovBBSAttributeManageService */
@Resource(name = "EgovBBSAttributeManageService") // @Resource(name = "EgovBBSAttributeManageService")
private EgovBBSAttributeManageService bbsAttrbService; // private EgovBBSAttributeManageService bbsAttrbService;
private final EgovBBSAttributeManageService bbsAttributeManageService;
/** DefaultBeanValidator */ /** DefaultBeanValidator */
@Autowired // @Autowired
private DefaultBeanValidator beanValidator; // private DefaultBeanValidator beanValidator;
private final DefaultBeanValidator beanValidator;
/** EgovMessageSource */
@Resource(name = "egovMessageSource")
EgovMessageSource egovMessageSource;
/** /**
* . * .
@ -89,35 +89,23 @@ public class EgovBBSUseInfoManageApiController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Operation( @Operation(summary = "게시판 사용정보 목록 조회", description = "게시판 사용정보 목록을 조회", security = {
summary = "게시판 사용정보 목록 조회", @SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
description = "게시판 사용정보 목록을 조회", @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"),
security = {@SecurityRequirement(name = "Authorization")}, @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") })
tags = {"EgovBBSUseInfoManageApiController"} @GetMapping(value = "/bbsUseInf")
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
})
@GetMapping(value ="/bbsUseInf")
public ResultVO selectBBSUseInfs(HttpServletRequest request, public ResultVO selectBBSUseInfs(HttpServletRequest request,
@Parameter( @Parameter(in = ParameterIn.QUERY, schema = @Schema(type = "object", additionalProperties = Schema.AdditionalPropertiesValue.TRUE, ref = "#/components/schemas/searchMap"), style = ParameterStyle.FORM, explode = Explode.TRUE) @RequestParam Map<String, Object> commandMap)
in = ParameterIn.QUERY, throws Exception {
schema = @Schema(type = "object",
additionalProperties = Schema.AdditionalPropertiesValue.TRUE,
ref = "#/components/schemas/searchMap"),
style = ParameterStyle.FORM,
explode = Explode.TRUE
) @RequestParam Map<String, Object> commandMap) throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
BoardUseInfVO bdUseVO = new BoardUseInfVO(); BoardUseInfVO bdUseVO = new BoardUseInfVO();
Map<String, Object> resultMap = new HashMap<String, Object>(); Map<String, Object> resultMap = new HashMap<String, Object>();
bdUseVO.setSearchWrd((String)commandMap.get("searchWrd")); bdUseVO.setSearchWrd((String) commandMap.get("searchWrd"));
bdUseVO.setPageUnit(propertyService.getInt("Globals.pageUnit")); bdUseVO.setPageUnit(egovPropertyService.getInt("Globals.pageUnit"));
bdUseVO.setPageSize(propertyService.getInt("Globals.pageSize")); bdUseVO.setPageSize(egovPropertyService.getInt("Globals.pageSize"));
PaginationInfo paginationInfo = new PaginationInfo(); PaginationInfo paginationInfo = new PaginationInfo();
@ -129,8 +117,8 @@ public class EgovBBSUseInfoManageApiController {
bdUseVO.setLastIndex(paginationInfo.getLastRecordIndex()); bdUseVO.setLastIndex(paginationInfo.getLastRecordIndex());
bdUseVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); bdUseVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = bbsUseService.selectBBSUseInfs(bdUseVO); Map<String, Object> map = egovBBSUseInfoManageService.selectBBSUseInfs(bdUseVO);
int totCnt = Integer.parseInt((String)map.get("resultCnt")); int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt); paginationInfo.setTotalRecordCount(totCnt);
@ -147,26 +135,21 @@ public class EgovBBSUseInfoManageApiController {
/** /**
* *
*
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Operation( @Operation(summary = "미사용 게시판 속성정보 목록 조회", description = "사용중이지 않은 게시판 속성 정보의 목록을 조회", security = {
summary = "미사용 게시판 속성정보 목록 조회", @SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
description = "사용중이지 않은 게시판 속성 정보의 목록을 조회", @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공") })
security = {@SecurityRequirement(name = "Authorization")}, @GetMapping(value = "/notUsedBbsMaster")
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공")
})
@GetMapping(value ="/notUsedBbsMaster")
public ResultVO selectNotUsedBdMstrList() throws Exception { public ResultVO selectNotUsedBdMstrList() throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
BoardMasterVO boardMasterVO = new BoardMasterVO(); BoardMasterVO boardMasterVO = new BoardMasterVO();
boardMasterVO.setFirstIndex(0); boardMasterVO.setFirstIndex(0);
Map<String, Object> resultMap = bbsAttrbService.selectNotUsedBdMstrList(boardMasterVO); Map<String, Object> resultMap = bbsAttributeManageService.selectNotUsedBdMstrList(boardMasterVO);
resultVO.setResult(resultMap); resultVO.setResult(resultMap);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode()); resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
@ -183,43 +166,35 @@ public class EgovBBSUseInfoManageApiController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Operation( @Operation(summary = "게시판 사용정보 상세 조회", description = "게시판 사용정보에 대한 상세정보를 조회", security = {
summary = "게시판 사용정보 상세 조회", @SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
description = "게시판 사용정보에 대한 상세정보를 조회", @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"),
security = {@SecurityRequirement(name = "Authorization")}, @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") })
tags = {"EgovBBSUseInfoManageApiController"} @GetMapping(value = "/bbsUseInf/{trgetId}/{bbsId}")
) public ResultVO selectBBSUseInf(HttpServletRequest request,
@ApiResponses(value = { @Parameter(name = "trgetId", description = "대상시스템 Id", in = ParameterIn.PATH, example = "SYSTEM_DEFAULT_BOARD") @PathVariable("trgetId") String trgetId,
@ApiResponse(responseCode = "200", description = "조회 성공"), @Parameter(name = "bbsId", description = "게시판 Id", in = ParameterIn.PATH, example = "BBSMSTR_AAAAAAAAAAAA") @PathVariable("bbsId") String bbsId)
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") throws Exception {
})
@GetMapping(value ="/bbsUseInf/{trgetId}/{bbsId}")
public ResultVO selectBBSUseInf(HttpServletRequest request,
@Parameter(name = "trgetId", description = "대상시스템 Id", in = ParameterIn.PATH, example="SYSTEM_DEFAULT_BOARD")
@PathVariable("trgetId") String trgetId,
@Parameter(name = "bbsId", description = "게시판 Id", in = ParameterIn.PATH, example="BBSMSTR_AAAAAAAAAAAA")
@PathVariable("bbsId") String bbsId
)throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
BoardUseInfVO bdUseVO = new BoardUseInfVO(); BoardUseInfVO bdUseVO = new BoardUseInfVO();
Map<String, Object> resultMap = new HashMap<String, Object>(); Map<String, Object> resultMap = new HashMap<String, Object>();
bdUseVO.setBbsId(bbsId); bdUseVO.setBbsId(bbsId);
bdUseVO.setTrgetId(trgetId); bdUseVO.setTrgetId(trgetId);
BoardUseInfVO vo = bbsUseService.selectBBSUseInf(bdUseVO);// bbsItrgetId BoardUseInfVO vo = egovBBSUseInfoManageService.selectBBSUseInf(bdUseVO);// bbsItrgetId
// 시스템 사용 게시판의 경우 URL 표시 // 시스템 사용 게시판의 경우 URL 표시
if ("SYSTEM_DEFAULT_BOARD".equals(vo.getTrgetId())) { if ("SYSTEM_DEFAULT_BOARD".equals(vo.getTrgetId())) {
if (vo.getBbsTyCode().equals("BBST02")) { // 익명게시판 if (vo.getBbsTyCode().equals("BBST02")) { // 익명게시판
} else { } else {
vo.setProvdUrl("bbsUseInf/" + trgetId + "/" + bbsId);//bbsId 값을 따로 넘겨줘야 함 vo.setProvdUrl("bbsUseInf/" + trgetId + "/" + bbsId);// bbsId 값을 따로 넘겨줘야 함
} }
} }
BoardMasterVO boardMasterVO = new BoardMasterVO(); BoardMasterVO boardMasterVO = new BoardMasterVO();
resultMap = bbsAttrbService.selectNotUsedBdMstrList(boardMasterVO); resultMap = bbsAttributeManageService.selectNotUsedBdMstrList(boardMasterVO);
resultMap.put("bdUseVO", vo); resultMap.put("bdUseVO", vo);
@ -233,29 +208,20 @@ public class EgovBBSUseInfoManageApiController {
/** /**
* . * .
* *
* @param request * @param request
* @param bdUseVO * @param bdUseVO
* @param bindingResult * @param bindingResult
* @return ResultVO * @return ResultVO
* @throws Exception * @throws Exception
*/ */
@Operation( @Operation(summary = "게시판 사용정보 등록", description = " 게시판 사용정보를 등록", security = {
summary = "게시판 사용정보 등록", @SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
description = " 게시판 사용정보를 등록", @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "등록 성공"),
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "등록 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"), @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류") @ApiResponse(responseCode = "900", description = "입력값 무결성 오류") })
}) @PostMapping(value = "/bbsUseInf")
@PostMapping(value ="/bbsUseInf") public ResultVO insertBBSUseInf(HttpServletRequest request, BoardUseInfVO bdUseVO, BindingResult bindingResult,
public ResultVO insertBBSUseInf(HttpServletRequest request, @Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO) throws Exception {
BoardUseInfVO bdUseVO,
BindingResult bindingResult,
@Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO
) throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
@ -278,7 +244,7 @@ public class EgovBBSUseInfoManageApiController {
bdUseVO.setUseAt("Y"); bdUseVO.setUseAt("Y");
bdUseVO.setFrstRegisterId(loginVO.getUniqId()); bdUseVO.setFrstRegisterId(loginVO.getUniqId());
bbsUseService.insertBBSUseInf(bdUseVO); egovBBSUseInfoManageService.insertBBSUseInf(bdUseVO);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode()); resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage()); resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
@ -295,28 +261,19 @@ public class EgovBBSUseInfoManageApiController {
* @return ResultVO * @return ResultVO
* @throws Exception * @throws Exception
*/ */
@Operation( @Operation(summary = "게시판 사용정보 수정", description = " 게시판 사용정보를 수정", security = {
summary = "게시판 사용정보 수정", @SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
description = " 게시판 사용정보를 수정", @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "수정 성공"),
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "수정 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"), @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류") @ApiResponse(responseCode = "900", description = "입력값 무결성 오류") })
}) @PutMapping(value = "/bbsUseInf/{bbsId}")
@PutMapping(value ="/bbsUseInf/{bbsId}") public ResultVO updateBBSUseInf(HttpServletRequest request, @RequestBody BoardUseInfVO bdUseVO,
public ResultVO updateBBSUseInf(HttpServletRequest request, @Parameter(name = "bbsId", description = "게시판 Id", in = ParameterIn.PATH, example = "BBSMSTR_AAAAAAAAAAAA") @PathVariable("bbsId") String bbsId,
@RequestBody BoardUseInfVO bdUseVO, @Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO) throws Exception {
@Parameter(name = "bbsId", description = "게시판 Id", in = ParameterIn.PATH, example="BBSMSTR_AAAAAAAAAAAA")
@PathVariable("bbsId") String bbsId,
@Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO
) throws Exception {
ResultVO resultVO = new ResultVO(); ResultVO resultVO = new ResultVO();
bdUseVO.setBbsId(bbsId); bdUseVO.setBbsId(bbsId);
bbsUseService.updateBBSUseInf(bdUseVO); egovBBSUseInfoManageService.updateBBSUseInf(bdUseVO);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode()); resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage()); resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());

Loading…
Cancel
Save