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

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

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

@ -5,184 +5,198 @@ import java.util.Iterator;
import java.util.List;
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.BoardUseInfVO;
import egovframework.let.cop.com.service.EgovBBSUseInfoManageService;
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
/**
*
*
* @author
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* <pre>
* << (Modification Information) >>
*
*
* ------- -------- ---------------------------
* 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 {
@Resource(name = "BBSUseInfoManageDAO")
private BBSUseInfoManageDAO bbsUseDAO;
/**
* .
*
* @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);
}
/**
* .
*
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#insertBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
*/
public void insertBBSUseInf(BoardUseInf bdUseInf) throws Exception {
bbsUseDAO.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 {
List<BoardUseInfVO> result = bbsUseDAO.selectBBSUseInfs(bdUseVO);
int cnt = bbsUseDAO.selectBBSUseInfsCnt(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
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#selectBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInfVO)
*/
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception {
return bbsUseDAO.selectBBSUseInf(bdUseVO);
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInf)
*/
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);
// @Resource(name = "BBSUseInfoManageDAO")
// private BBSUseInfoManageDAO bbsUseDAO;
private final BBSUseInfoManageDAO bbsUseInfoManageDAO;
/**
* .
*
* @see egovframework.let.cop.bbs.com.service.EgovBBSUseInfoManageService#deleteBBSUseInf(egovframework.let.cop.bbs.com.service.BoardUseInf)
*/
@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)
*/
@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)
*/
@Override
public Map<String, Object> selectBBSUseInfs(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInfVO> result = bbsUseInfoManageDAO.selectBBSUseInfs(bdUseVO);
int cnt = bbsUseInfoManageDAO.selectBBSUseInfsCnt(bdUseVO);
Map<String, Object> map = new HashMap<String, Object>();
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)
*/
@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)
*/
@Override
public BoardUseInfVO selectBBSUseInf(BoardUseInfVO bdUseVO) throws Exception {
return bbsUseInfoManageDAO.selectBBSUseInf(bdUseVO);
}
}
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByCmmnty(egovframework.let.cop.com.service.BoardUseInf)
*/
public void deleteBBSUseInfByCmmnty(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseDAO.selectBBSUseInfByCmmnty(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = (BoardUseInf)iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
//bdUseInf.setTrgetId(bdUseVO.getCmmntyId()); // 사용자 ID를 넘겨야 함..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseDAO.deleteBBSUseInf(bdUseInf);
/**
* .
*
* @see egovframework.let.cop.com.service.EgovBBSUseInfoManageService#deleteBBSUseInfByClub(egovframework.let.cop.com.service.BoardUseInf)
*/
@Override
public void deleteBBSUseInfByClub(BoardUseInfVO bdUseVO) throws Exception {
List<BoardUseInf> result = bbsUseInfoManageDAO.selectBBSUseInfByClub(bdUseVO);
BoardUseInf bdUseInf = null;
Iterator<BoardUseInf> iter = result.iterator();
while (iter.hasNext()) {
bdUseInf = iter.next();
bdUseInf.setLastUpdusrId(bdUseVO.getLastUpdusrId());
// bdUseInf.setTrgetId(bdUseVO.getClbId()); // 사용자 ID를 넘겨야 함..
bdUseInf.setTrgetId(bdUseVO.getTrgetId());
bbsUseInfoManageDAO.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.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.egovframe.rte.fdl.property.EgovPropertyService;
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.validation.BindingResult;
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.springmodules.validation.commons.DefaultBeanValidator;
import egovframework.com.cmm.EgovMessageSource;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.ResponseCode;
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.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
/**
*
*
* @author
* @since 2009.04.02
* @version 1.0
* @see
*
* <pre>
* <pre>
* << (Modification Information) >>
*
*
* ------- -------- ---------------------------
* 2009.04.02
* 2011.08.31 JJY 릿
* 2011.08.31 JJY 릿
* 2024.08.29
*
* </pre>
* </pre>
*/
@RestController
@Tag(name="EgovBBSUseInfoManageApiController",description = "게시판 이용정보 관리")
@Tag(name = "EgovBBSUseInfoManageApiController", description = "게시판 이용정보 관리")
@RequiredArgsConstructor
public class EgovBBSUseInfoManageApiController {
/** EgovBBSUseInfoManageService */
@Resource(name = "EgovBBSUseInfoManageService")
private EgovBBSUseInfoManageService bbsUseService;
// @Resource(name = "EgovBBSUseInfoManageService")
// private EgovBBSUseInfoManageService bbsUseService;
private final EgovBBSUseInfoManageService egovBBSUseInfoManageService;
/** EgovPropertyService */
@Resource(name = "propertiesService")
protected EgovPropertyService propertyService;
// @Resource(name = "propertiesService")
// protected EgovPropertyService propertyService;
private final EgovPropertyService egovPropertyService;
/** EgovBBSAttributeManageService */
@Resource(name = "EgovBBSAttributeManageService")
private EgovBBSAttributeManageService bbsAttrbService;
// @Resource(name = "EgovBBSAttributeManageService")
// private EgovBBSAttributeManageService bbsAttrbService;
private final EgovBBSAttributeManageService bbsAttributeManageService;
/** DefaultBeanValidator */
@Autowired
private DefaultBeanValidator beanValidator;
/** EgovMessageSource */
@Resource(name = "egovMessageSource")
EgovMessageSource egovMessageSource;
// @Autowired
// private DefaultBeanValidator beanValidator;
private final DefaultBeanValidator beanValidator;
/**
* .
@ -89,35 +89,23 @@ public class EgovBBSUseInfoManageApiController {
* @return
* @throws Exception
*/
@Operation(
summary = "게시판 사용정보 목록 조회",
description = "게시판 사용정보 목록을 조회",
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
})
@GetMapping(value ="/bbsUseInf")
@Operation(summary = "게시판 사용정보 목록 조회", description = "게시판 사용정보 목록을 조회", security = {
@SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") })
@GetMapping(value = "/bbsUseInf")
public ResultVO selectBBSUseInfs(HttpServletRequest request,
@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) throws Exception {
@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)
throws Exception {
ResultVO resultVO = new ResultVO();
BoardUseInfVO bdUseVO = new BoardUseInfVO();
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.setPageSize(propertyService.getInt("Globals.pageSize"));
bdUseVO.setPageUnit(egovPropertyService.getInt("Globals.pageUnit"));
bdUseVO.setPageSize(egovPropertyService.getInt("Globals.pageSize"));
PaginationInfo paginationInfo = new PaginationInfo();
@ -129,8 +117,8 @@ public class EgovBBSUseInfoManageApiController {
bdUseVO.setLastIndex(paginationInfo.getLastRecordIndex());
bdUseVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> map = bbsUseService.selectBBSUseInfs(bdUseVO);
int totCnt = Integer.parseInt((String)map.get("resultCnt"));
Map<String, Object> map = egovBBSUseInfoManageService.selectBBSUseInfs(bdUseVO);
int totCnt = Integer.parseInt((String) map.get("resultCnt"));
paginationInfo.setTotalRecordCount(totCnt);
@ -147,26 +135,21 @@ public class EgovBBSUseInfoManageApiController {
/**
*
*
* @return
* @throws Exception
*/
@Operation(
summary = "미사용 게시판 속성정보 목록 조회",
description = "사용중이지 않은 게시판 속성 정보의 목록을 조회",
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공")
})
@GetMapping(value ="/notUsedBbsMaster")
@Operation(summary = "미사용 게시판 속성정보 목록 조회", description = "사용중이지 않은 게시판 속성 정보의 목록을 조회", security = {
@SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공") })
@GetMapping(value = "/notUsedBbsMaster")
public ResultVO selectNotUsedBdMstrList() throws Exception {
ResultVO resultVO = new ResultVO();
BoardMasterVO boardMasterVO = new BoardMasterVO();
boardMasterVO.setFirstIndex(0);
Map<String, Object> resultMap = bbsAttrbService.selectNotUsedBdMstrList(boardMasterVO);
Map<String, Object> resultMap = bbsAttributeManageService.selectNotUsedBdMstrList(boardMasterVO);
resultVO.setResult(resultMap);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
@ -183,43 +166,35 @@ public class EgovBBSUseInfoManageApiController {
* @return
* @throws Exception
*/
@Operation(
summary = "게시판 사용정보 상세 조회",
description = "게시판 사용정보에 대한 상세정보를 조회",
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
})
@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 {
@Operation(summary = "게시판 사용정보 상세 조회", description = "게시판 사용정보에 대한 상세정보를 조회", security = {
@SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "조회 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") })
@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();
BoardUseInfVO bdUseVO = new BoardUseInfVO();
Map<String, Object> resultMap = new HashMap<String, Object>();
bdUseVO.setBbsId(bbsId);
bdUseVO.setTrgetId(trgetId);
BoardUseInfVO vo = bbsUseService.selectBBSUseInf(bdUseVO);// bbsItrgetId
BoardUseInfVO vo = egovBBSUseInfoManageService.selectBBSUseInf(bdUseVO);// bbsItrgetId
// 시스템 사용 게시판의 경우 URL 표시
if ("SYSTEM_DEFAULT_BOARD".equals(vo.getTrgetId())) {
if (vo.getBbsTyCode().equals("BBST02")) { // 익명게시판
} else {
vo.setProvdUrl("bbsUseInf/" + trgetId + "/" + bbsId);//bbsId 값을 따로 넘겨줘야 함
vo.setProvdUrl("bbsUseInf/" + trgetId + "/" + bbsId);// bbsId 값을 따로 넘겨줘야 함
}
}
BoardMasterVO boardMasterVO = new BoardMasterVO();
resultMap = bbsAttrbService.selectNotUsedBdMstrList(boardMasterVO);
resultMap = bbsAttributeManageService.selectNotUsedBdMstrList(boardMasterVO);
resultMap.put("bdUseVO", vo);
@ -233,29 +208,20 @@ public class EgovBBSUseInfoManageApiController {
/**
* .
*
* @param request
* @param bdUseVO
* @param bindingResult
* @return ResultVO
* @param request
* @param bdUseVO
* @param bindingResult
* @return ResultVO
* @throws Exception
*/
@Operation(
summary = "게시판 사용정보 등록",
description = " 게시판 사용정보를 등록",
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "등록 성공"),
@Operation(summary = "게시판 사용정보 등록", description = " 게시판 사용정보를 등록", security = {
@SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "등록 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류")
})
@PostMapping(value ="/bbsUseInf")
public ResultVO insertBBSUseInf(HttpServletRequest request,
BoardUseInfVO bdUseVO,
BindingResult bindingResult,
@Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO
) throws Exception {
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류") })
@PostMapping(value = "/bbsUseInf")
public ResultVO insertBBSUseInf(HttpServletRequest request, BoardUseInfVO bdUseVO, BindingResult bindingResult,
@Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO) throws Exception {
ResultVO resultVO = new ResultVO();
@ -278,7 +244,7 @@ public class EgovBBSUseInfoManageApiController {
bdUseVO.setUseAt("Y");
bdUseVO.setFrstRegisterId(loginVO.getUniqId());
bbsUseService.insertBBSUseInf(bdUseVO);
egovBBSUseInfoManageService.insertBBSUseInf(bdUseVO);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());
@ -295,28 +261,19 @@ public class EgovBBSUseInfoManageApiController {
* @return ResultVO
* @throws Exception
*/
@Operation(
summary = "게시판 사용정보 수정",
description = " 게시판 사용정보를 수정",
security = {@SecurityRequirement(name = "Authorization")},
tags = {"EgovBBSUseInfoManageApiController"}
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "수정 성공"),
@Operation(summary = "게시판 사용정보 수정", description = " 게시판 사용정보를 수정", security = {
@SecurityRequirement(name = "Authorization") }, tags = { "EgovBBSUseInfoManageApiController" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "수정 성공"),
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님"),
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류")
})
@PutMapping(value ="/bbsUseInf/{bbsId}")
public ResultVO updateBBSUseInf(HttpServletRequest request,
@RequestBody BoardUseInfVO bdUseVO,
@Parameter(name = "bbsId", description = "게시판 Id", in = ParameterIn.PATH, example="BBSMSTR_AAAAAAAAAAAA")
@PathVariable("bbsId") String bbsId,
@Parameter(hidden = true) @AuthenticationPrincipal LoginVO loginVO
) throws Exception {
@ApiResponse(responseCode = "900", description = "입력값 무결성 오류") })
@PutMapping(value = "/bbsUseInf/{bbsId}")
public ResultVO updateBBSUseInf(HttpServletRequest request, @RequestBody BoardUseInfVO bdUseVO,
@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();
bdUseVO.setBbsId(bbsId);
bbsUseService.updateBBSUseInf(bdUseVO);
egovBBSUseInfoManageService.updateBBSUseInf(bdUseVO);
resultVO.setResultCode(ResponseCode.SUCCESS.getCode());
resultVO.setResultMessage(ResponseCode.SUCCESS.getMessage());

Loading…
Cancel
Save