--- COMMIT MESSAGE ---

타입: 제목 - 50 자 이내로 요약
feat: bbs 기능추가
 본문 - 한 줄에 최대 72 글자까지만 입력 / 여러줄 입력시 '-' 로 구분

 꼬릿말은 아래에 작성: ex) #123 / closed: #123
 closed, fixed, resolved 예약어와 이슈번호를 함께 사용시 해당 이슈 자동 종료

 --- COMMIT MESSAGE END ---

 <타입> 리스트
    feat : 기능(새로운 기능)
    fix : 버그 수정
    chore : 기타 변경 사항(빌드 혹은 패키지 매지저 등)
    style : 비즈니스 로직에 영향을 주지 않는 변경 사항(코드 형식 등)
    refactor : 리팩토링
    test : 테스트(테스트 코드: 비즈니스 로직 변경 없음)
    docs : 문서
    build : 빌드 관련 파일 수정
    ci : CI 관련 설정
 -----------------------
    제목 첫 글자를 대문자로
    제목은 명령문으로
    제목 끝에 마침표(.) 금지
    제목과 본문을 한 줄 띄워 분리하기
    본문은 "어떻게" 보다 "무엇을", "왜"를 설명한다.
    본문에 여러줄의 메시지를 작성할 땐 "-"로 구분
 -----------------------
    작성 예
 --------------------------------------
    feat: 관심지역 알림 ON/OFF 기능 추가

    - 시군구의 알림을 각각 ON/OFF 할 수 있도록 기능을 추가함
    - opnion0055: 구분 코드

    이슈트래커 #123  - fix 타입 메세지등은 closed #123 등
 ---------------------------------------
main
sjh88 2 years ago
parent 6ddf713b29
commit 8a03d3b9a7

