feat: 게시판관리 진행

main
Jonguk. Lim 2 years ago
parent 4c22683469
commit 0faee76a41

@ -7,7 +7,6 @@ import org.apache.ibatis.session.RowBounds;
import egovframework.rte.psl.dataaccess.mapper.Mapper; import egovframework.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
/** /**
* *
@ -20,16 +19,16 @@ import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
@Mapper @Mapper
public interface IBbsCreateMgtMapper { public interface IBoardCreateMgtMapper {
List<XitBbsCreateMngVO> selectBbsMastrs(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsCreateMngVO> selectBoardMastrs(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsCreateMngVO> selectBbsMastrs(final T t); <T> List<XitBbsCreateMngVO> selectBoardMastrs(final T t);
<T> XitBbsCreateMngVO selectBbsMastr(final T t); <T> XitBbsCreateMngVO selectBoardMastr(final T t);
int insertBbsMastr(final XitBbsCreateMngVO vo); int insertBoardMastr(final XitBbsCreateMngVO vo);
int updateBbsMastr(final XitBbsCreateMngVO vo); int updateBoardMastr(final XitBbsCreateMngVO vo);
<T> int deleteBbsMastr(final T t); <T> int deleteBoardMastr(final T t);
} }

@ -19,16 +19,16 @@ import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
@Mapper @Mapper
public interface IBbsTmplMgtMapper { public interface IBoardTmplMgtMapper {
List<XitBbsTmplateMngVO> selectBbsTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsTmplateMngVO> selectBoardTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsTmplateMngVO> selectBbsTmpls(final T t); <T> List<XitBbsTmplateMngVO> selectBoardTmpls(final T t);
<T> XitBbsTmplateMngVO selectBbsTmpl(final T t); <T> XitBbsTmplateMngVO selectBoardTmpl(final T t);
int insertBbsTmpl(final XitBbsTmplateMngVO vo); int insertBoardTmpl(final XitBbsTmplateMngVO vo);
int updateBbsTmpl(final XitBbsTmplateMngVO vo); int updateBoardTmpl(final XitBbsTmplateMngVO vo);
<T> int deleteBbsTmpl(final T t); <T> int deleteBoardTmpl(final T t);
} }

@ -19,19 +19,19 @@ import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
@Mapper @Mapper
public interface IBbsUseMgtMapper { public interface IBoardUseMgtMapper {
List<XitBbsUseMngVO> selectBbsPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsUseMngVO> selectBoardPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsUseMngVO> selectBbsPrcuseList(final T t); <T> List<XitBbsUseMngVO> selectBoardPrcuseList(final T t);
<T> XitBbsUseMngVO selectBbsPrcuse(final T t); <T> XitBbsUseMngVO selectBoardPrcuse(final T t);
int insertBbsPrcuse(final XitBbsUseMngVO vo); int insertBoardPrcuse(final XitBbsUseMngVO vo);
int updateBbsPrcuse(final XitBbsUseMngVO vo); int updateBoardPrcuse(final XitBbsUseMngVO vo);
<T> int deleteBbsPrcuse(final T t); <T> int deleteBoardPrcuse(final T t);
} }

@ -96,5 +96,6 @@ public class XitBbsUseMngVO {
private String cmntyId; private String cmntyId;
private String cmntyNm; private String cmntyNm;
private String trgetNm;
} }

@ -1,50 +0,0 @@
package kr.xit.framework.biz.mng.bbs.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import kr.xit.framework.biz.mng.bbs.mapper.IBbsCreateMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class BbsCreateMgtService implements IBbsCreateMgtService{
private final IBbsCreateMgtMapper mapper;
@Override
public List<XitBbsCreateMngVO> findBbsCreateList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBbsMastrs(paraMap, rowBounds);
}
@Override
public <T> List<XitBbsCreateMngVO> findBbsCreateList(final T t) {
return mapper.selectBbsMastrs(t);
}
@Override
public <T> XitBbsCreateMngVO findBbsCreate(final T t) {
return mapper.selectBbsMastr(t);
}
@Override
public void addBbsCreate(final XitBbsCreateMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBbsMastr(vo);
}
@Override
public void modifyBbsCreate(final XitBbsCreateMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBbsMastr(vo);
}
@Override
public <T> void removeBbsCreate(final T t) {
mapper.deleteBbsMastr(t);
}
}

@ -1,52 +0,0 @@
package kr.xit.framework.biz.mng.bbs.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import kr.xit.framework.biz.mng.bbs.mapper.IBbsUseMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class BbsUseMgtService implements IBbsUseMgtService{
private final IBbsUseMgtMapper mapper;
@Override
public List<XitBbsUseMngVO> findBbsPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBbsPrcuseList(paraMap, rowBounds);
}
@Override
public <T> List<XitBbsUseMngVO> findBbsPrcuseList(T t) {
return mapper.selectBbsPrcuseList(t);
}
@Override
public <T> XitBbsUseMngVO findBbsPrcuse(T t) {
return mapper.selectBbsPrcuse(t);
}
@Override
public void addBbsPrcuse(XitBbsUseMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBbsPrcuse(vo);
}
@Override
public void modifyBbsPrcuse(XitBbsUseMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBbsPrcuse(vo);
}
@Override
public <T> void removeBbsPrcuse(T t) {
mapper.deleteBbsPrcuse(t);
}
}

@ -0,0 +1,50 @@
package kr.xit.framework.biz.mng.bbs.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import kr.xit.framework.biz.mng.bbs.mapper.IBoardCreateMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class BoardCreateMgtService implements IBoardCreateMgtService {
private final IBoardCreateMgtMapper mapper;
@Override
public List<XitBbsCreateMngVO> findBoardCreateList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardMastrs(paraMap, rowBounds);
}
@Override
public <T> List<XitBbsCreateMngVO> findBoardCreateList(final T t) {
return mapper.selectBoardMastrs(t);
}
@Override
public <T> XitBbsCreateMngVO findBoardCreate(final T t) {
return mapper.selectBoardMastr(t);
}
@Override
public void addBoardCreate(final XitBbsCreateMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBoardMastr(vo);
}
@Override
public void modifyBoardCreate(final XitBbsCreateMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardMastr(vo);
}
@Override
public <T> void removeBoardCreate(final T t) {
mapper.deleteBoardMastr(t);
}
}

@ -9,7 +9,7 @@ import org.springframework.stereotype.Service;
import egovframework.rte.fdl.cmmn.exception.FdlException; import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService; import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kr.xit.framework.biz.mng.bbs.mapper.IBbsTmplMgtMapper; import kr.xit.framework.biz.mng.bbs.mapper.IBoardTmplMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
import kr.xit.framework.support.exception.BizRuntimeException; import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
@ -17,46 +17,46 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
public class BbsTmplMgtService implements IBbsTmplMgtService { public class BoardTmplMgtService implements IBoardTmplMgtService {
private final IBbsTmplMgtMapper mapper; private final IBoardTmplMgtMapper mapper;
@Qualifier(value = "bbsIdGnrService") @Qualifier(value = "bbsIdGnrService")
private final EgovIdGnrService egovIdGnrService; private final EgovIdGnrService egovIdGnrService;
@Override @Override
public List<XitBbsTmplateMngVO> findBbsTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds) { public List<XitBbsTmplateMngVO> findBoardTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBbsTmpls(paraMap, rowBounds); return mapper.selectBoardTmpls(paraMap, rowBounds);
} }
@Override @Override
public <T> List<XitBbsTmplateMngVO> findBbsTmpls(final T t) { public <T> List<XitBbsTmplateMngVO> findBoardTmpls(final T t) {
return mapper.selectBbsTmpls(t); return mapper.selectBoardTmpls(t);
} }
@Override @Override
public <T> XitBbsTmplateMngVO findBbsTmpl(final T t) { public <T> XitBbsTmplateMngVO findBoardTmpl(final T t) {
return mapper.selectBbsTmpl(t); return mapper.selectBoardTmpl(t);
} }
@Override @Override
public void addBbsTmpl(final XitBbsTmplateMngVO vo) { public void addBoardTmpl(final XitBbsTmplateMngVO vo) {
try { try {
vo.setTmplatId(egovIdGnrService.getNextStringId()); vo.setTmplatId(egovIdGnrService.getNextStringId());
} catch (FdlException e) { } catch (FdlException e) {
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage());
} }
vo.setFrstRegisterId(getUserUniqId()); vo.setFrstRegisterId(getUserUniqId());
mapper.insertBbsTmpl(vo); mapper.insertBoardTmpl(vo);
} }
@Override @Override
public void modifyBbsTmpl(final XitBbsTmplateMngVO vo) { public void modifyBoardTmpl(final XitBbsTmplateMngVO vo) {
vo.setLastUpdusrId(getUserUniqId()); vo.setLastUpdusrId(getUserUniqId());
mapper.updateBbsTmpl(vo); mapper.updateBoardTmpl(vo);
} }
@Override @Override
public <T> void removeBbsTmpl(final T t) { public <T> void removeBoardTmpl(final T t) {
mapper.deleteBbsTmpl(t); mapper.deleteBoardTmpl(t);
} }
} }

@ -0,0 +1,52 @@
package kr.xit.framework.biz.mng.bbs.service;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import kr.xit.framework.biz.mng.bbs.mapper.IBoardUseMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class BoardUseMgtService implements IBoardUseMgtService {
private final IBoardUseMgtMapper mapper;
@Override
public List<XitBbsUseMngVO> findBoardPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardPrcuseList(paraMap, rowBounds);
}
@Override
public <T> List<XitBbsUseMngVO> findBoardPrcuseList(T t) {
return mapper.selectBoardPrcuseList(t);
}
@Override
public <T> XitBbsUseMngVO findBoardPrcuse(T t) {
return mapper.selectBoardPrcuse(t);
}
@Override
public void addBoardPrcuse(XitBbsUseMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBoardPrcuse(vo);
}
@Override
public void modifyBoardPrcuse(XitBbsUseMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardPrcuse(vo);
}
@Override
public <T> void removeBoardPrcuse(T t) {
mapper.deleteBoardPrcuse(t);
}
}

@ -18,14 +18,14 @@ import kr.xit.framework.core.utils.XitCmmnUtil;
* @since 2002. 2. 2. * @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
public interface IBbsCreateMgtService { public interface IBoardCreateMgtService {
List<XitBbsCreateMngVO> findBbsCreateList(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsCreateMngVO> findBoardCreateList(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsCreateMngVO> findBbsCreateList(final T t); <T> List<XitBbsCreateMngVO> findBoardCreateList(final T t);
<T> XitBbsCreateMngVO findBbsCreate(final T t); <T> XitBbsCreateMngVO findBoardCreate(final T t);
void addBbsCreate(final XitBbsCreateMngVO vo); void addBoardCreate(final XitBbsCreateMngVO vo);
void modifyBbsCreate(final XitBbsCreateMngVO vo); void modifyBoardCreate(final XitBbsCreateMngVO vo);
<T> void removeBbsCreate(final T t); <T> void removeBoardCreate(final T t);
default String getUserUniqId(){ default String getUserUniqId(){
return XitCmmnUtil.getUserUniqId(); return XitCmmnUtil.getUserUniqId();

@ -5,9 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngSearchVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitCmmnUtil;
/** /**
@ -20,15 +18,15 @@ import kr.xit.framework.core.utils.XitCmmnUtil;
* @since 2002. 2. 2. * @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
public interface IBbsTmplMgtService { public interface IBoardTmplMgtService {
List<XitBbsTmplateMngVO> findBbsTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsTmplateMngVO> findBoardTmpls(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsTmplateMngVO> findBbsTmpls(final T t); <T> List<XitBbsTmplateMngVO> findBoardTmpls(final T t);
<T> XitBbsTmplateMngVO findBbsTmpl(final T t); <T> XitBbsTmplateMngVO findBoardTmpl(final T t);
void addBbsTmpl(final XitBbsTmplateMngVO vo); void addBoardTmpl(final XitBbsTmplateMngVO vo);
void modifyBbsTmpl(final XitBbsTmplateMngVO vo); void modifyBoardTmpl(final XitBbsTmplateMngVO vo);
<T> void removeBbsTmpl(final T t); <T> void removeBoardTmpl(final T t);
default String getUserUniqId(){ default String getUserUniqId(){
return XitCmmnUtil.getUserUniqId(); return XitCmmnUtil.getUserUniqId();

@ -5,7 +5,6 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngSearchVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitCmmnUtil;
@ -19,15 +18,15 @@ import kr.xit.framework.core.utils.XitCmmnUtil;
* @since 2002. 2. 2. * @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
public interface IBbsUseMgtService { public interface IBoardUseMgtService {
List<XitBbsUseMngVO> findBbsPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitBbsUseMngVO> findBoardPrcuseList(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBbsUseMngVO> findBbsPrcuseList(final T t); <T> List<XitBbsUseMngVO> findBoardPrcuseList(final T t);
<T> XitBbsUseMngVO findBbsPrcuse(final T t); <T> XitBbsUseMngVO findBoardPrcuse(final T t);
void addBbsPrcuse(final XitBbsUseMngVO vo); void addBoardPrcuse(final XitBbsUseMngVO vo);
void modifyBbsPrcuse(final XitBbsUseMngVO vo); void modifyBoardPrcuse(final XitBbsUseMngVO vo);
<T> void removeBbsPrcuse(final T t); <T> void removeBoardPrcuse(final T t);
default String getUserUniqId(){ default String getUserUniqId(){
return XitCmmnUtil.getUserUniqId(); return XitCmmnUtil.getUserUniqId();

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
import kr.xit.framework.biz.mng.bbs.service.IBbsCreateMgtService; import kr.xit.framework.biz.mng.bbs.service.IBoardCreateMgtService;
import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
@ -34,58 +34,58 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@Controller @Controller
@RequestMapping("/framework/biz/mng/bbs") @RequestMapping("/framework/biz/mng/bbs")
public class BbsCreateMgtController { public class BoardCreateMgtController {
private final IBbsCreateMgtService service; private final IBoardCreateMgtService service;
@RequestMapping(value = "/mngBbsCreateMgtForm") @RequestMapping(value = "/mngBoardCreateMgtForm")
public void mngBbsCreateMgtForm(){ public void mngBoardCreateMgtForm(){
} }
@RequestMapping(value = "/mngBbsCreateMgtPopup") @RequestMapping(value = "/mngBoardCreateMgtPopup")
public ModelAndView mngBbsCreateMgtPopup(final XitBbsCreateMngVO vo) { public ModelAndView mngBoardCreateMgtPopup(final XitBbsCreateMngVO vo) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
if(Checks.isNotEmpty(vo) && Checks.isNotEmpty(vo.getBbsId())){ if(Checks.isNotEmpty(vo) && Checks.isNotEmpty(vo.getBbsId())){
mav.addObject("boardMaster", service.findBbsCreate(vo)); mav.addObject("boardMaster", service.findBoardCreate(vo));
} else { } else {
mav.addObject("boardMaster", vo); mav.addObject("boardMaster", vo);
} }
mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경"); mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBbsCreateMgtPopup.popup"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardCreateMgtPopup.popup");
return mav; return mav;
} }
@GetMapping(value = "/findBbsCreates") @GetMapping(value = "/findBoardCreates")
public ModelAndView finsBbsCreates(@RequestParam final Map<String, Object> paraMap){ public ModelAndView finsBoardCreates(@RequestParam final Map<String, Object> paraMap){
return ResultResponse.of(service.findBbsCreateList(paraMap, MybatisUtils.getPagingInfo(paraMap))); return ResultResponse.of(service.findBoardCreateList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
} }
@PostMapping(value = "/addBbsCreate") @PostMapping(value = "/addBoardCreate")
public ModelAndView addBbsCreate(final XitBbsCreateMngVO vo, final BindingResult bindingResult){ public ModelAndView addBoardCreate(final XitBbsCreateMngVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("boardMaster", vo, bindingResult); ValidationError.of("boardMaster", vo, bindingResult);
service.addBbsCreate(vo); service.addBoardCreate(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/modifyBbsCreate") @PostMapping(value = "/modifyBoardCreate")
public ModelAndView modifyBbsCreate(final XitBbsCreateMngVO vo, final BindingResult bindingResult){ public ModelAndView modifyBoardCreate(final XitBbsCreateMngVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("boardMaster", vo, bindingResult); ValidationError.of("boardMaster", vo, bindingResult);
service.modifyBbsCreate(vo); service.modifyBoardCreate(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/removeBbsCreate") @PostMapping(value = "/removeBoardCreate")
public ModelAndView removeBbsCreate(final XitBbsCreateMngVO vo){ public ModelAndView removeBoardCreate(final XitBbsCreateMngVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeBbsCreate(vo); service.removeBoardCreate(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav; return mav;
} }

@ -16,7 +16,7 @@ import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO;
import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO;
import kr.xit.framework.biz.mng.bbs.service.IBbsTmplMgtService; import kr.xit.framework.biz.mng.bbs.service.IBoardTmplMgtService;
import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
@ -38,32 +38,32 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@Controller @Controller
@RequestMapping("/framework/biz/mng/bbs/") @RequestMapping("/framework/biz/mng/bbs/")
public class BbsTmplMgtController { public class BoardTmplMgtController {
private final IBbsTmplMgtService service; private final IBoardTmplMgtService service;
@Value("#{prop['Globals.Xit.Pagination.PageUnit']}") @Value("#{prop['Globals.Xit.Pagination.PageUnit']}")
private int PAGE_UNIT; private int PAGE_UNIT;
@Value("#{prop['Globals.Xit.Pagination.PageSize']}") @Value("#{prop['Globals.Xit.Pagination.PageSize']}")
private int PAGE_SIZE; private int PAGE_SIZE;
@RequestMapping(value = "/mngBbsTmplMgtForm") @RequestMapping(value = "/mngBoardTmplMgtForm")
public void mngBbsTmplMgtForm(){ public void mngBoardTmplMgtForm(){
} }
@RequestMapping(value = "/mngBbsTmplMgtPopup") @RequestMapping(value = "/mngBoardTmplMgtPopup")
public ModelAndView mngBbsTmplMgtPopup(final XitBbsTmplateMngVO vo) { public ModelAndView mngBoardTmplMgtPopup(final XitBbsTmplateMngVO vo) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.addObject("templateInf", vo); mav.addObject("templateInf", vo);
mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경"); mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBbsTmplMgtPopup.popup"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardTmplMgtPopup.popup");
return mav; return mav;
} }
@RequestMapping(value = "/mngBbsTmplPreviewPopup") @RequestMapping(value = "/mngBoardTmplPreviewPopup")
public ModelAndView mngBbsTmplPreviewPopup(@RequestParam Map<String,Object> paraMap) { public ModelAndView mngBoardTmplPreviewPopup(@RequestParam Map<String,Object> paraMap) {
@ -124,7 +124,7 @@ public class BbsTmplMgtController {
ModelAndView mav = ResultResponse.of(list, FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBbsTmplPreviewPopup.popup"); ModelAndView mav = ResultResponse.of(list, FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardTmplPreviewPopup.popup");
//ModelAndView mav = ResultResponse.of(list, FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/XitBasicBbsMng_list.popup"); //ModelAndView mav = ResultResponse.of(list, FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/XitBasicBbsMng_list.popup");
//mav.addObject("resultList", list); //mav.addObject("resultList", list);
@ -158,35 +158,35 @@ public class BbsTmplMgtController {
return mav; return mav;
} }
@GetMapping(value = "/findBbsTmpls") @GetMapping(value = "/findBoardTmpls")
public ModelAndView finsBbsPrcTmpls(@RequestParam final Map<String, Object> paraMap){ public ModelAndView finsBoardTmpls(@RequestParam final Map<String, Object> paraMap){
return ResultResponse.of(service.findBbsTmpls(paraMap, MybatisUtils.getPagingInfo(paraMap))); return ResultResponse.of(service.findBoardTmpls(paraMap, MybatisUtils.getPagingInfo(paraMap)));
} }
@PostMapping(value = "/addBbsTmpl") @PostMapping(value = "/addBoardTmpl")
public ModelAndView addBbsTmpl(final XitBbsTmplateMngVO vo, BindingResult bindingResult){ public ModelAndView addBoardTmpl(final XitBbsTmplateMngVO vo, BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("templateInf", vo, bindingResult); ValidationError.of("templateInf", vo, bindingResult);
service.addBbsTmpl(vo); service.addBoardTmpl(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/modifyBbsTmpl") @PostMapping(value = "/modifyBoardTmpl")
public ModelAndView modifyBbsTmpl(final XitBbsTmplateMngVO vo, BindingResult bindingResult){ public ModelAndView modifyBoardTmpl(final XitBbsTmplateMngVO vo, BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("templateInf", vo, bindingResult); ValidationError.of("templateInf", vo, bindingResult);
service.modifyBbsTmpl(vo); service.modifyBoardTmpl(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/removeBbsTmpl") @PostMapping(value = "/removeBoardTmpl")
public ModelAndView removeBbsTmpl(final XitBbsTmplateMngVO vo){ public ModelAndView removeBoardTmpl(final XitBbsTmplateMngVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeBbsTmpl(vo); service.removeBoardTmpl(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav; return mav;
} }

@ -3,6 +3,7 @@ package kr.xit.framework.biz.mng.bbs.web;
import java.util.Map; import java.util.Map;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -10,62 +11,76 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO; import kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO;
import kr.xit.framework.biz.mng.bbs.service.IBbsUseMgtService; import kr.xit.framework.biz.mng.bbs.service.IBoardUseMgtService;
import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.ValidationError;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
@Controller @Controller
@RequestMapping("/framework/biz/mng/bbs") @RequestMapping("/framework/biz/mng/bbs")
public class BbsUseMgtController { public class BoardUseMgtController {
private final IBbsUseMgtService service; private final IBoardUseMgtService service;
@RequestMapping(value = "/mngBbsUseMgtForm") @RequestMapping(value = "/mngBoardUseMgtForm")
public void mngBbsUseMgtForm(){ public void mngBoardUseMgtForm(){
} }
@RequestMapping(value = "/mngBbsUseMgtPopup") @RequestMapping(value = "/mngBoardUseMgtPopup")
public ModelAndView mngBbsUseMgtPopup(final XitBbsUseMngVO vo) { public ModelAndView mngBoardUseMgtPopup(final XitBbsUseMngVO vo) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.addObject("boardUseInf", vo); mav.addObject("boardUseInf", vo);
mav.addObject("pageTitle", "게시판 사용 등록 / 변경"); mav.addObject("pageTitle", "게시판 사용 등록 / 변경");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBbsUseMgtPopup.popup"); mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardUseMgtPopup.popup");
return mav; return mav;
} }
@GetMapping(value = "/findBbsPrcuseList") @GetMapping(value = "/findBoardPrcuseList")
public ModelAndView finsBbsPrcuseList(@RequestParam final Map<String, Object> paraMap){ public ModelAndView finsBoardPrcuseList(@RequestParam final Map<String, Object> paraMap){
return ResultResponse.of(service.findBbsPrcuseList(paraMap, MybatisUtils.getPagingInfo(paraMap))); return ResultResponse.of(service.findBoardPrcuseList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
} }
@PostMapping(value = "/addBbsPrcuse") @PostMapping(value = "/addBoardPrcuse")
public ModelAndView addBbsPrcuse(final XitBbsUseMngVO vo){ public ModelAndView addBoardPrcuse(final XitBbsUseMngVO vo, String bbsType, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.addBbsPrcuse(vo);
// CMMNTY 06/CLUB 05/SYSTEM(REGC01)
if ("CMMNTY".equals(bbsType)) {
vo.setRegistSeCode("REGC06");
} else if ("CLUB".equals(bbsType)) {
vo.setRegistSeCode("REGC05");
} else {
vo.setRegistSeCode("REGC01");
}
ValidationError.of("boardUseInf", vo, bindingResult);
service.addBoardPrcuse(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/modifyBbsPrcuse") @PostMapping(value = "/modifyBoardPrcuse")
public ModelAndView modifyBbsPrcuse(final XitBbsUseMngVO vo){ public ModelAndView modifyBoardPrcuse(final XitBbsUseMngVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.modifyBbsPrcuse(vo);
ValidationError.of("boardUseInf", vo, bindingResult);
service.modifyBoardPrcuse(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav; return mav;
} }
@PostMapping(value = "/removeBbsPrcuse") @PostMapping(value = "/removeBoardPrcuse")
public ModelAndView removeBbsPrcuse(final XitBbsUseMngVO vo){ public ModelAndView removeBoardPrcuse(final XitBbsUseMngVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeBbsPrcuse(vo); service.removeBoardPrcuse(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav; return mav;
} }

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBbsCreateMgtMapper"> <mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBoardCreateMgtMapper">
<!-- ************************************************************************************************************* <!-- *************************************************************************************************************
* xit_bbs_mastr : 게시판 마스터 * xit_bbs_mastr : 게시판 마스터
************************************************************************************************************** --> ************************************************************************************************************** -->
<sql id="sqlBbsMastr"> <sql id="sqlBoardMastr">
SELECT xbm.bbs_id SELECT xbm.bbs_id
, xbm.bbs_ty_code , xbm.bbs_ty_code
, cdc.code_nm AS bbsTyCodeNm , cdc.code_nm AS bbsTyCodeNm
@ -51,9 +51,9 @@
AND xti.use_at = 'Y' AND xti.use_at = 'Y'
</sql> </sql>
<select id="selectBbsMastrs" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO"> <select id="selectBoardMastrs" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO">
/* bbs-mastr-mysql-mapper|selectBbsMastrs-BBS 마스터(생성) 목록 조회|julim */ /* board-mastr-mysql-mapper|selectBoardMastrs-BBS 마스터(생성) 목록 조회|julim */
<include refid="sqlBbsMastr"/> <include refid="sqlBoardMastr"/>
<where> <where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)"> <if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
AND xbm.use_at = #{useAt} AND xbm.use_at = #{useAt}
@ -68,14 +68,14 @@
ORDER BY xbm.frst_regist_pnttm DESC ORDER BY xbm.frst_regist_pnttm DESC
</select> </select>
<select id="selectBbsMastr" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO"> <select id="selectBoardMastr" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsCreateMngVO">
/* bbs-mastr-mysql-mapper|selectBbsMastr-BBS 마스터(생성) 정보 조회|julim */ /* boards-mastr-mysql-mapper|selectBoardMastr-BBS 마스터(생성) 정보 조회|julim */
<include refid="sqlBbsMastr"/> <include refid="sqlBoardMastr"/>
WHERE xbm.bbs_id = #{bbsId} WHERE xbm.bbs_id = #{bbsId}
</select> </select>
<insert id="insertBbsMastr"> <insert id="insertBoardMastr">
/* bbs-mastr-mysql-mapper|insertBbsMastr-BBS 마스터(생성) 정보 등록|julim */ /* board-mastr-mysql-mapper|insertBoardMastr-BBS 마스터(생성) 정보 등록|julim */
INSERT INSERT
INTO xit_bbs_mastr ( INTO xit_bbs_mastr (
bbs_id bbs_id
@ -104,8 +104,8 @@
) )
</insert> </insert>
<update id="updateBbsMastr"> <update id="updateBoardMastr">
/* bbs-mastr-mysql-mapper|updateBbsMastr-BBS 마스터(생성) 정보 변경|julim */ /* board-mastr-mysql-mapper|updateBoardMastr-BBS 마스터(생성) 정보 변경|julim */
UPDATE xit_bbs_mastr UPDATE xit_bbs_mastr
SET bbs_nm = IF(bbs_nm = #{bbsNm}, bbs_nm, #{bbsNm}) SET bbs_nm = IF(bbs_nm = #{bbsNm}, bbs_nm, #{bbsNm})
, bbs_intrcn = IF(bbs_intrcn = #{bbsIntrcn}, bbs_intrcn, #{bbsIntrcn}) , bbs_intrcn = IF(bbs_intrcn = #{bbsIntrcn}, bbs_intrcn, #{bbsIntrcn})
@ -120,8 +120,8 @@
WHERE bbs_id = #{bbsId} WHERE bbs_id = #{bbsId}
</update> </update>
<delete id="deleteBbsMastr"> <delete id="deleteBoardMastr">
/* bbs-mastr-mysql-mapper|deleteBbsMastr-BBS 마스터(생성) 정보 삭제|julim */ /* board-mastr-mysql-mapper|deleteBoardMastr-BBS 마스터(생성) 정보 삭제|julim */
DELETE DELETE
FROM xit_bbs_mastr FROM xit_bbs_mastr
WHERE bbs_id = #{bbsId} WHERE bbs_id = #{bbsId}

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBbsUseMgtMapper"> <mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBoardUseMgtMapper">
<!-- ************************************************************************************************************* <!-- *************************************************************************************************************
* xit_bbs_prcuse : 게시판 활용 * xit_bbs_prcuse : 게시판 활용
************************************************************************************************************** --> ************************************************************************************************************** -->
<sql id="sqlBbsPrcuse"> <sql id="sqlBoardPrcuse">
SELECT xbp.bbs_id SELECT xbp.bbs_id
, xbm.bbs_nm , xbm.bbs_nm
, xbp.trget_id , xbp.trget_id
@ -27,9 +27,9 @@
ON xbp.bbs_id = xbm.bbs_id ON xbp.bbs_id = xbm.bbs_id
</sql> </sql>
<select id="selectBbsPrcuseList" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO"> <select id="selectBoardPrcuseList" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO">
/* bbs-prcuse-mysql-mapper|selectBbsPrcuseList-BBS 활용 목록 조회|julim */ /* board-prcuse-mysql-mapper|selectBoardPrcuseList-BBS 활용 목록 조회|julim */
<include refid="sqlBbsPrcuse"/> <include refid="sqlBoardPrcuse"/>
<where> <where>
AND cdc.code_id = 'XIT001' AND cdc.code_id = 'XIT001'
AND xbp.regist_se_code != 'REGC07' AND xbp.regist_se_code != 'REGC07'
@ -42,16 +42,16 @@
ORDER BY xbp.frst_regist_pnttm DESC ORDER BY xbp.frst_regist_pnttm DESC
</select> </select>
<select id="selectBbsPrcuse" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO"> <select id="selectBoardPrcuse" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsUseMngVO">
/* bbs-prcuse-mysql-mapper|selectBbsPrcuse-BBS 활용 정보 조회|julim */ /* board-prcuse-mysql-mapper|selectBoardPrcuse-BBS 활용 정보 조회|julim */
<include refid="sqlBbsPrcuse"/> <include refid="sqlBoardPrcuse"/>
WHERE cdc.code_id = 'XIT001' WHERE cdc.code_id = 'XIT001'
AND xbp.bbs_id = #{bbsId} AND xbp.bbs_id = #{bbsId}
AND xbp.trget_id = #{trgetId} AND xbp.trget_id = #{trgetId}
</select> </select>
<insert id="insertBbsPrcuse"> <insert id="insertBoardPrcuse">
/* bbs-mastr-mysql-mapper|insertBbsMastr-BBS 마스터(생성) 정보 등록|julim */ /* board-mastr-mysql-mapper|insertBbsMastr-BBS 마스터(생성) 정보 등록|julim */
INSERT INSERT
INTO xit_bbs_prcuse ( INTO xit_bbs_prcuse (
trget_id trget_id
@ -70,8 +70,8 @@
) )
</insert> </insert>
<update id="updateBbsPrcuse"> <update id="updateBoardPrcuse">
/*bbs-prcuse-mysql-mapper|selectBbsPrcuse-BBS 활용 정보 변경|julim */ /*board-prcuse-mysql-mapper|updateBoardPrcuse-BBS 활용 정보 변경|julim */
UPDATE xit_bbs_prcuse UPDATE xit_bbs_prcuse
SET regist_se_code = IF(regist_se_code = #{registSeCode}, regist_se_code, #{registSeCode}) SET regist_se_code = IF(regist_se_code = #{registSeCode}, regist_se_code, #{registSeCode})
, use_at = IF(use_at = #{useAt}, use_at, #{useAt}) , use_at = IF(use_at = #{useAt}, use_at, #{useAt})
@ -81,8 +81,8 @@
AND bbs_id = #{bbsId} AND bbs_id = #{bbsId}
</update> </update>
<delete id="deleteBbsPrcuse"> <delete id="deleteBoardPrcuse">
/* bbs-prcuse-mysql-mapper|selectBbsPrcuse-BBS 활용 정보 삭제|julim */ /* board-prcuse-mysql-mapper|deleteBoardPrcuse-BBS 활용 정보 삭제|julim */
DELETE DELETE
FROM xit_bbs_prcuse FROM xit_bbs_prcuse
WHERE trget_id = #{trgetId} WHERE trget_id = #{trgetId}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBbsTmplMgtMapper"> <mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBoardTmplMgtMapper">
<!-- ************************************************************************************************************* <!-- *************************************************************************************************************
* xit_tmplat_info : 템플릿 정보 * xit_tmplat_info : 템플릿 정보
@ -36,19 +36,19 @@
</where> </where>
</sql> </sql>
<select id="selectBbsTmpls" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO"> <select id="selectBoardTmpls" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO">
/* bbs-tmpl-mysql-mapper|selectBbsTmpls-템플릿 목록 조회|julim */ /* board-tmpl-mysql-mapper|selectBoardTmpls-템플릿 목록 조회|julim */
<include refid="sqlTmplInfo"/> <include refid="sqlTmplInfo"/>
ORDER BY xti.frst_regist_pnttm DESC ORDER BY xti.frst_regist_pnttm DESC
</select> </select>
<select id="selectBbsTmpl" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO"> <select id="selectBoardTmpl" resultType="kr.xit.framework.biz.mng.bbs.model.XitBbsTmplateMngVO">
/* bbs-tmpl-mysql-mapper|selectBbsTmpl-템플릿 정보 조회|julim */ /* board-tmpl-mysql-mapper|selectBoardTmpl-템플릿 정보 조회|julim */
<include refid="sqlTmplInfo"/> <include refid="sqlTmplInfo"/>
</select> </select>
<insert id="insertBbsTmpl"> <insert id="insertBoardTmpl">
/* bbs-tmpl-mysql-mapper|insertBbsTmpl-템플릿 정보 등록|julim */ /* board-tmpl-mysql-mapper|insertBoardTmpl-템플릿 정보 등록|julim */
INSERT INSERT
INTO xit_tmplat_info ( INTO xit_tmplat_info (
tmplat_id tmplat_id
@ -69,8 +69,8 @@
) )
</insert> </insert>
<update id="updateBbsTmpl"> <update id="updateBoardTmpl">
/* bbs-tmpl-mysql-mapper|updateBbsTmpl-템플릿 정보 변경|julim */ /* board-tmpl-mysql-mapper|updateBoardTmpl-템플릿 정보 변경|julim */
UPDATE xit_tmplat_info UPDATE xit_tmplat_info
SET tmplat_nm = IF(tmplat_nm = #{tmplatNm}, tmplat_nm, #{tmplatNm}) SET tmplat_nm = IF(tmplat_nm = #{tmplatNm}, tmplat_nm, #{tmplatNm})
, tmplat_cours = IF(tmplat_cours = #{tmplatCours}, tmplat_cours, #{tmplatCours}) , tmplat_cours = IF(tmplat_cours = #{tmplatCours}, tmplat_cours, #{tmplatCours})
@ -81,8 +81,8 @@
WHERE tmplat_id = #{tmplatId} WHERE tmplat_id = #{tmplatId}
</update> </update>
<delete id="deleteBbsTmpl"> <delete id="deleteBoardTmpl">
/* bbs-tmpl-mysql-mapper|deleteBbsTmpl-템플릿 정보 삭제|julim */ /* board-tmpl-mysql-mapper|deleteBoardTmpl-템플릿 정보 삭제|julim */
DELETE DELETE
FROM xit_tmplat_info FROM xit_tmplat_info
WHERE tmplat_id = #{tmplatId} WHERE tmplat_id = #{tmplatId}

@ -12,7 +12,7 @@
<validator:javascript formName="boardUseInf" staticJavascript="false" xhtml="true" cdata="false"/> <validator:javascript formName="boardUseInf" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javascript"> <script type="text/javascript">
function fn_egov_updt_bbsUseInf(){ function fn_egov_updt_bbsUseInf(){
if (!validateBoardUseInf(document.boardUseInf)){ if (!validateBoardUseInfo(document.boardUseInf)){
return; return;
} }

@ -1,266 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="ufn" uri="/WEB-INF/tlds/egovfn.tld"%>
<%@ taglib prefix="orderby" uri="/WEB-INF/tlds/orderby.tld" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="boardUseInf" staticJavascript="false" xhtml="true" cdata="false"/>
<form id="boardUseInf" name="boardUseInf">
<input type="hidden" name="mode" value="insert" />
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>" />
<div class="popup" style="min-width: 800px;">
<div class="popup_inner" style="max-width: 800px;">
<p class="pop_title">게시판 사용등록</p>
<table class="tbl03">
<caption>게시판 사용등록</caption>
<colgroup>
<col style="width: 30%;"/>
<col style="width: %;"/>
<col style="width: %;"/>
<col style="width: %;"/>
</colgroup>
<tbody>
<tr>
<th>
게시판명<span style="color: red;">*</span>
</th>
<td colspan="3">
<input name="bbsId" type="hidden" />
<input style="width: 40%" name="bbsNm" type="text" size="40" value="" maxlength="40" title="게시판명" readonly />
&nbsp;<a href="#LINK" id ="choiceLink" style="selector-dummy: expression(this.hideFocus=false);"><img src="<c:url value='/resources/images/img_search.gif' />"
width="15" height="15" align="middle" alt="새창" /></a>
<br/><form:errors path="bbsId" />
</td>
</tr>
<tr>
<th>
커뮤니티/통호회명
<img src="<c:url value='/resources/images/required.gif' />" width="15" height="15" alt="required"/>
</th>
<td colspan="3">
<select style="width: 40%" id="trgetType" name="trgetType" class="select" title="" >
<option selected value=''>--선택하세요--</option>
<option value="SYSTEM" >시스템</option>
</select>
<input type="hidden" name="trgetId" value="" />
<input style="width: 40%" type="text" name="trgetNm" value="" size="40" title="" readOnly />
<br/><form:errors path="trgetId" />
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/showModalDialog.js'/>" ></script>
<script type="text/javascript">
$(document).ready(function(){
XitBbsUseMng_input.init();
});
function showModalDialogCallback(obj) {
if(obj != null){
document.boardUseInf.bbsId.value = obj['bbsId'];
document.boardUseInf.bbsNm.value = obj['bbsNm'];
}
}
/* *******************************
* 게시판 사용관리 등록화면 Functions
******************************* */
var XitBbsUseMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//날짜 입력 항목 설정
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitBbsUseMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitBbsUseMng_input.addData();
}
});
$('#choiceLink').on({
click:function(){
//팝업 URL
var url = "<c:url value='/framework/biz/mng/bbs/BbsCreateMng_choice_popup.do'/>";
//팝업 가로/세로 사이즈(px)
var w = 890;
var h = 520;
//팝업 위치 계산(가운데 정렬)
var left = window.screenX + (window.outerWidth/2) - (w/2);
var top = window.screenY + (window.outerHeight/2) - (h/2);
//팝업 옵션
var openParam = "width="+w+"px, height="+h+"px, resizable=no, scrollbars=yes, location=no, left="+left+"px, top="+top+"px";
//팝업 OPEN
window.open(url,"showdialog",openParam);
}
});
$('#trgetType').on({
change:function(event){
var typeSelect = document.getElementById("trgetType");
var value = typeSelect.options[document.getElementById("trgetType").selectedIndex].value
var retVal;
var _strType = value;
if (_strType == 'CMMNTY') {
retVal = fn_egov_inqire_cmmnty();
} else if (_strType == 'CLUB') {
retVal = fn_egov_inqire_club();
} else if (_strType == '') {
retVal = "|";
} else {
retVal = "SYSTEM_DEFAULT_BOARD"+"|"+"시스템 활용";
}
if (retVal != null) {
var tmp = retVal.split("|");
document.boardUseInf.trgetId.value = tmp[0];
document.boardUseInf.trgetNm.value = tmp[1];
}
}
})
},
/* ========================
* 입력값 언어 선택
======================== */
fn_showModalDialogCallback : function(obj){
if(obj != null){
document.boardUseInf.bbsId.value = obj['bbsId'];
document.boardUseInf.bbsNm.value = obj['bbsNm'];
}
},
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
if (!validateBoardUseInf(document.boardUseInf))
return;
if (!confirm('<spring:message code="common.regist.msg" />'))
return false;
var param = $("#boardUseInf").serialize();
$.ajax({
url : "/framework/biz/mng/bbs/BbsUseMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitBbsUseMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.frmSearch.searchKeyword.value = "";
document.frmSearch.action = url;
document.frmSearch.submit();
break;
case "popup": //팝업 OPEN
XitBbsUseMng_input.pagePopup(flag, url, params);
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "adres": //주소 팝업 OPEN
popTitle = "주소 찾기";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -63,7 +63,7 @@
GRID.reloadData(); GRID.reloadData();
} }
,pagePopup: function(flag, params){ ,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/bbs/mngBbsCreateMgtPopup.do"/>'; let url = '<c:url value="/framework/biz/mng/bbs/mngBoardCreateMgtPopup.do"/>';
let popTitle; let popTitle;
let popOption = {width: 950, height:550}; let popOption = {width: 950, height:550};
switch (flag) { switch (flag) {
@ -191,7 +191,7 @@
initialRequest: true, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/framework/biz/mng/bbs/findBbsCreates.do"/>' url: '<c:url value="/framework/biz/mng/bbs/findBoardCreates.do"/>'
,serializer: (params) => { ,serializer: (params) => {
const schKey = $('#searchCondition').val(); const schKey = $('#searchCondition').val();
let schValue = $('input[name=searchKeyword]').val(); let schValue = $('input[name=searchKeyword]').val();

@ -150,7 +150,7 @@
if (!fnBiz.validate()) return; if (!fnBiz.validate()) return;
cmmBizAjax('add', { cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/bbs/addBbsCreate"/>' url: '<c:url value="/framework/biz/mng/bbs/addBoardCreate"/>'
, data: $("#boardMaster").serialize() , data: $("#boardMaster").serialize()
}) })
} }
@ -158,14 +158,14 @@
if (!fnBiz.validate()) return; if (!fnBiz.validate()) return;
cmmBizAjax('modify', { cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBbsCreate"/>' url: '<c:url value="/framework/biz/mng/bbs/modifyBoardCreate"/>'
,data: $("#boardMaster").serialize() ,data: $("#boardMaster").serialize()
}); });
} }
,remove: () => { ,remove: () => {
$("input[name=useAt]").val('N'); $("input[name=useAt]").val('N');
cmmBizAjax('remove', { cmmBizAjax('remove', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBbsCreate"/>' url: '<c:url value="/framework/biz/mng/bbs/modifyBoardCreate"/>'
,data: $("#boardMaster").serialize() ,data: $("#boardMaster").serialize()
}); });
} }