@ -0,0 +1,33 @@
package kr.xit.framework.biz.mng.bbs.mapper;
import egovframework.rte.psl.dataaccess.mapper.Mapper;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 16. 9:38:07
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface IBoardBasicMgtMapper {
List<XitBasicBbsMngVO> selectBoardBasics(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBasicBbsMngVO> selectBoardBasics(final T t);
<T> XitBasicBbsMngVO selectBoardBasic(final T t);
int insertBoardBasic(final XitBasicBbsMngVO vo);
int updateBoardBasic(final XitBasicBbsMngVO vo);
<T> int deleteBoardBasic(final T t);
}

@ -3,6 +3,7 @@ package kr.xit.framework.biz.mng.bbs.model;
import java.util.List; import java.util.List;
import kr.xit.framework.core.model.BaseVO; import kr.xit.framework.core.model.BaseVO;
import lombok.*;
/** /**
* *
@ -14,7 +15,14 @@ import kr.xit.framework.core.model.BaseVO;
* @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 class XitBasicBbsMngVO extends BaseVO { @Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@Builder
@ToString
public class XitBasicBbsMngVO {
/** /**
* serialVersionUID * serialVersionUID
@ -158,593 +166,4 @@ public class XitBasicBbsMngVO extends BaseVO {
// 2020.09.15 : tui-grid tree구조 변수 // 2020.09.15 : tui-grid tree구조 변수
//--------------------------------- //---------------------------------
List<XitBasicBbsMngVO> _children; List<XitBasicBbsMngVO> _children;
/**
* atchFileId attribute .
* @return the atchFileId
*/
public String getAtchFileId() {
return atchFileId;
}
/**
* atchFileId attribute .
* @param atchFileId the atchFileId to set
*/
public void setAtchFileId(String atchFileId) {
this.atchFileId = atchFileId;
}
/**
* bbsId attribute .
* @return the bbsId
*/
public String getBbsId() {
return bbsId;
}
/**
* bbsId attribute .
* @param bbsId the bbsId to set
*/
public void setBbsId(String bbsId) {
this.bbsId = bbsId;
}
/**
* frstRegisterId attribute .
* @return the frstRegisterId
*/
public String getFrstRegisterId() {
return frstRegisterId;
}
/**
* frstRegisterId attribute .
* @param frstRegisterId the frstRegisterId to set
*/
public void setFrstRegisterId(String frstRegisterId) {
this.frstRegisterId = frstRegisterId;
}
/**
* frstRegisterPnttm attribute .
* @return the frstRegisterPnttm
*/
public String getFrstRegisterPnttm() {
return frstRegisterPnttm;
}
/**
* frstRegisterPnttm attribute .
* @param frstRegisterPnttm the frstRegisterPnttm to set
*/
public void setFrstRegisterPnttm(String frstRegisterPnttm) {
this.frstRegisterPnttm = frstRegisterPnttm;
}
/**
* lastUpdusrId attribute .
* @return the lastUpdusrId
*/
public String getLastUpdusrId() {
return lastUpdusrId;
}
/**
* lastUpdusrId attribute .
* @param lastUpdusrId the lastUpdusrId to set
*/
public void setLastUpdusrId(String lastUpdusrId) {
this.lastUpdusrId = lastUpdusrId;
}
/**
* lastUpdusrPnttm attribute .
* @return the lastUpdusrPnttm
*/
public String getLastUpdusrPnttm() {
return lastUpdusrPnttm;
}
/**
* lastUpdusrPnttm attribute .
* @param lastUpdusrPnttm the lastUpdusrPnttm to set
*/
public void setLastUpdusrPnttm(String lastUpdusrPnttm) {
this.lastUpdusrPnttm = lastUpdusrPnttm;
}
/**
* ntceBgnde attribute .
* @return the ntceBgnde
*/
public String getNtceBgnde() {
return ntceBgnde;
}
/**
* ntceBgnde attribute .
* @param ntceBgnde the ntceBgnde to set
*/
public void setNtceBgnde(String ntceBgnde) {
this.ntceBgnde = ntceBgnde;
}
/**
* ntceEndde attribute .
* @return the ntceEndde
*/
public String getNtceEndde() {
return ntceEndde;
}
/**
* ntceEndde attribute .
* @param ntceEndde the ntceEndde to set
*/
public void setNtceEndde(String ntceEndde) {
this.ntceEndde = ntceEndde;
}
/**
* ntcrId attribute .
* @return the ntcrId
*/
public String getNtcrId() {
return ntcrId;
}
/**
* ntcrId attribute .
* @param ntcrId the ntcrId to set
*/
public void setNtcrId(String ntcrId) {
this.ntcrId = ntcrId;
}
/**
* ntcrNm attribute .
* @return the ntcrNm
*/
public String getNtcrNm() {
return ntcrNm;
}
/**
* ntcrNm attribute .
* @param ntcrNm the ntcrNm to set
*/
public void setNtcrNm(String ntcrNm) {
this.ntcrNm = ntcrNm;
}
/**
* nttCn attribute .
* @return the nttCn
*/
public String getNttCn() {
return nttCn;
}
/**
* nttCn attribute .
* @param nttCn the nttCn to set
*/
public void setNttCn(String nttCn) {
this.nttCn = nttCn;
}
/**
* nttId attribute .
* @return the nttId
*/
public long getNttId() {
return nttId;
}
/**
* nttId attribute .
* @param nttId the nttId to set
*/
public void setNttId(long nttId) {
this.nttId = nttId;
}
/**
* nttNo attribute .
* @return the nttNo
*/
public long getNttNo() {
return nttNo;
}
/**
* nttNo attribute .
* @param nttNo the nttNo to set
*/
public void setNttNo(long nttNo) {
this.nttNo = nttNo;
}
/**
* nttSj attribute .
* @return the nttSj
*/
public String getNttSj() {
return nttSj;
}
/**
* nttSj attribute .
* @param nttSj the nttSj to set
*/
public void setNttSj(String nttSj) {
this.nttSj = nttSj;
}
/**
* parnts attribute .
* @return the parnts
*/
public String getParnts() {
return parnts;
}
/**
* parnts attribute .
* @param parnts the parnts to set
*/
public void setParnts(String parnts) {
this.parnts = parnts;
}
/**
* password attribute .
* @return the password
*/
public String getPassword() {
return password;
}
/**
* password attribute .
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* inqireCo attribute .
* @return the inqireCo
*/
public int getInqireCo() {
return inqireCo;
}
/**
* inqireCo attribute .
* @param inqireCo the inqireCo to set
*/
public void setInqireCo(int inqireCo) {
this.inqireCo = inqireCo;
}
/**
* replyAt attribute .
* @return the replyAt
*/
public String getReplyAt() {
return replyAt;
}
/**
* replyAt attribute .
* @param replyAt the replyAt to set
*/
public void setReplyAt(String replyAt) {
this.replyAt = replyAt;
}
/**
* replyLc attribute .
* @return the replyLc
*/
public String getReplyLc() {
return replyLc;
}
/**
* replyLc attribute .
* @param replyLc the replyLc to set
*/
public void setReplyLc(String replyLc) {
this.replyLc = replyLc;
}
/**
* sortOrdr attribute .
* @return the sortOrdr
*/
public long getSortOrdr() {
return sortOrdr;
}
/**
* sortOrdr attribute .
* @param sortOrdr the sortOrdr to set
*/
public void setSortOrdr(long sortOrdr) {
this.sortOrdr = sortOrdr;
}
/**
* useAt attribute .
* @return the useAt
*/
public String getUseAt() {
return useAt;
}
/**
* useAt attribute .
* @param useAt the useAt to set
*/
public void setUseAt(String useAt) {
this.useAt = useAt;
}
/**
* ntceEnddeView attribute .
* @return the ntceEnddeView
*/
public String getNtceEnddeView() {
return ntceEnddeView;
}
/**
* ntceEnddeView attribute .
* @param ntceEnddeView the ntceEnddeView to set
*/
public void setNtceEnddeView(String ntceEnddeView) {
this.ntceEnddeView = ntceEnddeView;
}
/**
* ntceBgndeView attribute .
* @return the ntceBgndeView
*/
public String getNtceBgndeView() {
return ntceBgndeView;
}
/**
* ntceBgndeView attribute .
* @param ntceBgndeView the ntceBgndeView to set
*/
public void setNtceBgndeView(String ntceBgndeView) {
this.ntceBgndeView = ntceBgndeView;
}
/**
* isExpired attribute .
*
* @return the isExpired
*/
public String getIsExpired() {
return isExpired;
}
/**
* isExpired attribute .
*
* @param isExpired
* the isExpired to set
*/
public void setIsExpired(String isExpired) {
this.isExpired = isExpired;
}
/**
* parntsSortOrdr attribute .
*
* @return the parntsSortOrdr
*/
public String getParntsSortOrdr() {
return parntsSortOrdr;
}
/**
* parntsSortOrdr attribute .
*
* @param parntsSortOrdr
* the parntsSortOrdr to set
*/
public void setParntsSortOrdr(String parntsSortOrdr) {
this.parntsSortOrdr = parntsSortOrdr;
}
/**
* parntsReplyLc attribute .
*
* @return the parntsReplyLc
*/
public String getParntsReplyLc() {
return parntsReplyLc;
}
/**
* parntsReplyLc attribute .
*
* @param parntsReplyLc
* the parntsReplyLc to set
*/
public void setParntsReplyLc(String parntsReplyLc) {
this.parntsReplyLc = parntsReplyLc;
}
/**
* bbsTyCode attribute .
*
* @return the bbsTyCode
*/
public String getBbsTyCode() {
return bbsTyCode;
}
/**
* bbsTyCode attribute .
*
* @param bbsTyCode
* the bbsTyCode to set
*/
public void setBbsTyCode(String bbsTyCode) {
this.bbsTyCode = bbsTyCode;
}
/**
* bbsAttrbCode attribute .
*
* @return the bbsAttrbCode
*/
public String getBbsAttrbCode() {
return bbsAttrbCode;
}
/**
* bbsAttrbCode attribute .
*
* @param bbsAttrbCode
* the bbsAttrbCode to set
*/
public void setBbsAttrbCode(String bbsAttrbCode) {
this.bbsAttrbCode = bbsAttrbCode;
}
/**
* bbsNm attribute .
*
* @return the bbsNm
*/
public String getBbsNm() {
return bbsNm;
}
/**
* bbsNm attribute .
*
* @param bbsNm
* the bbsNm to set
*/
public void setBbsNm(String bbsNm) {
this.bbsNm = bbsNm;
}
/**
* fileAtchPosblAt attribute .
*
* @return the fileAtchPosblAt
*/
public String getFileAtchPosblAt() {
return fileAtchPosblAt;
}
/**
* fileAtchPosblAt attribute .
*
* @param fileAtchPosblAt
* the fileAtchPosblAt to set
*/
public void setFileAtchPosblAt(String fileAtchPosblAt) {
this.fileAtchPosblAt = fileAtchPosblAt;
}
/**
* posblAtchFileNumber attribute .
*
* @return the posblAtchFileNumber
*/
public int getPosblAtchFileNumber() {
return posblAtchFileNumber;
}
/**
* posblAtchFileNumber attribute .
*
* @param posblAtchFileNumber
* the posblAtchFileNumber to set
*/
public void setPosblAtchFileNumber(int posblAtchFileNumber) {
this.posblAtchFileNumber = posblAtchFileNumber;
}
/**
* replyPosblAt attribute .
*
* @return the replyPosblAt
*/
public String getReplyPosblAt() {
return replyPosblAt;
}
/**
* replyPosblAt attribute .
*
* @param replyPosblAt
* the replyPosblAt to set
*/
public void setReplyPosblAt(String replyPosblAt) {
this.replyPosblAt = replyPosblAt;
}
/**
* plusCount attribute .
* @return the plusCount
*/
public boolean isPlusCount() {
return plusCount;
}
/**
* plusCount attribute .
* @param plusCount the plusCount to set
*/
public void setPlusCount(boolean plusCount) {
this.plusCount = plusCount;
}
/**
* subPageIndex attribute .
* @return the subPageIndex
*/
public String getSubPageIndex() {
return subPageIndex;
}
/**
* subPageIndex attribute .
* @param subPageIndex the subPageIndex to set
*/
public void setSubPageIndex(String subPageIndex) {
this.subPageIndex = subPageIndex;
}
public String getFrstRegisterNm() {
return frstRegisterNm;
}
public void setFrstRegisterNm(String frstRegisterNm) {
this.frstRegisterNm = frstRegisterNm;
}
public List<XitBasicBbsMngVO> get_children() {
return _children;
}
public void set_children(List<XitBasicBbsMngVO> _children) {
this._children = _children;
}
} }

@ -0,0 +1,56 @@
package kr.xit.framework.biz.mng.bbs.service;
import kr.xit.framework.biz.mng.bbs.mapper.IBoardBasicMgtMapper;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
@RequiredArgsConstructor
@Service
public class BoardBasicMgtService implements IBoardBasicMgtService {
private final IBoardBasicMgtMapper mapper;
@Override
@Transactional(readOnly = true)
public List<XitBasicBbsMngVO> findBoardBasicList(final Map<String, Object> paraMap, final RowBounds rowBounds) {
return mapper.selectBoardBasics(paraMap, rowBounds);
}
@Override
@Transactional(readOnly = true)
public <T> List<XitBasicBbsMngVO> findBoardBasicList(final T t) {
return mapper.selectBoardBasics(t);
}
@Override
@Transactional(readOnly = true)
public <T> XitBasicBbsMngVO findBoardBasic(final T t) {
return mapper.selectBoardBasic(t);
}
@Override
@Transactional
public void addBoardBasic(final XitBasicBbsMngVO vo) {
vo.setFrstRegisterId(getUserUniqId());
mapper.insertBoardBasic(vo);
}
@Override
@Transactional
public void modifyBoardBasic(final XitBasicBbsMngVO vo) {
vo.setLastUpdusrId(getUserUniqId());
mapper.updateBoardBasic(vo);
}
@Override
@Transactional
public <T> void removeBoardBasic(final T t) {
mapper.deleteBoardBasic(t);
}
}