@ -63,7 +63,7 @@
GRID.reloadData(); GRID.reloadData();
} }
,pagePopup: function(flag, params){ ,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/bbs/mngBbsTmplMgtPopup.do"/>'; let url = '<c:url value="/framework/biz/mng/bbs/mngBoardTmplMgtPopup.do"/>';
let popTitle; let popTitle;
let popOption = {width: 530, height:410}; let popOption = {width: 530, height:410};
switch (flag) { switch (flag) {
@ -193,7 +193,7 @@
initialRequest: true, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/framework/biz/mng/bbs/findBbsTmpls.do"/>' url: '<c:url value="/framework/biz/mng/bbs/findBoardTmpls.do"/>'
,serializer: (params) => { ,serializer: (params) => {
const schKey = $('#searchCondition').val(); const schKey = $('#searchCondition').val();
let schValue = $('input[name=searchKeyword]').val(); let schValue = $('input[name=searchKeyword]').val();

@ -56,6 +56,7 @@
<td> <td>
<input type="radio" name="useAt" class="validate-one-required" value="Y" <c:if test="${templateInf.useAt == 'Y' || !isUpdate}">checked</c:if>>&nbsp;Y <input type="radio" name="useAt" class="validate-one-required" value="Y" <c:if test="${templateInf.useAt == 'Y' || !isUpdate}">checked</c:if>>&nbsp;Y
<input type="radio" name="useAt" class="validate-one-required" value="N" <c:if test="${templateInf.useAt == 'N'}">checked</c:if>> N <input type="radio" name="useAt" class="validate-one-required" value="N" <c:if test="${templateInf.useAt == 'N'}">checked</c:if>> N
<form:errors path="useAt" />
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -96,7 +97,7 @@
if (!fnBiz.validate()) return; if (!fnBiz.validate()) return;
cmmBizAjax('add', { cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/bbs/addBbsTmpl.do"/>' url: '<c:url value="/framework/biz/mng/bbs/addBoardTmpl.do"/>'
, data: $("#templateInf").serialize() , data: $("#templateInf").serialize()
}) })
} }
@ -104,14 +105,14 @@
if (!fnBiz.validate()) return; if (!fnBiz.validate()) return;
cmmBizAjax('modify', { cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBbsTmpl.do"/>' url: '<c:url value="/framework/biz/mng/bbs/modifyBoardTmpl.do"/>'
,data: $("#templateInf").serialize() ,data: $("#templateInf").serialize()
}); });
} }
,remove: () => { ,remove: () => {
$("input[name=useAt]").val('N'); $("input[name=useAt]").val('N');
cmmBizAjax('remove', { cmmBizAjax('remove', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBbsTmpl.do"/>' url: '<c:url value="/framework/biz/mng/bbs/modifyBoardTmpl.do"/>'
,data: $("#templateInf").serialize() ,data: $("#templateInf").serialize()
}); });
} }
@ -137,7 +138,7 @@
,preview: () => { ,preview: () => {
if ($("#tmplatSeCode").val() === 'TMPT01') { if ($("#tmplatSeCode").val() === 'TMPT01') {
const url = "<c:url value='/framework/biz/mng/bbs/mngBbsTmplPreviewPopup.do'/>"; const url = "<c:url value='/framework/biz/mng/bbs/mngBoardTmplPreviewPopup.do'/>";
CmmPopup.open(url, {tmplateCours: $("#tmplatCours").val()}, {width: 1024, height: 500}, "템플릿 미리보기"); CmmPopup.open(url, {tmplateCours: $("#tmplatCours").val()}, {width: 1024, height: 500}, "템플릿 미리보기");
} else { } else {
alert('템플릿경로 지정 후 선택해 주세요.'); alert('템플릿경로 지정 후 선택해 주세요.');

@ -61,7 +61,7 @@
GRID.reloadData(); GRID.reloadData();
} }
,pagePopup: function(flag, params){ ,pagePopup: function(flag, params){
let url = '<c:url value="/framework/biz/mng/bbs/mngBbsUseMgtPopup.do"/>'; let url = '<c:url value="/framework/biz/mng/bbs/mngBoardUseMgtPopup.do"/>';
let popTitle; let popTitle;
let popOption = {width: 840, height:410}; let popOption = {width: 840, height:410};
switch (flag) { switch (flag) {
@ -189,7 +189,7 @@
initialRequest: true, // 화면 load시 조회 안함 - default initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/framework/biz/mng/bbs/findBbsPrcuseList.do"/>' url: '<c:url value="/framework/biz/mng/bbs/findBoardPrcuseList.do"/>'
,serializer: (params) => { ,serializer: (params) => {
const schKey = $('#searchCondition').val(); const schKey = $('#searchCondition').val();
let schValue = $('input[name=searchKeyword]').val(); let schValue = $('input[name=searchKeyword]').val();

@ -0,0 +1,160 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="isUpdate" value="${!empty boardUseInf.bbsId}"/>
<c:set var="bizName" value="게시판 사용"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="boardUseInf" staticJavascript="false" xhtml="true" cdata="false"/>
<div class="popup" style="min-width: 100px;">
<div class="popup_inner" style="max-width: 800px;">
<%@include file="/WEB-INF/jsp/framework/biz-popup-title.jsp" %>
<form id="boardUseInf" name="boardUseInf">
<table class="tbl03">
<caption><c:out value="${bizName}"/> 등록 / 변경</caption>
<colgroup>
<col style="width: 20%;"/>
<col/>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<th class="required" scope="row" nowrap>
<label for="bbsNm">게시판명</label>
</th>
<td colspan="3">
<input id="bbsNm" title="게시판명" size="60" maxlength="60" value="${boardUseInf.bbsNm}"/>
<input type="hidden" id="bbsId" value="${boardUseInf.bbsId}"/>
<form:errors path="bbsNm" />
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label for="trgetNm">커뮤니티/동호회 명</label>
</th>
<td colspan="3">
<c:choose>
<c:when test="${not empty boardUseInf.cmmntyNm}">
<c:out value="${boardUseInf.cmmntyNm}" />
<input style="width: 40%" type="hidden" name="trgetNm" value="${boardUseInf.cmmntyNm}" size="40" title="" readOnly />
</c:when>
<c:when test="${not empty boardUseInf.clbNm}">
<c:out value="${boardUseInf.clbNm}" />
<input style="width: 40%" type="hidden" name="trgetNm" value="${boardUseInf.cmmntyNm}" size="40" title="" readOnly />
</c:when>
<c:otherwise>
(시스템 활용)
<input style="width: 40%" type="hidden" name="trgetNm" value="(시스템 활용)" size="40" title="" readOnly />
</c:otherwise>
</c:choose>
<%-- <form:errors path="trgetNm" />--%>
</td>
</tr>
<tr>
<th class="required" scope="row" nowrap>
<label>사용여부</label>
</th>
<td colspan="3">
<input type="radio" name="useAt" class="validate-one-required" value="Y" <c:if test="${boardUseInf.useAt == 'Y' || !isUpdate}">checked</c:if>>&nbsp;사용
<input type="radio" name="useAt" class="validate-one-required" value="N" <c:if test="${boardUseInf.useAt == 'N'}">checked</c:if>> 사용중지
<%-- <form:errors path="useAt" />--%>
</td>
</tr>
<c:choose>
<c:when test="${not empty boardUseInf.provdUrl}">
<tr>
<th width="20%" height="23" class="" nowrap >제공 URL</th>
<td width="80%" nowrap colspan="3">
<a href="<c:url value="${boardUseInf.provdUrl}?tilesDef=base" />" target="_blank">
<c:url value="${boardUseInf.provdUrl}" />
</a>
</td>
</tr>
</c:when>
</c:choose>
</tbody>
</table>
</form>
<%@include file="/WEB-INF/jsp/framework/biz-popup-use-btn.jsp" %>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/showModalDialog.js'/>" ></script>
<script type="text/javascript">
/**************************************************************************
* Global Variable
**************************************************************************/
let orgData;
/* *******************************
* Biz function
******************************* */
const fnBiz = {
add: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/bbs/addBoardPrcuse"/>'
, data: $("#boardUseInf").serialize()
})
}
,modify: () => {
if (!fnBiz.validate()) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBoardPrcuse"/>'
,data: $("#boardUseInf").serialize()
});
}
,remove: () => {
$("input[name=useAt]").val('N');
cmmBizAjax('remove', {
url: '<c:url value="/framework/biz/mng/bbs/modifyBoardPrcuse"/>'
,data: $("#boardUseInf").serialize()
});
}
,validate: () => {
if(orgData === $('form').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
if(!validateBoardUseInf(document.getElementById("boardUseInf"))) return false;
return true;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnRegist').on('click', () => {
fnBiz.add();
});
$('#btnModify').on('click', () => {
fnBiz.modify();
});
$('#btnPreview').on('click', () => {
fnBiz.preview();
});
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
orgData = $('form').serialize();
});
</script>
Loading…
Cancel
Save