@ -0,0 +1,32 @@
package kr.xit.framework.biz.mng.bbs.service;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import kr.xit.framework.core.utils.XitCmmnUtil;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;
/**
*
* @: Service
* @:
* @: 2020. 4. 16. 9:38:56
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface IBoardBasicMgtService {
List<XitBasicBbsMngVO> findBoardBasicList(final Map<String, Object> paraMap, final RowBounds rowBounds);
<T> List<XitBasicBbsMngVO> findBoardBasicList(final T t);
<T> XitBasicBbsMngVO findBoardBasic(final T t);
void addBoardBasic(final XitBasicBbsMngVO vo);
void modifyBoardBasic(final XitBasicBbsMngVO vo);
<T> void removeBoardBasic(final T t);
default String getUserUniqId(){
return XitCmmnUtil.getUserUniqId();
}
}

@ -0,0 +1,100 @@
package kr.xit.framework.biz.mng.bbs.web;
import kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO;
import kr.xit.framework.biz.mng.bbs.service.IBoardBasicMgtService;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.ValidationError;
import kr.xit.framework.support.util.constants.MessageKey;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 16. 9:39:52
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@RequiredArgsConstructor
@Controller
@RequestMapping("/framework/biz/mng/bbs")
public class BoardBasicMgtController {
private final IBoardBasicMgtService service;
@RequestMapping(value = "/mngBoardBasicMgtForm")
public void mngBoardBasicMgtForm(){
}
@RequestMapping(value = "/mngBoardBasicSchPopup")
public ModelAndView mngBoardBasicSchPopup(@RequestParam final Map<String, Object> paraMap){
ModelAndView mav = new ModelAndView();
mav.addAllObjects(paraMap);
mav.addObject("pageTitle","템플릿 조회");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/bbs/mngBoardBasicSchPopup.popup");
return mav;
}
@RequestMapping(value = "/mngBoardBasicMgtPopup")
public ModelAndView mngBoardBasicMgtPopup(final XitBasicBbsMngVO vo) {
ModelAndView mav = new ModelAndView();
if(Checks.isNotEmpty(vo) && Checks.isNotEmpty(vo.getBbsId())){
mav.addObject("boardMaster", service.findBoardBasic(vo));
} else {
mav.addObject("boardMaster", vo);
}
mav.addObject("pageTitle", "게시판 템플릿 등록 / 변경");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH + "mng/bbs/mngBoardBasicMgtPopup.popup");
return mav;
}
@GetMapping(value = "/findBoardBasics")
public ModelAndView finsBoardBasics(@RequestParam final Map<String, Object> paraMap){
return ResultResponse.of(service.findBoardBasicList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
}
@PostMapping(value = "/addBoardBasic")
public ModelAndView addBoardBasic(final XitBasicBbsMngVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("boardMaster", vo, bindingResult);
service.addBoardBasic(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav;
}
@PostMapping(value = "/modifyBoardBasic")
public ModelAndView modifyBoardBasic(final XitBasicBbsMngVO vo, final BindingResult bindingResult){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
ValidationError.of("boardMaster", vo, bindingResult);
service.modifyBoardBasic(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav;
}
@PostMapping(value = "/removeBoardBasic")
public ModelAndView removeBoardBasic(final XitBasicBbsMngVO vo){
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeBoardBasic(vo);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
}
}

@ -0,0 +1,118 @@
<?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">
<mapper namespace="kr.xit.framework.biz.mng.bbs.mapper.IBoardBasicMgtMapper">
<!-- *************************************************************************************************************
* xit_bbs_basic : 게시판 기본
************************************************************************************************************** -->
<sql id="sqlBoardBasic">
SELECT xb.NTT_SJ AS "nttSj"
,xb.NTCR_ID AS "ntcrId"
,xb.NTCR_NM AS "ntcrNm"
,xb.NTT_NO AS "nttNo"
,xb.NTT_CN AS "nttCn"
,xb.PASSWORD AS "password"
,xb.FRST_REGISTER_ID AS "frstRegisterId"
,IFNULL (B.USER_NM, xb.NTCR_NM) AS "frstRegisterNm"
,DATE_FORMAT(xb.FRST_REGIST_PNTTM, '%Y-%m-%d') AS "frstRegisterPnttm"
,xb.NTCE_BEGIN_DE AS "ntceBgnde"
,xb.NTCE_END_DE AS "ntceEndde"
,xb.RDCNT AS "inqireCo"
,xb.USE_AT AS "useAt"
,xb.ATCH_FILE_ID AS "atchFileId"
,xb.BBS_ID AS "bbsId"
,xb.NTT_ID AS "nttId"
,xb.PARNTS_SNTNC_NO AS "parnts"
,xb.ANSWER_AT AS "replyAt"
,xb.ANSWER_LC AS "replyLc"
,xb.SORT_ORDR AS "sortOrdr"
,C.BBS_TY_CODE AS "bbsTyCode"
,C.BBS_ATTRB_CODE AS "bbsAttrbCode"
,C.REPLY_POSBL_AT AS "replyPosblAt"
,C.FILE_ATCH_POSBL_AT AS "fileAtchPosblAt"
,C.ATCH_POSBL_FILE_NUMBER AS "posblAtchFileNumber"
,C.BBS_NM AS "bbsNm"
FROM XIT_BBS xb
LEFT OUTER JOIN XIT_VW_USER_MASTR xvum ON xb.FRST_REGISTER_ID = B.ESNTL_ID
LEFT OUTER JOIN XIT_BBS_MASTR C ON xb.BBS_ID = C.BBS_ID
</sql>
<select id="selectBoardBasics" resultType="kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO">
/* board-mastr-mysql-mapper|selectBoardBasics-BBS 마스터(생성) 목록 조회|julim */
<include refid="sqlBoardBasic"/>
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(useAt)">
AND xbm.use_at = #{useAt}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(bbsNm)">
AND INSTR(xbm.bbs_nm, #{bbsNm}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(bbsTyCodeNm)">
AND INSTR(cdc.code_nm, #{bbsTyCodeNm}) > 0
</if>
</where>
ORDER BY xbm.frst_regist_pnttm DESC
</select>
<select id="selectBoardBasic" resultType="kr.xit.framework.biz.mng.bbs.model.XitBasicBbsMngVO">
/* boards-mastr-mysql-mapper|selectBoardBasic-BBS 마스터(생성) 정보 조회|julim */
<include refid="sqlBoardBasic"/>
WHERE xbm.bbs_id = #{bbsId}
</select>
<insert id="insertBoardBasic">
/* board-mastr-mysql-mapper|insertBoardBasic-BBS 마스터(생성) 정보 등록|julim */
INSERT
INTO xit_bbs_mastr (
bbs_id
, bbs_nm
, bbs_intrcn
, bbs_ty_code
, bbs_attrb_code
, atch_posbl_file_number
, atch_posbl_file_size
, tmplat_id
, use_at
, frst_regist_pnttm
, frst_register_id
) VALUES (
#{bbsId}
, #{bbsNm}
, #{bbsIntrcn}
, #{bbsTyCode}
, #{bbsAttrbCode}
, #{atchPosblFileNumber}
, #{atchPosblFileSize}
, #{tmplatId}
, #{useAt}
, NOW()
, #{frstRegisterId}
)
</insert>
<update id="updateBoardBasic">
/* board-mastr-mysql-mapper|updateBoardBasic-BBS 마스터(생성) 정보 변경|julim */
UPDATE xit_bbs_mastr
SET bbs_nm = IF(bbs_nm = #{bbsNm}, bbs_nm, #{bbsNm})
, bbs_intrcn = IF(bbs_intrcn = #{bbsIntrcn}, bbs_intrcn, #{bbsIntrcn})
, bbs_ty_code = IF(bbs_ty_code = #{bbsTyCode}, bbs_ty_code, #{bbsTyCode})
, bbs_attrb_code = IF(bbs_attrb_code = #{bbsAttrbCode}, bbs_attrb_code, #{bbsAttrbCode})
, atch_posbl_file_number = IF(atch_posbl_file_number = #{atchPosblFileNumber}, atch_posbl_file_number, #{atchPosblFileNumber})
, atch_posbl_file_size = IF(atch_posbl_file_size = #{atchPosblFileSize}, atch_posbl_file_size, #{atchPosblFileSize})
, tmplat_id = IF(tmplat_id = #{tmplatId}, tmplat_id, #{tmplatId})
, use_at = IF(use_at = #{useAt}, use_at, #{useAt})
, last_updt_pnttm = NOW()
, last_updusr_id = #{lastUpdusrId}
WHERE bbs_id = #{bbsId}
</update>
<delete id="deleteBoardBasic">
/* board-mastr-mysql-mapper|deleteBoardBasic-BBS 마스터(생성) 정보 삭제|julim */
DELETE
FROM xit_bbs_mastr
WHERE bbs_id = #{bbsId}
</delete>
</mapper>
Loading…
Cancel
Save