지방문화원 가입 여부 관련 삭제 처리 작업. 공지사항 진행중백업
This commit is contained in:
parent
a29ab81ad1
commit
9b49319fc9
120
src/main/java/nlib/bbs/service/ArticleVO.java
Normal file
120
src/main/java/nlib/bbs/service/ArticleVO.java
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
package nlib.bbs.service;
|
||||||
|
|
||||||
|
import nlib.cmm.service.PagingVO;
|
||||||
|
|
||||||
|
public class ArticleVO extends PagingVO {
|
||||||
|
|
||||||
|
private String articleId; /* 게시글ID */
|
||||||
|
private String mngOrgCd; /* 관리문화원코드 */
|
||||||
|
private String bdType; /* 게시판유형 */
|
||||||
|
private String title; /* 제목 */
|
||||||
|
private String content; /* 내용 */
|
||||||
|
|
||||||
|
// 공지사항관련
|
||||||
|
private String notiYn; /* 공지여부 */
|
||||||
|
private String openYn; /* 공개여부 */
|
||||||
|
private String postStartDate; /* 게시시작일자 */
|
||||||
|
private String postEndDate; /* 게시종료일자 */
|
||||||
|
|
||||||
|
private int viewCnt; /* 조회수 */
|
||||||
|
private String bdAttachFileId; /* 첨부파일아이디 */
|
||||||
|
|
||||||
|
private String regId; /* 등록자아이디 */
|
||||||
|
private String regDd; /* 등록일자 */
|
||||||
|
private String modId; /* 등록자아이디 */
|
||||||
|
private String modDd; /* 등록일자 */
|
||||||
|
|
||||||
|
|
||||||
|
public String getArticleId() {
|
||||||
|
return articleId;
|
||||||
|
}
|
||||||
|
public void setArticleId(String articleId) {
|
||||||
|
this.articleId = articleId;
|
||||||
|
}
|
||||||
|
public String getMngOrgCd() {
|
||||||
|
return mngOrgCd;
|
||||||
|
}
|
||||||
|
public void setMngOrgCd(String mngOrgCd) {
|
||||||
|
this.mngOrgCd = mngOrgCd;
|
||||||
|
}
|
||||||
|
public String getBdType() {
|
||||||
|
return bdType;
|
||||||
|
}
|
||||||
|
public void setBdType(String bdType) {
|
||||||
|
this.bdType = bdType;
|
||||||
|
}
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
public String getNotiYn() {
|
||||||
|
return notiYn;
|
||||||
|
}
|
||||||
|
public void setNotiYn(String notiYn) {
|
||||||
|
this.notiYn = notiYn;
|
||||||
|
}
|
||||||
|
public String getOpenYn() {
|
||||||
|
return openYn;
|
||||||
|
}
|
||||||
|
public void setOpenYn(String openYn) {
|
||||||
|
this.openYn = openYn;
|
||||||
|
}
|
||||||
|
public String getPostStartDate() {
|
||||||
|
return postStartDate;
|
||||||
|
}
|
||||||
|
public void setPostStartDate(String postStartDate) {
|
||||||
|
this.postStartDate = postStartDate;
|
||||||
|
}
|
||||||
|
public String getPostEndDate() {
|
||||||
|
return postEndDate;
|
||||||
|
}
|
||||||
|
public void setPostEndDate(String postEndDate) {
|
||||||
|
this.postEndDate = postEndDate;
|
||||||
|
}
|
||||||
|
public int getViewCnt() {
|
||||||
|
return viewCnt;
|
||||||
|
}
|
||||||
|
public void setViewCnt(int viewCnt) {
|
||||||
|
this.viewCnt = viewCnt;
|
||||||
|
}
|
||||||
|
public String getBdAttachFileId() {
|
||||||
|
return bdAttachFileId;
|
||||||
|
}
|
||||||
|
public void setBdAttachFileId(String bdAttachFileId) {
|
||||||
|
this.bdAttachFileId = bdAttachFileId;
|
||||||
|
}
|
||||||
|
public String getRegId() {
|
||||||
|
return regId;
|
||||||
|
}
|
||||||
|
public void setRegId(String regId) {
|
||||||
|
this.regId = regId;
|
||||||
|
}
|
||||||
|
public String getRegDd() {
|
||||||
|
return regDd;
|
||||||
|
}
|
||||||
|
public void setRegDd(String regDd) {
|
||||||
|
this.regDd = regDd;
|
||||||
|
}
|
||||||
|
public String getModId() {
|
||||||
|
return modId;
|
||||||
|
}
|
||||||
|
public void setModId(String modId) {
|
||||||
|
this.modId = modId;
|
||||||
|
}
|
||||||
|
public String getModDd() {
|
||||||
|
return modDd;
|
||||||
|
}
|
||||||
|
public void setModDd(String modDd) {
|
||||||
|
this.modDd = modDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,71 +1,43 @@
|
|||||||
|
|
||||||
package nlib.bbs.service;
|
package nlib.bbs.service;
|
||||||
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import java.util.HashMap;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* @Class Name : BoardService.java
|
|
||||||
*
|
|
||||||
* @Description : 게시물 관리 클래스
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 2021. 7. 19. KNKIM 최초 생성
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
|
||||||
* @since 2021. 7. 19.
|
|
||||||
* @version 1.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface BoardService
|
public interface BoardService
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* 공지사항
|
/*
|
||||||
*
|
* 게시글 목록을 조회한다.
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public DataApiResVO listNotices(DataApiReqVO reqVO);
|
public List<ArticleVO> listArticles(ArticleVO ArticleVO) throws Exception;
|
||||||
|
|
||||||
public DataApiResVO selectNotice(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 자주하는질문
|
|
||||||
*
|
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public DataApiResVO listFAQs(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO selectFAQ(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 묻고답하기
|
* 게시글 건수를 조회한다.
|
||||||
*
|
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public DataApiResVO listQnAs(DataApiReqVO reqVO);
|
public int countArticles(ArticleVO articleVO) throws Exception;
|
||||||
|
|
||||||
public DataApiResVO selectQnA(DataApiReqVO reqVO);
|
/**
|
||||||
|
* 조회수를 증가시킨다.
|
||||||
public DataApiResVO insertQnA(DataApiReqVO reqVO);
|
*
|
||||||
|
* @param
|
||||||
public DataApiResVO verifyWriter(DataApiReqVO reqVO);
|
* @return
|
||||||
|
* @throws Exception
|
||||||
public DataApiResVO updateQnA(DataApiReqVO reqVO);
|
*/
|
||||||
|
public int updateRead(ArticleVO notiVO) throws Exception;
|
||||||
public DataApiResVO deleteQnA(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 상세 내용을 조회한다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public ArticleVO selectArticle(ArticleVO notiVO) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
71
src/main/java/nlib/bbs/service/BoardServiceApi.java
Normal file
71
src/main/java/nlib/bbs/service/BoardServiceApi.java
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
package nlib.bbs.service;
|
||||||
|
|
||||||
|
import nlib.restful.service.DataApiReqVO;
|
||||||
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : BoardService.java
|
||||||
|
*
|
||||||
|
* @Description : 게시물 관리 클래스
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 7. 19. KNKIM 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||||
|
* @since 2021. 7. 19.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface BoardServiceApi
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 공지사항
|
||||||
|
*
|
||||||
|
* @param reqVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DataApiResVO listNotices(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO selectNotice(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 자주하는질문
|
||||||
|
*
|
||||||
|
* @param reqVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DataApiResVO listFAQs(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO selectFAQ(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 묻고답하기
|
||||||
|
*
|
||||||
|
* @param reqVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DataApiResVO listQnAs(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO selectQnA(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO insertQnA(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO verifyWriter(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO updateQnA(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
public DataApiResVO deleteQnA(DataApiReqVO reqVO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
70
src/main/java/nlib/bbs/service/impl/AncmntDAO.java
Normal file
70
src/main/java/nlib/bbs/service/impl/AncmntDAO.java
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
package nlib.bbs.service.impl;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||||
|
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||||
|
import nlib.cmm.service.NotificationVO;
|
||||||
|
import nlib.bbs.service.ArticleVO;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : AncmntDAO.java
|
||||||
|
*
|
||||||
|
* @Description : 공지사항 정보 제공 DAO
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 9. 13. KNKIM 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||||
|
* @since 2021. 9. 13.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Mapper("ancmntDAO")
|
||||||
|
public interface AncmntDAO {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 게시글 목록을 조회한다.
|
||||||
|
*/
|
||||||
|
public List<ArticleVO> listArticles(ArticleVO ArticleVO) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 건수를 조회한다.
|
||||||
|
*/
|
||||||
|
public int countArticles(ArticleVO ArticleVO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 조회수를 증가시킨다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int updateRead(ArticleVO notiVO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 상세 내용을 조회한다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public ArticleVO selectArticle(ArticleVO notiVO) throws Exception;
|
||||||
|
}
|
||||||
63
src/main/java/nlib/bbs/service/impl/AncmntServiceImpl.java
Normal file
63
src/main/java/nlib/bbs/service/impl/AncmntServiceImpl.java
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
package nlib.bbs.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import nlib.bbs.service.ArticleVO;
|
||||||
|
import nlib.bbs.service.BoardService;
|
||||||
|
|
||||||
|
@Service("ancmntService")
|
||||||
|
public class AncmntServiceImpl implements BoardService
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(AncmntServiceImpl.class);
|
||||||
|
|
||||||
|
@Resource(name="ancmntDAO")
|
||||||
|
private AncmntDAO ancmntDAO;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 게시글 목록을 조회한다.
|
||||||
|
*/
|
||||||
|
public List<ArticleVO> listArticles(ArticleVO articleVO) throws Exception {
|
||||||
|
|
||||||
|
return ancmntDAO.listArticles(articleVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 건수를 조회한다.
|
||||||
|
*/
|
||||||
|
public int countArticles(ArticleVO articleVO) throws Exception {
|
||||||
|
|
||||||
|
return ancmntDAO.countArticles(articleVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 조회수를 증가시킨다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int updateRead(ArticleVO articleVO) throws Exception {
|
||||||
|
return ancmntDAO.updateRead(articleVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 상세 내용을 조회한다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public ArticleVO selectArticle(ArticleVO articleVO) throws Exception {
|
||||||
|
updateRead(articleVO);
|
||||||
|
return ancmntDAO.selectArticle(articleVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,80 +1,70 @@
|
|||||||
|
|
||||||
package nlib.bbs.service.impl;
|
package nlib.bbs.service.impl;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import java.util.HashMap;
|
||||||
import org.slf4j.LoggerFactory;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import nlib.cmm.web.MainController;
|
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||||
import nlib.restful.DataApi;
|
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.cmm.service.NotificationVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.bbs.service.ArticleVO;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
@Repository("boardDAO")
|
import nlib.user.service.NlibLoginVO;
|
||||||
public class BoardDAO extends DataApi
|
import nlib.util.StringUtil;
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(BoardDAO.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주 자원의 URI
|
* <pre>
|
||||||
*/
|
* @Class Name : AncmntDAO.java
|
||||||
public static final String RESOURCE_URI = "/uac/service/board";
|
*
|
||||||
|
* @Description : 공지사항 정보 제공 DAO
|
||||||
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
*
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/notice/list");
|
*
|
||||||
return get(reqVO);
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
}
|
*
|
||||||
|
* </pre>
|
||||||
public DataApiResVO selectNotice(DataApiReqVO reqVO) {
|
*
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/notice");
|
* @ ------------ -------- ---------------------------
|
||||||
return get(reqVO);
|
* @ 수정일 수정자 수정내용
|
||||||
}
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 9. 13. KNKIM 최초 생성
|
||||||
public DataApiResVO listFAQs(DataApiReqVO reqVO) {
|
*
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/faq/list");
|
*
|
||||||
return get(reqVO);
|
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||||
}
|
* @since 2021. 9. 13.
|
||||||
|
* @version 1.0
|
||||||
public DataApiResVO selectFAQ(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/faq");
|
|
||||||
return get(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 묻고답하기 목록 조회한다.
|
|
||||||
*
|
*
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public DataApiResVO listQnAs(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/qna/list");
|
|
||||||
return get(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
public interface BoardDAO {
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
|
||||||
return get(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
/*
|
||||||
return null;
|
* 게시글 목록을 조회한다.
|
||||||
}
|
*/
|
||||||
|
public List<ArticleVO> listArticles(ArticleVO ArticleVO) throws Exception;
|
||||||
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
|
||||||
return post(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
|
||||||
return delete(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
|
||||||
return put(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 건수를 조회한다.
|
||||||
|
*/
|
||||||
|
public int countArticles(ArticleVO ArticleVO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 조회수를 증가시킨다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public int updateRead(ArticleVO notiVO) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 게시글 상세 내용을 조회한다.
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public ArticleVO selectArticle(ArticleVO notiVO) throws Exception;
|
||||||
}
|
}
|
||||||
80
src/main/java/nlib/bbs/service/impl/BoardDAOApi.java
Normal file
80
src/main/java/nlib/bbs/service/impl/BoardDAOApi.java
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
|
||||||
|
package nlib.bbs.service.impl;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import nlib.cmm.web.MainController;
|
||||||
|
import nlib.restful.DataApi;
|
||||||
|
import nlib.restful.service.DataApiReqVO;
|
||||||
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
|
||||||
|
@Repository("boardDAO")
|
||||||
|
public class BoardDAOApi extends DataApi
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(BoardDAOApi.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주 자원의 URI
|
||||||
|
*/
|
||||||
|
public static final String RESOURCE_URI = "/uac/service/board";
|
||||||
|
|
||||||
|
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/notice/list");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO selectNotice(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/notice");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO listFAQs(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/faq/list");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO selectFAQ(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/faq");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 묻고답하기 목록 조회한다.
|
||||||
|
*
|
||||||
|
* @param reqVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public DataApiResVO listQnAs(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/qna/list");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO selectQnA(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||||
|
return get(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO verifyWriter(DataApiReqVO reqVO) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO updateQnA(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||||
|
return post(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO deleteQnA(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||||
|
return delete(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataApiResVO insertQnA(DataApiReqVO reqVO) {
|
||||||
|
reqVO.setReqUrl(RESOURCE_URI + "/qna");
|
||||||
|
return put(reqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -7,17 +7,17 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardServiceApi;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
|
||||||
@Service("boardService")
|
@Service("boardService")
|
||||||
public class BoardServiceImpl implements BoardService
|
public class BoardServiceImpl implements BoardServiceApi
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(BoardServiceImpl.class);
|
private static final Logger log = LoggerFactory.getLogger(BoardServiceImpl.class);
|
||||||
|
|
||||||
@Resource(name = "boardDAO")
|
@Resource(name = "boardDAO")
|
||||||
private BoardDAO boardDAO;
|
private BoardDAOApi boardDAO;
|
||||||
|
|
||||||
|
|
||||||
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
public DataApiResVO listNotices(DataApiReqVO reqVO) {
|
||||||
|
|||||||
@ -10,827 +10,138 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
||||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardService;
|
||||||
|
import nlib.bbs.service.impl.AncmntServiceImpl;
|
||||||
|
import nlib.bbs.service.ArticleVO;
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
import nlib.cmm.crypto.AriaCrypto;
|
|
||||||
import nlib.cmm.crypto.NlibPasswordEncoder;
|
|
||||||
import nlib.cmm.service.CodeService;
|
|
||||||
import nlib.cmm.service.NlibProperty;
|
import nlib.cmm.service.NlibProperty;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
import nlib.user.service.NlibLoginVO;
|
|
||||||
import nlib.util.StringUtil;
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class AncmntController extends NlibCommonController
|
public class AncmntController extends NlibCommonController
|
||||||
{
|
{
|
||||||
// private static final Logger log = LoggerFactory.getLogger(AncmntController.class);
|
private static final Logger log = LoggerFactory.getLogger(AncmntController.class);
|
||||||
//
|
|
||||||
// static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
|
||||||
//
|
|
||||||
// @Resource(name = "boardService")
|
|
||||||
// private BoardService boardService;
|
|
||||||
//
|
|
||||||
// @Resource(name = "nlibPasswordEncoder")
|
|
||||||
// private NlibPasswordEncoder nlibPasswordEncoder;
|
|
||||||
//
|
|
||||||
// @Resource(name = "ariaCrypto")
|
|
||||||
// private AriaCrypto ariaCrypto;
|
|
||||||
//
|
|
||||||
// @Resource(name = "codeService")
|
|
||||||
// private CodeService codeService;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// @Autowired
|
|
||||||
// private AuthenticationManager authenticationManager;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 공지사항 목록 화면을 표출한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/listNotices.do")
|
|
||||||
// public String listNotices(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
// String articleType = paramMap.get("articleType");
|
|
||||||
// String message = paramMap.get("message");
|
|
||||||
//
|
|
||||||
// log.debug("listNotices > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listNotices > pageSize = " + pageSize);
|
|
||||||
// log.debug("listNotices > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("listNotices > articleType = " + articleType);
|
|
||||||
// log.debug("listNotices > message = " + message);
|
|
||||||
//
|
|
||||||
// // 페이징 사이즈 코드 목록 조회
|
|
||||||
// List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
|
||||||
//
|
|
||||||
// // 공지사항 유형 코드 목록 조회
|
|
||||||
// List<HashMap<String,String>> articleTypeCodes = codeService.listCodes("ARTICLE_TYPE");
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
// model.addAttribute("pageSizeCodes", pageSizeCodes);
|
|
||||||
// model.addAttribute("articleTypeCodes", articleTypeCodes);
|
|
||||||
// model.addAttribute("articleType" , articleType);
|
|
||||||
// model.addAttribute("message" , message);
|
|
||||||
//
|
|
||||||
// return "nlib/board/listNotices";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 공지사항 목록 조회한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping(value="/board/listNoticesAjax.do")
|
|
||||||
// public ResponseEntity<String> listNoticesAjax(HttpServletRequest req,
|
|
||||||
// Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
// String articleType = paramMap.get("articleType");
|
|
||||||
//
|
|
||||||
// log.debug("listNoticesAjax > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listNoticesAjax > pageSize = " + pageSize);
|
|
||||||
// log.debug("listNoticesAjax > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("listNoticesAjax > articleType = " + articleType);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
|
||||||
// reqVO.addInfoItem("articleType", articleType);
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.listNotices(reqVO);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // JSON변환 응답 처리
|
|
||||||
// //-------------------------------
|
|
||||||
// // JS-GRID 페이징 처리를 포함한 응답값 처리
|
|
||||||
// // {data: [{...}],
|
|
||||||
// // itemsCount: 255
|
|
||||||
// // }
|
|
||||||
// HashMap<String, Object> retMap = new HashMap<String, Object>();
|
|
||||||
// retMap.put("data", resVO.getList());
|
|
||||||
// retMap.put("itemsCount", resVO.getRecordTotCount());
|
|
||||||
//
|
|
||||||
// return makeResponseEntityJson(retMap);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 공지사항 상세 내용 조회한다.
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/selectNotice.do")
|
|
||||||
// public String selectNotice(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// // 목록 이동시 전달할 매개변수
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = paramMap.get("pageIndex");
|
|
||||||
// String pageSize = paramMap.get("pageSize");
|
|
||||||
// String articleType = paramMap.get("articleType");
|
|
||||||
// String message = paramMap.get("message");
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
//
|
|
||||||
// log.debug("selectNotice > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("selectNotice > pageSize = " + pageSize);
|
|
||||||
// log.debug("selectNotice > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("selectNotice > articleNo = " + articleNo);
|
|
||||||
// log.debug("selectNotice > message = " + message);
|
|
||||||
// log.debug("selectNotice > articleType = " + articleType);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.selectNotice(reqVO);
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("articleNo" , articleNo);
|
|
||||||
// model.addAttribute("article" , resVO.getInfo()); // 게시물 상세
|
|
||||||
// model.addAttribute("preArticle" , resVO.getList().get(0)); // 이전글 정보
|
|
||||||
// model.addAttribute("nextArticle" , resVO.getList().get(1)); // 다음글 정보
|
|
||||||
// model.addAttribute("message" , message);
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
// model.addAttribute("articleType" , articleType);
|
|
||||||
//
|
|
||||||
// return "nlib/board/selectNotice";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * FAQ 목록 화면을 표출한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/listFAQs.do")
|
|
||||||
// public String listFAQs(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
// String message = paramMap.get("message");
|
|
||||||
// String faqType = paramMap.get("faqType");
|
|
||||||
//
|
|
||||||
// log.debug("listFAQs > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listFAQs > pageSize = " + pageSize);
|
|
||||||
// log.debug("listFAQs > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("listFAQs > message = " + message);
|
|
||||||
// log.debug("listFAQs > faqType = " + faqType);
|
|
||||||
//
|
|
||||||
// DataApiReqVO reqVOforCode = new DataApiReqVO();
|
|
||||||
// reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVOforCode.setPageIndex(0);
|
|
||||||
// reqVOforCode.setPageSize(0);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// // 페이징 사이즈 코드 목록 조회
|
|
||||||
// List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
|
||||||
//
|
|
||||||
// // 유형 코드 목록 조회
|
|
||||||
// List<HashMap<String,String>> articleTypeCodes = codeService.listCodes("FAQ_TYPE");
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
// model.addAttribute("pageSizeCodes", pageSizeCodes);
|
|
||||||
// model.addAttribute("faqTypeCodes" , articleTypeCodes);
|
|
||||||
// model.addAttribute("message" , message);
|
|
||||||
// model.addAttribute("faqType" , faqType);
|
|
||||||
// model.addAttribute("faqType" , faqType);
|
|
||||||
//
|
|
||||||
// return "nlib/board/listFAQs";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * FAQ 목록 조회한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping(value="/board/listFAQsAjax.do")
|
|
||||||
// public ResponseEntity<String> listFAQsAjax(HttpServletRequest req,
|
|
||||||
// Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
// String faqType = paramMap.get("faqType");
|
|
||||||
//
|
|
||||||
// log.debug("listFAQsAjax > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listFAQsAjax > pageSize = " + pageSize);
|
|
||||||
// log.debug("listFAQsAjax > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("listFAQsAjax > faqType = " + faqType);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
|
||||||
// reqVO.addInfoItem("faqType", faqType);
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.listFAQs(reqVO);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // JSON변환 응답 처리
|
|
||||||
// //-------------------------------
|
|
||||||
// // JS-GRID 페이징 처리를 포함한 응답값 처리
|
|
||||||
// // {data: [{...}],
|
|
||||||
// // itemsCount: 255
|
|
||||||
// // }
|
|
||||||
// HashMap<String, Object> retMap = new HashMap<String, Object>();
|
|
||||||
// retMap.put("data", resVO.getList());
|
|
||||||
// retMap.put("itemsCount", resVO.getRecordTotCount());
|
|
||||||
//
|
|
||||||
// return makeResponseEntityJson(retMap);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 상세 내용 조회한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/selectFAQAjax.do")
|
|
||||||
// public ResponseEntity<String> selectFAQAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
//
|
|
||||||
// log.debug("selectQnA > articleNo = " + articleNo);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.selectFAQ(reqVO);
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// return makeResponseEntityJson(resVO.getInfo());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 목록 화면을 표출한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/listQnAs.do")
|
|
||||||
// public String listQnAs(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
// String message = paramMap.get("message");
|
|
||||||
//
|
|
||||||
// log.debug("listQnAs > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listQnAs > pageSize = " + pageSize);
|
|
||||||
// log.debug("listQnAs > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("listQnAs > message = " + message);
|
|
||||||
//
|
|
||||||
// // 페이징 사이즈 코드 목록 조회
|
|
||||||
// List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
// model.addAttribute("pageSizeCodes", pageSizeCodes);
|
|
||||||
// model.addAttribute("message" , message);
|
|
||||||
//
|
|
||||||
// return "nlib/board/listQnAs";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 목록 조회한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping(value="/board/listQnAsAjax.do")
|
|
||||||
// public ResponseEntity<String> listQnAsAjax(HttpServletRequest req,
|
|
||||||
// Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
|
||||||
//
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
// String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
//
|
|
||||||
// log.debug("listQnAsAjax > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("listQnAsAjax > pageSize = " + pageSize);
|
|
||||||
// log.debug("listQnAsAjax > searchKeyword = " + searchKeyword);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.listQnAs(reqVO);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // JSON변환 응답 처리
|
|
||||||
// //-------------------------------
|
|
||||||
// // JS-GRID 페이징 처리를 포함한 응답값 처리
|
|
||||||
// // {data: [{...}],
|
|
||||||
// // itemsCount: 255
|
|
||||||
// // }
|
|
||||||
// HashMap<String, Object> retMap = new HashMap<String, Object>();
|
|
||||||
// retMap.put("data", resVO.getList());
|
|
||||||
// retMap.put("itemsCount", resVO.getRecordTotCount());
|
|
||||||
//
|
|
||||||
// return makeResponseEntityJson(retMap);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 상세 내용 조회한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/selectQnA.do")
|
|
||||||
// public String selectQnA(HttpServletRequest req
|
|
||||||
// , Authentication authentication
|
|
||||||
// , @RequestParam Map<String, String> paramMap
|
|
||||||
// , ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// addParamFromInputFlash(paramMap, req);
|
|
||||||
//
|
|
||||||
// // 목록 이동시 전달할 매개변수
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = paramMap.get("pageIndex");
|
|
||||||
// String pageSize = paramMap.get("pageSize");
|
|
||||||
// String message = paramMap.get("message");
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
//
|
|
||||||
// log.debug("selectQnA > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("selectQnA > pageSize = " + pageSize);
|
|
||||||
// log.debug("selectQnA > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("selectQnA > articleNo = " + articleNo);
|
|
||||||
// log.debug("selectQnA > message = " + message);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.selectQnA(reqVO);
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("articleNo" , articleNo);
|
|
||||||
// model.addAttribute("article" , resVO.getInfo()); // 게시물 상세
|
|
||||||
// model.addAttribute("preArticle" , resVO.getList().get(0)); // 이전글 정보
|
|
||||||
// model.addAttribute("nextArticle" , resVO.getList().get(1)); // 다음글 정보
|
|
||||||
// model.addAttribute("message" , message);
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
//
|
|
||||||
// return "nlib/board/selectQnA";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 글작성화면을 표출한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/insertQnAForm.do")
|
|
||||||
// public String insertQnAForm(HttpServletRequest req, Authentication authentication
|
|
||||||
// , @RequestParam Map<String, String> paramMap
|
|
||||||
// , ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// // 입력 매개변수 출력 설정
|
|
||||||
// addParamsToModel(paramMap, model);
|
|
||||||
//
|
|
||||||
// NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
|
||||||
// if(StringUtil.isEmpty(paramMap.get("regUserName"))) model.addAttribute("regUserName", loginVO.getName());
|
|
||||||
// if(StringUtil.isEmpty(paramMap.get("email"))) model.addAttribute("regUserName", loginVO.getEmail());
|
|
||||||
//
|
|
||||||
// return "nlib/board/insertQnAForm";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 등록 처리한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @param authentication
|
|
||||||
// * @param paramMap
|
|
||||||
// * @param model
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/insertQnA.do")
|
|
||||||
// public String insertQnA(HttpServletRequest req
|
|
||||||
// , Authentication authentication
|
|
||||||
// , @RequestParam Map<String, String> paramMap
|
|
||||||
// , RedirectAttributes redirectAttrs
|
|
||||||
// , ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
|
||||||
//
|
|
||||||
// log.debug("paramMap > " + paramMap);
|
|
||||||
//
|
|
||||||
// String message = null;
|
|
||||||
// String authKey = createAuthKey(req, authentication);
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(authKey);
|
|
||||||
// reqVO.addInfoItem("boardNo" , "QNA");
|
|
||||||
// reqVO.addInfoItem("title" , paramMap.get("title"));
|
|
||||||
// reqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
|
||||||
// reqVO.addInfoItem("email" , paramMap.get("email"));
|
|
||||||
// reqVO.addInfoItem("contentQeust", paramMap.get("contentQeust"));
|
|
||||||
//
|
|
||||||
// String fileListJsonStr = paramMap.get("fileList");
|
|
||||||
// if(fileListJsonStr.startsWith("\"")) fileListJsonStr = fileListJsonStr.substring(1);
|
|
||||||
// if(fileListJsonStr.endsWith("\"")) fileListJsonStr = fileListJsonStr.substring(0, fileListJsonStr.length()-1);
|
|
||||||
// fileListJsonStr = fileListJsonStr.replaceAll("\\\\", "");
|
|
||||||
//
|
|
||||||
// log.debug("fileList : " + fileListJsonStr);
|
|
||||||
//
|
|
||||||
// /*
|
|
||||||
// ObjectMapper mapper = new ObjectMapper();
|
|
||||||
// List<Map<String, Object>> fileList = null;
|
|
||||||
// try {
|
|
||||||
// fileList = mapper.readValue(fileListJsonStr, new TypeReference<List<Map<String, Object>>>() {
|
|
||||||
// });
|
|
||||||
//
|
|
||||||
// for (Map<String, Object> map : fileList) {
|
|
||||||
// MapUtils.debugPrint(System.out, "map", map);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// } catch (JsonMappingException e) {
|
|
||||||
// // TODO Auto-generated catch block
|
|
||||||
// e.printStackTrace();
|
|
||||||
// } catch (JsonProcessingException e) {
|
|
||||||
// // TODO Auto-generated catch block
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// log.debug("fileMap =" + fileList);
|
|
||||||
// */
|
|
||||||
// reqVO.addInfoItem("fileList", fileListJsonStr);
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.insertQnA(reqVO);
|
|
||||||
//
|
|
||||||
// // 처리결과 확인
|
|
||||||
// if(!resVO.isSuccess()) {
|
|
||||||
// message = resVO.getResultMessage();
|
|
||||||
// redirectAttrs.addFlashAttribute("message", message);
|
|
||||||
// addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword");
|
|
||||||
// addParamsToRedirect(paramMap, redirectAttrs, null,
|
|
||||||
// "title,articlePassword,"
|
|
||||||
// + "regDate, regUserName, "
|
|
||||||
// + "email, contentQeust");
|
|
||||||
//
|
|
||||||
// return "redirect:/board/insertQnAForm.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// redirectAttrs.addFlashAttribute("pageSize", paramMap.get("pageSize"));
|
|
||||||
// redirectAttrs.addFlashAttribute("message", "성공적으로 등록되었습니다.");
|
|
||||||
//
|
|
||||||
// return "redirect:/board/listQnAs.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @RequestMapping("/board/verifyWriter.do")
|
|
||||||
// public String verifyWriter(HttpServletRequest req) throws Exception {
|
|
||||||
// return "nlib/board/verifyWriter";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 수정 화면 표출한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @param authentication
|
|
||||||
// * @param paramMap
|
|
||||||
// * @param model
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/updateQnAForm.do")
|
|
||||||
// public String updateQnAForm(HttpServletRequest req
|
|
||||||
// , Authentication authentication
|
|
||||||
// , @RequestParam Map<String, String> paramMap
|
|
||||||
// , ModelMap model
|
|
||||||
// , RedirectAttributes redirectAttrs
|
|
||||||
// ) throws Exception {
|
|
||||||
//
|
|
||||||
// // 목록 이동시 전달할 매개변수
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = paramMap.get("pageIndex");
|
|
||||||
// String pageSize = paramMap.get("pageSize");
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
// String articlePassword = paramMap.get("articlePassword");
|
|
||||||
//
|
|
||||||
// log.debug("updateQnAForm > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("updateQnAForm > pageSize = " + pageSize);
|
|
||||||
// log.debug("updateQnAForm > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("updateQnAForm > articleNo = " + articleNo);
|
|
||||||
// log.debug("updateQnAForm > articlePassword = " + articlePassword);
|
|
||||||
//
|
|
||||||
// if(StringUtil.isEmpty(articlePassword)) {
|
|
||||||
// redirectAttrs.addFlashAttribute("message", "비밀빈호가 올바르지 않습니다.(U1)");
|
|
||||||
//
|
|
||||||
// addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.selectQnA(reqVO);
|
|
||||||
//
|
|
||||||
// // 비밀번호 확인
|
|
||||||
// HashMap<String, Object> article = resVO.getInfo();
|
|
||||||
// String shaArticlePassword = nlibPasswordEncoder.encode(articlePassword);
|
|
||||||
// log.debug("updateQnAForm > 입력받은 비밀번호를 SHA256 암호화한 값 : " + shaArticlePassword);
|
|
||||||
//
|
|
||||||
// if(!shaArticlePassword.equals(article.get("articlePassword"))) {
|
|
||||||
// redirectAttrs.addFlashAttribute("message", "비밀번호가 올바르지 않습니다.(U2)");
|
|
||||||
// addParamsToRedirect(paramMap, redirectAttrs, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("articleNo" , articleNo);
|
|
||||||
// model.addAttribute("article" , resVO.getInfo());
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // 게시글 비밀번호 처리
|
|
||||||
// //-------------------------------
|
|
||||||
// // 비밀번호 : SHA-256 암호화 처리되어 DB에 저장되며,
|
|
||||||
// // 웹 화면에 표출될 때는 Aria로 articleNo를 Salt값으로 하여 재암호화처리하고 BASE64로 다시 한번 인코딩하여 표출함
|
|
||||||
// String encArticlePassword = StringUtil.encodeBase64(ariaCrypto.encode(shaArticlePassword));
|
|
||||||
// model.addAttribute("encArticlePassword", encArticlePassword);
|
|
||||||
//
|
|
||||||
// // 검색 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
//
|
|
||||||
// return "nlib/board/updateQnAForm";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 수정 처리한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @param authentication
|
|
||||||
// * @param paramMap
|
|
||||||
// * @param model
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/updateQnA.do")
|
|
||||||
// public String updateQnA(HttpServletRequest req
|
|
||||||
// , Authentication authentication
|
|
||||||
// , @RequestParam Map<String, String> paramMap
|
|
||||||
// , RedirectAttributes redirectAttrs
|
|
||||||
// , ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// log.debug("paramMap > " + paramMap);
|
|
||||||
//
|
|
||||||
// String message = null;
|
|
||||||
// String authKey = createAuthKey(req, authentication);
|
|
||||||
//
|
|
||||||
// // 목록 이동시 전달할 매개변수
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = paramMap.get("pageIndex");
|
|
||||||
// String pageSize = paramMap.get("pageSize");
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // 게시글 비밀번호 처리
|
|
||||||
// //-------------------------------
|
|
||||||
// // 비밀번호 : SHA-256 암호화 처리되어 DB에 저장되며,
|
|
||||||
// // 웹 화면에 표출될 때는 Aria로 articleNo를 Salt값으로 하여 재암호화처리하고 BASE64로 다시 한번 인코딩하여 표출함
|
|
||||||
// String encArticlePassword = paramMap.get("encArticlePassword");
|
|
||||||
// String checkArticlePassword = ariaCrypto.decode(StringUtil.decodeBase64(encArticlePassword));
|
|
||||||
// String articlePassword = paramMap.get("articlePassword");
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // 비밀번호 유효 체크
|
|
||||||
// //-------------------------------
|
|
||||||
// // 기존 정보 조회
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(authKey);
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo);
|
|
||||||
//
|
|
||||||
// DataApiResVO resVO = boardService.selectQnA(reqVO);
|
|
||||||
// String oldArticlePassword = resVO.getInfoItem("articlePassword");
|
|
||||||
// if(checkArticlePassword == null || !checkArticlePassword.equals(oldArticlePassword)) {
|
|
||||||
// redirectAttrs.addFlashAttribute("errorCode", "ERR_BRD_UPDTQNA");
|
|
||||||
// redirectAttrs.addFlashAttribute("errorMessage", "잘못된 접근입니다.");
|
|
||||||
// return "redirect:/alert/showError.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 새 글비밀번호가 존재하지 않는 경우, 기존 비밀번호 설정 처리
|
|
||||||
// if(StringUtil.isEmpty(articlePassword)) {
|
|
||||||
// articlePassword = checkArticlePassword;
|
|
||||||
// }
|
|
||||||
// // 새 글비밀번호가 입력된 경우, SHA256 암호화 처리하여 설정
|
|
||||||
// else {
|
|
||||||
// articlePassword = nlibPasswordEncoder.encode(articlePassword);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO updateReqVO = new DataApiReqVO();
|
|
||||||
// updateReqVO.setAuthKey(authKey);
|
|
||||||
// updateReqVO.addInfoItem("boardNo" , "QNA");
|
|
||||||
// updateReqVO.addInfoItem("articleNo" , articleNo);
|
|
||||||
// updateReqVO.addInfoItem("title" , paramMap.get("title"));
|
|
||||||
// updateReqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
|
||||||
// updateReqVO.addInfoItem("email" , paramMap.get("email"));
|
|
||||||
// updateReqVO.addInfoItem("contentQeust", paramMap.get("contentQeust"));
|
|
||||||
// updateReqVO.addInfoItem("articlePassword", articlePassword); // SHA256 글비밀번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO updateResVO = boardService.updateQnA(updateReqVO);
|
|
||||||
//
|
|
||||||
// // 처리결과 확인
|
|
||||||
// if(!updateResVO.isSuccess()) {
|
|
||||||
// message = updateResVO.getResultMessage();
|
|
||||||
// model.addAttribute("message", message);
|
|
||||||
// addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
// addParamsToModel(paramMap, model, "article"
|
|
||||||
// , "articleNo,articleType,"
|
|
||||||
// + "articleTypeName,title,articlePassword,readCount,"
|
|
||||||
// + "regDate, reguserName, repStats, "
|
|
||||||
// + "email, contentQeust, "
|
|
||||||
// + "contentQuestFile");
|
|
||||||
//
|
|
||||||
// return "redirect:/board/updateQnAForm.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("articleNo" , updateResVO.getInfoItem("articleNo")); // 신규등록된 게시물 ID
|
|
||||||
// model.addAttribute("message" , "성공적으로 수정되었습니다.");
|
|
||||||
//
|
|
||||||
// // 검색 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
//
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 묻고답하기 삭제한다.
|
|
||||||
// *
|
|
||||||
// * @param req
|
|
||||||
// * @param authentication
|
|
||||||
// * @param paramMap
|
|
||||||
// * @param model
|
|
||||||
// * @return
|
|
||||||
// */
|
|
||||||
// @RequestMapping("/board/deleteQnA.do")
|
|
||||||
// public String deleteQnA(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
//
|
|
||||||
// String message = null;
|
|
||||||
//
|
|
||||||
// // 목록 이동시 전달할 매개변수
|
|
||||||
// String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
// String pageIndex = paramMap.get("pageIndex");
|
|
||||||
// String pageSize = paramMap.get("pageSize");
|
|
||||||
//
|
|
||||||
// // 게시물 번호
|
|
||||||
// String articleNo = paramMap.get("articleNo");
|
|
||||||
// String articlePassword = paramMap.get("articlePassword");
|
|
||||||
//
|
|
||||||
// log.debug("deleteQnA > pageIndex = " + pageIndex);
|
|
||||||
// log.debug("deleteQnA > pageSize = " + pageSize);
|
|
||||||
// log.debug("deleteQnA > searchKeyword = " + searchKeyword);
|
|
||||||
// log.debug("deleteQnA > articleNo = " + articleNo);
|
|
||||||
// log.debug("deleteQnA > articlePassword = " + articlePassword);
|
|
||||||
//
|
|
||||||
// if(StringUtil.isEmpty(articlePassword)) {
|
|
||||||
// model.addAttribute("message", "글비밀빈호가 올바르지 않습니다.(D1)");
|
|
||||||
// addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //-------------------------------
|
|
||||||
// // REQ VO 구성
|
|
||||||
// //-------------------------------
|
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
|
||||||
// reqVO.setPageSize(pageSize);
|
|
||||||
// reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
//
|
|
||||||
// // 요청
|
|
||||||
// DataApiResVO resVO = boardService.selectQnA(reqVO);
|
|
||||||
//
|
|
||||||
// // 비밀번호 확인
|
|
||||||
// HashMap<String, Object> article = resVO.getInfo();
|
|
||||||
// String shaArticlePassword = nlibPasswordEncoder.encode(articlePassword);
|
|
||||||
// log.debug("updateQnAForm > 입력받은 비밀번호를 SHA256 암호화한 값 : " + shaArticlePassword);
|
|
||||||
//
|
|
||||||
// if(!shaArticlePassword.equals(article.get("articlePassword"))) {
|
|
||||||
// model.addAttribute("message", "글비밀번호가 올바르지 않습니다.(D2)");
|
|
||||||
// addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 삭제 처리
|
|
||||||
// DataApiResVO delResVO = boardService.deleteQnA(reqVO);
|
|
||||||
//
|
|
||||||
// // 처리결과 확인
|
|
||||||
// if(!delResVO.isSuccess()) {
|
|
||||||
// message = delResVO.getResultMessage();
|
|
||||||
// model.addAttribute("message", message);
|
|
||||||
// addParamsToModel(paramMap, model, null, "pageIndex,pageSize,searchKeyword,articleNo");
|
|
||||||
//
|
|
||||||
// return "redirect:/board/selectQnA.do";
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 반환 정보
|
|
||||||
// model.addAttribute("message" , "성공적으로 삭제되었습니다.");
|
|
||||||
//
|
|
||||||
// // 검색 정보
|
|
||||||
// model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
// model.addAttribute("pageSize" , pageSize);
|
|
||||||
// model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
//
|
|
||||||
// return "redirect:/board/listQnAs.do";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
static final int DEFUALT_PAGE_SIZE = NlibProperty.getInt("list.paging.page.size", 10);
|
||||||
|
|
||||||
|
@Resource(name = "ancmntService")
|
||||||
|
//private AncmntServiceImpl ancmntService;
|
||||||
|
private BoardService ancmntService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 목록 화면을 표시한다.
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/bbs/listAncmnts.do")
|
||||||
|
public String listAncmnts(
|
||||||
|
HttpServletRequest req,
|
||||||
|
@RequestParam Map<String, String> paramMap,
|
||||||
|
ArticleVO articleVO,
|
||||||
|
ModelMap model
|
||||||
|
) throws Exception {
|
||||||
|
|
||||||
|
int pageIndex = StringUtil.toNumber(paramMap.get("pageIndex"), 1);
|
||||||
|
int pageSize = StringUtil.toNumber(paramMap.get("pageSize"), DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
|
log.debug("listAncmnt > pageIndex = " + pageIndex);
|
||||||
|
log.debug("listAncmnt > pageSize = " + pageSize);
|
||||||
|
|
||||||
|
ArticleVO searchArticleVO = new ArticleVO();
|
||||||
|
searchArticleVO.setPageIndex(pageIndex);
|
||||||
|
searchArticleVO.setPageSize(pageSize);
|
||||||
|
|
||||||
|
model.addAttribute("searchArticleVO", searchArticleVO);
|
||||||
|
model.addAttribute("pageSize", pageSize);
|
||||||
|
model.addAttribute("pageIndex", pageIndex);
|
||||||
|
|
||||||
|
return "nlib/bbs/listAncmnts";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 목록 조회한다.
|
||||||
|
*
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value="/bbs/listAncmntsAjax.do")
|
||||||
|
public ResponseEntity<String> listAncmntsAjax(HttpServletRequest req,
|
||||||
|
Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
||||||
|
|
||||||
|
int pageIndex = StringUtil.toNumber(paramMap.get("pageIndex"), 1);
|
||||||
|
int pageSize = StringUtil.toNumber(paramMap.get("pageSize"), DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
|
log.debug("listNotificationsAjax > pageIndex = " + pageIndex);
|
||||||
|
log.debug("listNotificationsAjax > pageSize = " + pageSize);
|
||||||
|
|
||||||
|
|
||||||
|
ArticleVO searchNotificationtVO = new ArticleVO();
|
||||||
|
searchNotificationtVO.setPageIndex(pageIndex);
|
||||||
|
searchNotificationtVO.setPageSize(pageSize);
|
||||||
|
List<ArticleVO> list = ancmntService.listArticles(searchNotificationtVO);
|
||||||
|
|
||||||
|
int totRecordCount = ancmntService.countArticles(searchNotificationtVO);
|
||||||
|
|
||||||
|
//-------------------------------
|
||||||
|
// JSON변환 응답 처리
|
||||||
|
//-------------------------------
|
||||||
|
// JS-GRID 페이징 처리를 포함한 응답값 처리
|
||||||
|
// {data: [{...}],
|
||||||
|
// itemsCount: 255
|
||||||
|
// }
|
||||||
|
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||||
|
retMap.put("data", list);
|
||||||
|
retMap.put("itemsCount", totRecordCount);
|
||||||
|
|
||||||
|
return makeResponseEntityJson(retMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 알림 상세 내용 조회한다.
|
||||||
|
// *
|
||||||
|
// * @param req
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @RequestMapping("/cmm/selectNotificationAjax.do")
|
||||||
|
// public ResponseEntity<String> selectNotificationAjax(HttpServletRequest req, Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
|
||||||
|
//
|
||||||
|
// String notiId = paramMap.get("notiId"); // 알림ID
|
||||||
|
// String pageIndex = paramMap.get("pageIndex");
|
||||||
|
// String pageSize = paramMap.get("pageSize");
|
||||||
|
//
|
||||||
|
// log.debug("selectNotificationAjax > notiId = " + notiId);
|
||||||
|
//
|
||||||
|
// ArticleVO paramNotiVO = new ArticleVO();
|
||||||
|
// paramNotiVO.setNotiId(notiId);
|
||||||
|
// paramNotiVO.setRecvUserId(getMbInfoId(req));
|
||||||
|
// paramNotiVO.setPageIndex(pageIndex);
|
||||||
|
// paramNotiVO.setPageSize(pageSize);
|
||||||
|
//
|
||||||
|
// // 읽음처리 및 상세내용 조회
|
||||||
|
// ArticleVO articleVO = ancmntService.selectNotification(paramNotiVO);
|
||||||
|
//
|
||||||
|
// //-------------------------------
|
||||||
|
// // JSON변환 응답 처리
|
||||||
|
// //-------------------------------
|
||||||
|
// // JS-GRID 페이징 처리를 포함한 응답값 처리
|
||||||
|
// // {data: [{...}],
|
||||||
|
// // itemsCount: 255
|
||||||
|
// // }
|
||||||
|
// HashMap<String, Object> retMap = new HashMap<String, Object>();
|
||||||
|
// retMap.put("data", articleVO);
|
||||||
|
//
|
||||||
|
// return makeResponseEntityJson(retMap);
|
||||||
|
// }
|
||||||
|
//
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardServiceApi;
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
import nlib.cmm.crypto.AriaCrypto;
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.cmm.crypto.NlibPasswordEncoder;
|
import nlib.cmm.crypto.NlibPasswordEncoder;
|
||||||
@ -41,7 +41,7 @@ public class BoardController extends NlibCommonController
|
|||||||
static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
||||||
|
|
||||||
@Resource(name = "boardService")
|
@Resource(name = "boardService")
|
||||||
private BoardService boardService;
|
private BoardServiceApi boardService;
|
||||||
|
|
||||||
@Resource(name = "nlibPasswordEncoder")
|
@Resource(name = "nlibPasswordEncoder")
|
||||||
private NlibPasswordEncoder nlibPasswordEncoder;
|
private NlibPasswordEncoder nlibPasswordEncoder;
|
||||||
@ -119,7 +119,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||||
@ -171,7 +170,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||||
@ -216,7 +214,6 @@ public class BoardController extends NlibCommonController
|
|||||||
log.debug("listFAQs > faqType = " + faqType);
|
log.debug("listFAQs > faqType = " + faqType);
|
||||||
|
|
||||||
DataApiReqVO reqVOforCode = new DataApiReqVO();
|
DataApiReqVO reqVOforCode = new DataApiReqVO();
|
||||||
reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVOforCode.setPageIndex(0);
|
reqVOforCode.setPageIndex(0);
|
||||||
reqVOforCode.setPageSize(0);
|
reqVOforCode.setPageSize(0);
|
||||||
|
|
||||||
@ -265,7 +262,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||||
@ -307,7 +303,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
||||||
reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||||
|
|
||||||
@ -372,7 +367,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||||
@ -428,7 +422,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||||
@ -492,13 +485,11 @@ public class BoardController extends NlibCommonController
|
|||||||
log.debug("paramMap > " + paramMap);
|
log.debug("paramMap > " + paramMap);
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
String authKey = createAuthKey(req, authentication);
|
|
||||||
|
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(authKey);
|
|
||||||
reqVO.addInfoItem("boardNo" , "QNA");
|
reqVO.addInfoItem("boardNo" , "QNA");
|
||||||
reqVO.addInfoItem("title" , paramMap.get("title"));
|
reqVO.addInfoItem("title" , paramMap.get("title"));
|
||||||
reqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
reqVO.addInfoItem("regUserName" , paramMap.get("regUserName"));
|
||||||
@ -605,7 +596,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||||
@ -664,7 +654,6 @@ public class BoardController extends NlibCommonController
|
|||||||
log.debug("paramMap > " + paramMap);
|
log.debug("paramMap > " + paramMap);
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
String authKey = createAuthKey(req, authentication);
|
|
||||||
|
|
||||||
// 목록 이동시 전달할 매개변수
|
// 목록 이동시 전달할 매개변수
|
||||||
String searchKeyword = paramMap.get("searchKeyword");
|
String searchKeyword = paramMap.get("searchKeyword");
|
||||||
@ -688,7 +677,6 @@ public class BoardController extends NlibCommonController
|
|||||||
//-------------------------------
|
//-------------------------------
|
||||||
// 기존 정보 조회
|
// 기존 정보 조회
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(authKey);
|
|
||||||
reqVO.addInfoItem("articleNo", articleNo);
|
reqVO.addInfoItem("articleNo", articleNo);
|
||||||
|
|
||||||
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
DataApiResVO resVO = boardService.selectQnA(reqVO);
|
||||||
@ -712,7 +700,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO updateReqVO = new DataApiReqVO();
|
DataApiReqVO updateReqVO = new DataApiReqVO();
|
||||||
updateReqVO.setAuthKey(authKey);
|
|
||||||
updateReqVO.addInfoItem("boardNo" , "QNA");
|
updateReqVO.addInfoItem("boardNo" , "QNA");
|
||||||
updateReqVO.addInfoItem("articleNo" , articleNo);
|
updateReqVO.addInfoItem("articleNo" , articleNo);
|
||||||
updateReqVO.addInfoItem("title" , paramMap.get("title"));
|
updateReqVO.addInfoItem("title" , paramMap.get("title"));
|
||||||
@ -790,7 +777,6 @@ public class BoardController extends NlibCommonController
|
|||||||
// REQ VO 구성
|
// REQ VO 구성
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
reqVO.setPageIndex(pageIndex);
|
||||||
reqVO.setPageSize(pageSize);
|
reqVO.setPageSize(pageSize);
|
||||||
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
reqVO.addInfoItem("boardNo", "QNA"); // 게시판ID
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardServiceApi;
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
import nlib.cmm.crypto.AriaCrypto;
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.cmm.crypto.NlibPasswordEncoder;
|
import nlib.cmm.crypto.NlibPasswordEncoder;
|
||||||
@ -78,7 +78,6 @@ public class FaqController extends NlibCommonController {
|
|||||||
// log.debug("listFAQs > faqType = " + faqType);
|
// log.debug("listFAQs > faqType = " + faqType);
|
||||||
//
|
//
|
||||||
// DataApiReqVO reqVOforCode = new DataApiReqVO();
|
// DataApiReqVO reqVOforCode = new DataApiReqVO();
|
||||||
// reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVOforCode.setPageIndex(0);
|
// reqVOforCode.setPageIndex(0);
|
||||||
// reqVOforCode.setPageSize(0);
|
// reqVOforCode.setPageSize(0);
|
||||||
//
|
//
|
||||||
@ -127,7 +126,6 @@ public class FaqController extends NlibCommonController {
|
|||||||
// // REQ VO 구성
|
// // REQ VO 구성
|
||||||
// //-------------------------------
|
// //-------------------------------
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
// DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
// reqVO.setPageIndex(pageIndex);
|
||||||
// reqVO.setPageSize(pageSize);
|
// reqVO.setPageSize(pageSize);
|
||||||
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||||
@ -169,7 +167,6 @@ public class FaqController extends NlibCommonController {
|
|||||||
// // REQ VO 구성
|
// // REQ VO 구성
|
||||||
// //-------------------------------
|
// //-------------------------------
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
// DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
// reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||||
//
|
//
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||||
|
|
||||||
import nlib.bbs.service.BoardService;
|
import nlib.bbs.service.BoardServiceApi;
|
||||||
import nlib.cmm.NlibCommonController;
|
import nlib.cmm.NlibCommonController;
|
||||||
import nlib.cmm.crypto.AriaCrypto;
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.cmm.crypto.NlibPasswordEncoder;
|
import nlib.cmm.crypto.NlibPasswordEncoder;
|
||||||
@ -78,7 +78,6 @@ public class QnaController extends NlibCommonController
|
|||||||
// log.debug("listFAQs > faqType = " + faqType);
|
// log.debug("listFAQs > faqType = " + faqType);
|
||||||
//
|
//
|
||||||
// DataApiReqVO reqVOforCode = new DataApiReqVO();
|
// DataApiReqVO reqVOforCode = new DataApiReqVO();
|
||||||
// reqVOforCode.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVOforCode.setPageIndex(0);
|
// reqVOforCode.setPageIndex(0);
|
||||||
// reqVOforCode.setPageSize(0);
|
// reqVOforCode.setPageSize(0);
|
||||||
//
|
//
|
||||||
@ -127,7 +126,6 @@ public class QnaController extends NlibCommonController
|
|||||||
// // REQ VO 구성
|
// // REQ VO 구성
|
||||||
// //-------------------------------
|
// //-------------------------------
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
// DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.setPageIndex(pageIndex);
|
// reqVO.setPageIndex(pageIndex);
|
||||||
// reqVO.setPageSize(pageSize);
|
// reqVO.setPageSize(pageSize);
|
||||||
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
// reqVO.addInfoItem("searchKeyword", searchKeyword);
|
||||||
@ -169,7 +167,6 @@ public class QnaController extends NlibCommonController
|
|||||||
// // REQ VO 구성
|
// // REQ VO 구성
|
||||||
// //-------------------------------
|
// //-------------------------------
|
||||||
// DataApiReqVO reqVO = new DataApiReqVO();
|
// DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
// reqVO.setAuthKey(createAuthKey(req, authentication));
|
|
||||||
// reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
// reqVO.addInfoItem("boardNo", "FAQ"); // 게시판ID
|
||||||
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
// reqVO.addInfoItem("articleNo", articleNo); // 게시물번호
|
||||||
//
|
//
|
||||||
|
|||||||
@ -59,11 +59,6 @@ public class NlibCommonController {
|
|||||||
@Resource(name = "loginService")
|
@Resource(name = "loginService")
|
||||||
private LoginService _loginService;
|
private LoginService _loginService;
|
||||||
|
|
||||||
/**
|
|
||||||
* AuthKey 생성 시, 로그인하지 않은 사용자의 AuthKey 생성시 사용되는 접두어
|
|
||||||
*/
|
|
||||||
static final String ANONYMOUS_AUTH_KEY_PREFIX = "GST-";
|
|
||||||
|
|
||||||
private static final int INFO_ID_COUNCIL_CD = 1; /* 현재 지방문화원 코드를 지칭하는 식별자 */
|
private static final int INFO_ID_COUNCIL_CD = 1; /* 현재 지방문화원 코드를 지칭하는 식별자 */
|
||||||
private static final int INFO_ID_COUNCIL_NM = 2; /* 현재 지방문화원 명칭을 지칭하는 식별자 */
|
private static final int INFO_ID_COUNCIL_NM = 2; /* 현재 지방문화원 명칭을 지칭하는 식별자 */
|
||||||
|
|
||||||
@ -118,7 +113,7 @@ public class NlibCommonController {
|
|||||||
String mName;
|
String mName;
|
||||||
HashMap<String, Method> setterNames = new HashMap<String, Method>();
|
HashMap<String, Method> setterNames = new HashMap<String, Method>();
|
||||||
HashMap<String, Method> getterNames = new HashMap<String, Method>();
|
HashMap<String, Method> getterNames = new HashMap<String, Method>();
|
||||||
final String skipSetterList = "|setIp|setAlerted|setAuthKey|setAuthorityList|";
|
final String skipSetterList = "|setIp|setAlerted|setAuthorityList|";
|
||||||
for(Method m : methods) {
|
for(Method m : methods) {
|
||||||
mName = m.getName();
|
mName = m.getName();
|
||||||
if(skipSetterList.contains(mName)) continue;
|
if(skipSetterList.contains(mName)) continue;
|
||||||
@ -187,44 +182,6 @@ public class NlibCommonController {
|
|||||||
return (SecUserVO)authentication.getPrincipal();
|
return (SecUserVO)authentication.getPrincipal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 통합자료시스템 요청 시, 제공할 사용자정보 auth key 생성
|
|
||||||
* - 로그인 한 경우 : 사용자ID를 BASE64로 인코딩한 값
|
|
||||||
* - 로그인하지 않은 경우 : GST-세션ID
|
|
||||||
*
|
|
||||||
* @param request
|
|
||||||
* @param authentication
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String createAuthKey(HttpServletRequest request, Authentication authentication) {
|
|
||||||
|
|
||||||
String userId = null;
|
|
||||||
String authKey = null;
|
|
||||||
|
|
||||||
if(authentication != null) {
|
|
||||||
userId = ((NlibLoginVO)authentication.getPrincipal()).getMbInfoId();
|
|
||||||
}
|
|
||||||
|
|
||||||
authKey = makeAuthKey(userId, request.getSession().getId());
|
|
||||||
|
|
||||||
log.debug("createAuthKey > " + authKey);
|
|
||||||
|
|
||||||
return authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String makeAuthKey(String userId) {
|
|
||||||
return makeAuthKey(userId, null);
|
|
||||||
}
|
|
||||||
public static String makeAuthKey(String userId, String sessionId) {
|
|
||||||
|
|
||||||
if(nlib.util.StringUtil.isEmpty(userId)) {
|
|
||||||
if(nlib.util.StringUtil.isNotEmpty(sessionId)) return ANONYMOUS_AUTH_KEY_PREFIX + sessionId;
|
|
||||||
else return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Base64.getEncoder().encodeToString(userId.getBytes());
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResponseEntity<String> makeResponseEntityJson(DataApiResVO resVO) {
|
public ResponseEntity<String> makeResponseEntityJson(DataApiResVO resVO) {
|
||||||
|
|
||||||
// Convert Json
|
// Convert Json
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public class NotificationController extends NlibCommonController {
|
|||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(NotificationController.class);
|
private static final Logger log = LoggerFactory.getLogger(NotificationController.class);
|
||||||
|
|
||||||
static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
static final int DEFUALT_PAGE_SIZE = NlibProperty.getInt("list.paging.page.size", 10);
|
||||||
|
|
||||||
@Resource(name="notificationService")
|
@Resource(name="notificationService")
|
||||||
private NotificationService notificationService;
|
private NotificationService notificationService;
|
||||||
@ -75,8 +75,8 @@ public class NotificationController extends NlibCommonController {
|
|||||||
) throws Exception {
|
) throws Exception {
|
||||||
|
|
||||||
String mbInfoId = getMbInfoId(req);
|
String mbInfoId = getMbInfoId(req);
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
int pageIndex = StringUtil.toNumber(paramMap.get("pageIndex"), 1);
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
int pageSize = StringUtil.toNumber(paramMap.get("pageSize"), DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
log.debug("listNotifications > pageIndex = " + pageIndex);
|
log.debug("listNotifications > pageIndex = " + pageIndex);
|
||||||
log.debug("listNotifications > pageSize = " + pageSize);
|
log.debug("listNotifications > pageSize = " + pageSize);
|
||||||
@ -92,8 +92,8 @@ public class NotificationController extends NlibCommonController {
|
|||||||
|
|
||||||
model.addAttribute("notificationList", list);
|
model.addAttribute("notificationList", list);
|
||||||
model.addAttribute("searchNotificationVO", searchNotificationVO);
|
model.addAttribute("searchNotificationVO", searchNotificationVO);
|
||||||
model.addAttribute("pageSize", NlibProperty.getString("list.paging.page.size"));
|
model.addAttribute("pageSize", pageSize);
|
||||||
model.addAttribute("pageIndex", "1");
|
model.addAttribute("pageIndex", pageIndex);
|
||||||
|
|
||||||
|
|
||||||
return "nlib/cmm/listNotifications";
|
return "nlib/cmm/listNotifications";
|
||||||
@ -111,7 +111,7 @@ public class NotificationController extends NlibCommonController {
|
|||||||
|
|
||||||
String mbInfoId = getMbInfoId(req);
|
String mbInfoId = getMbInfoId(req);
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
int pageSize = StringUtil.toNumber(paramMap.get("pageSize"), DEFUALT_PAGE_SIZE);
|
||||||
|
|
||||||
log.debug("listNotificationsAjax > pageIndex = " + pageIndex);
|
log.debug("listNotificationsAjax > pageIndex = " + pageIndex);
|
||||||
log.debug("listNotificationsAjax > pageSize = " + pageSize);
|
log.debug("listNotificationsAjax > pageSize = " + pageSize);
|
||||||
|
|||||||
@ -149,13 +149,9 @@ public class InformServiceImpl implements InformService
|
|||||||
HashMap<String, String> addrInfo = informDAO.selectNCultureAddr(councilCd);
|
HashMap<String, String> addrInfo = informDAO.selectNCultureAddr(councilCd);
|
||||||
|
|
||||||
if(addrInfo != null) {
|
if(addrInfo != null) {
|
||||||
locInfo.put("ZIPCODE", addrInfo.get(""));
|
for(String key : addrInfo.keySet()) {
|
||||||
locInfo.put("ADDR1", addrInfo.get("ADDR1"));
|
locInfo.put(key, addrInfo.get(key));
|
||||||
locInfo.put("ADDR2", addrInfo.get("ADDR2"));
|
}
|
||||||
locInfo.put("TEL_NO", addrInfo.get("TEL_NO"));
|
|
||||||
locInfo.put("FAX_NO", addrInfo.get("FAX_NO"));
|
|
||||||
locInfo.put("LATITUDE", addrInfo.get("LATITUDE"));
|
|
||||||
locInfo.put("LONGITUDE", addrInfo.get("LONGITUDE"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return locInfo;
|
return locInfo;
|
||||||
|
|||||||
@ -151,10 +151,10 @@ public class InformController extends NlibCommonController {
|
|||||||
model.addAttribute("informTitle" , ret.get("TITLE"));
|
model.addAttribute("informTitle" , ret.get("TITLE"));
|
||||||
model.addAttribute("informContent", ret.get("CONTENT"));
|
model.addAttribute("informContent", ret.get("CONTENT"));
|
||||||
|
|
||||||
model.addAttribute("zipCode", ret.get("ZIPCODE"));
|
model.addAttribute("zipCode" , ret.get("ZIP_CODE"));
|
||||||
model.addAttribute("addr1", ret.get("ADDR1"));
|
model.addAttribute("address" , ret.get("ADDRESS"));
|
||||||
model.addAttribute("addr2", ret.get("ADDR2"));
|
model.addAttribute("addressDetail", ret.get("ADDRESS_DETAIL"));
|
||||||
model.addAttribute("telNo", ret.get("TEL_NO"));
|
model.addAttribute("phoneNo" , ret.get("PHONE_NO"));
|
||||||
model.addAttribute("faxNo" , ret.get("FAX_NO"));
|
model.addAttribute("faxNo" , ret.get("FAX_NO"));
|
||||||
model.addAttribute("latitude" , ret.get("LATITUDE"));
|
model.addAttribute("latitude" , ret.get("LATITUDE"));
|
||||||
model.addAttribute("longitude" , ret.get("LONGITUDE"));
|
model.addAttribute("longitude" , ret.get("LONGITUDE"));
|
||||||
|
|||||||
@ -90,7 +90,6 @@ public interface DataApiInterface {
|
|||||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||||
|
|
||||||
// 공통
|
// 공통
|
||||||
map.add("authKey", reqVO.getAuthKey());
|
|
||||||
map.add("rows", "" + reqVO.getPageSize());
|
map.add("rows", "" + reqVO.getPageSize());
|
||||||
map.add("page", "" + reqVO.getPageIndex());
|
map.add("page", "" + reqVO.getPageIndex());
|
||||||
|
|
||||||
@ -136,9 +135,6 @@ public interface DataApiInterface {
|
|||||||
if(StringUtil.isEmpty(reqVO.getReqUrl())) {
|
if(StringUtil.isEmpty(reqVO.getReqUrl())) {
|
||||||
return new DataApiResVO("ERR_NO_RURL", "데이터 요청 업무ID에 대한 URL/RUI 정보가 존재하지 않습니다.");
|
return new DataApiResVO("ERR_NO_RURL", "데이터 요청 업무ID에 대한 URL/RUI 정보가 존재하지 않습니다.");
|
||||||
}
|
}
|
||||||
if(StringUtil.isEmpty(reqVO.getAuthKey())) {
|
|
||||||
return new DataApiResVO("ERR_NO_AUTHKEY", "데이터 요청에 대한 권한키 정보가 존재하지 않습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,9 +31,6 @@ public class DataApiReqVO {
|
|||||||
public static final int DEFAULT_PAGE_SIZE = 10;
|
public static final int DEFAULT_PAGE_SIZE = 10;
|
||||||
public static final int DEFAULT_PAGE_INDEX = 1;
|
public static final int DEFAULT_PAGE_INDEX = 1;
|
||||||
|
|
||||||
/* 처리결과 */
|
|
||||||
private String authKey; /* 로그인키 */
|
|
||||||
|
|
||||||
/* 페이징 정보 */
|
/* 페이징 정보 */
|
||||||
private int pageIndex = 0; /* 요청 페이지 번호 */
|
private int pageIndex = 0; /* 요청 페이지 번호 */
|
||||||
private int pageSize = 0; /* 페이지별 표출할 레코드 수 */
|
private int pageSize = 0; /* 페이지별 표출할 레코드 수 */
|
||||||
@ -50,13 +47,6 @@ public class DataApiReqVO {
|
|||||||
String reqUrl; /* 요청업무ID에 대한 통합시스템의 응답 처리 프로그램 URI */
|
String reqUrl; /* 요청업무ID에 대한 통합시스템의 응답 처리 프로그램 URI */
|
||||||
|
|
||||||
// GET/SET
|
// GET/SET
|
||||||
public String getAuthKey() {
|
|
||||||
return authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuthKey(String authKey) {
|
|
||||||
this.authKey = authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPageIndex() {
|
public int getPageIndex() {
|
||||||
return (pageIndex < 1 ? DEFAULT_PAGE_INDEX : pageIndex);
|
return (pageIndex < 1 ? DEFAULT_PAGE_INDEX : pageIndex);
|
||||||
|
|||||||
@ -67,12 +67,10 @@ public class SampleDataApiController {
|
|||||||
@RequestMapping("/sample/getSampleInfo.do")
|
@RequestMapping("/sample/getSampleInfo.do")
|
||||||
public String getSampleInfo(@RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
|
public String getSampleInfo(@RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
|
||||||
|
|
||||||
String authKey = (String) commandMap.get("authKey");
|
|
||||||
String page = (String) commandMap.get("page");
|
String page = (String) commandMap.get("page");
|
||||||
String rows = (String) commandMap.get("rows");
|
String rows = (String) commandMap.get("rows");
|
||||||
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
DataApiReqVO reqVO = new DataApiReqVO();
|
||||||
reqVO.setAuthKey(authKey);
|
|
||||||
reqVO.setPageIndex(page);
|
reqVO.setPageIndex(page);
|
||||||
reqVO.setPageSize(rows);
|
reqVO.setPageSize(rows);
|
||||||
|
|
||||||
|
|||||||
@ -52,12 +52,12 @@ public class SecUserDetailsService implements UserDetailsService {
|
|||||||
* @see org.springframework.security.core.userdetails.UserDetailsService#loadUserByUsername(java.lang.String)
|
* @see org.springframework.security.core.userdetails.UserDetailsService#loadUserByUsername(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public UserDetails loadUserByUsername(String councilloginUserId) throws UsernameNotFoundException {
|
public UserDetails loadUserByUsername(String loginUserId) throws UsernameNotFoundException {
|
||||||
|
|
||||||
SecUserVO secUserVO = secUserDAO.loadUserByUsername(councilloginUserId);
|
SecUserVO secUserVO = secUserDAO.loadUserByUsername(loginUserId);
|
||||||
|
|
||||||
if(secUserVO == null) {
|
if(secUserVO == null) {
|
||||||
throw new UsernameNotFoundException(councilloginUserId);
|
throw new UsernameNotFoundException(loginUserId);
|
||||||
}
|
}
|
||||||
return secUserVO;
|
return secUserVO;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,6 +85,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers("/code/**").permitAll()
|
.antMatchers("/code/**").permitAll()
|
||||||
.antMatchers("/homes/**").permitAll()
|
.antMatchers("/homes/**").permitAll()
|
||||||
.antMatchers("/homes/**").permitAll()
|
.antMatchers("/homes/**").permitAll()
|
||||||
|
.antMatchers("/bbs/**").permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and().formLogin()
|
.and().formLogin()
|
||||||
.loginPage(NlibProperty.getString("login.url"))
|
.loginPage(NlibProperty.getString("login.url"))
|
||||||
|
|||||||
@ -20,7 +20,6 @@ public interface LoginService
|
|||||||
public final String ERR_CODE_DISABLE = "ERR_CODE_LOGIN_DISABLE"; /* 오류코드 : 계정유효하지 않음 */
|
public final String ERR_CODE_DISABLE = "ERR_CODE_LOGIN_DISABLE"; /* 오류코드 : 계정유효하지 않음 */
|
||||||
public final String ERR_CODE_MISMATCH = "ERR_CODE_LOGIN_MISMATCH"; /* 오류코드 : ID,PW일치하지 않음 */
|
public final String ERR_CODE_MISMATCH = "ERR_CODE_LOGIN_MISMATCH"; /* 오류코드 : ID,PW일치하지 않음 */
|
||||||
public final String ERR_CODE_EXC = "ERR_CODE_LOGIN_EXC"; /* 오류코드 : 기타오류 */
|
public final String ERR_CODE_EXC = "ERR_CODE_LOGIN_EXC"; /* 오류코드 : 기타오류 */
|
||||||
public final String ERR_CODE_REQ_AGREE = "ERR_CODE_REQ_AGREE"; /* 오류코드 : 해당지방문화원 정보제공 동의 필요 */
|
|
||||||
|
|
||||||
public final String WRN_CODE_DORMANT = "WRN_CODE_DOMANT"; /* 경고코드 : 휴면계정 */
|
public final String WRN_CODE_DORMANT = "WRN_CODE_DOMANT"; /* 경고코드 : 휴면계정 */
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,6 @@ public class NlibLoginVO implements Serializable {
|
|||||||
/* 보완 및 기타 사항 */
|
/* 보완 및 기타 사항 */
|
||||||
private String ip; /* 접속IP */
|
private String ip; /* 접속IP */
|
||||||
private String authorityList; /* 권한ROLE 리스트 */
|
private String authorityList; /* 권한ROLE 리스트 */
|
||||||
private String authKey; /* RESTful API : 접속인증코드 */
|
|
||||||
|
|
||||||
private String error = null; /* 처리 오류코드 */
|
private String error = null; /* 처리 오류코드 */
|
||||||
private String message = null; /* 처리 관련 메시지 */
|
private String message = null; /* 처리 관련 메시지 */
|
||||||
@ -108,32 +107,6 @@ public class NlibLoginVO implements Serializable {
|
|||||||
setBirthday (AriaCrypto.decode(getBirthday()));
|
setBirthday (AriaCrypto.decode(getBirthday()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
|
||||||
* 로그인되지 않은 자(userId값이 존재하지 않는경우)에 대해서는 null을 리턴한다.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getAndCreateAuthKey() {
|
|
||||||
return getOrCreateAuthKey(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
|
||||||
* 로그인되지 않은 자(userId값이 존재하지 않는경우)에 대해서는 세션ID를 기반으로한 손님용 인증키를 생성하여 리턴한다.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getOrCreateAuthKey(String sessionId) {
|
|
||||||
|
|
||||||
if(StringUtil.isNotEmpty(this.authKey)) return this.authKey;
|
|
||||||
|
|
||||||
// AuthKey 생성하여 리턴
|
|
||||||
this.authKey = NlibCommonController.makeAuthKey(this.mbInfoId, sessionId);
|
|
||||||
return this.authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 지방문화원코드+계정의 이름을 리턴한다. (사용자ID:email형식의 LOGIN_USER_ID 정보)
|
* 지방문화원코드+계정의 이름을 리턴한다. (사용자ID:email형식의 LOGIN_USER_ID 정보)
|
||||||
* Spring Security 처리 용
|
* Spring Security 처리 용
|
||||||
@ -142,7 +115,7 @@ public class NlibLoginVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
// 로그인하는 지방문화원 코드 + 로그인사용자ID
|
// 로그인하는 지방문화원 코드 + 로그인사용자ID
|
||||||
return StringUtil.getString(getJoinCouncilCd(), "") + "@" + getLoginUserId();
|
return getLoginUserId();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
@ -365,13 +338,6 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.authorityList = authorityList;
|
this.authorityList = authorityList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuthKey() {
|
|
||||||
return authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAuthKey(String authKey) {
|
|
||||||
this.authKey = authKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getError() {
|
public String getError() {
|
||||||
return error;
|
return error;
|
||||||
|
|||||||
@ -132,13 +132,6 @@ public class LoginServiceImpl implements LoginService
|
|||||||
return ERR_CODE_REQ_MEMBERSHIP;
|
return ERR_CODE_REQ_MEMBERSHIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 해당 지방문화원에 미등록된 경우, 정보제공 동의로 이동 처리 필요
|
|
||||||
if(StringUtil.isEmpty(nLoginVO.getJoinCouncilCd())) {
|
|
||||||
oUser.setNlibVO(nLoginVO);
|
|
||||||
return ERR_CODE_REQ_AGREE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Spring Security 로그인처리위한 token 생성하여 로그인 처리
|
// Spring Security 로그인처리위한 token 생성하여 로그인 처리
|
||||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getUsername(), nLoginVO.getPassword());
|
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getUsername(), nLoginVO.getPassword());
|
||||||
NlibLoginVO nlibLoginedVO = loginProcSecurity(req, token);
|
NlibLoginVO nlibLoginedVO = loginProcSecurity(req, token);
|
||||||
@ -169,10 +162,9 @@ public class LoginServiceImpl implements LoginService
|
|||||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||||
Authentication authentication = authenticationManager.authenticate(token);
|
Authentication authentication = authenticationManager.authenticate(token);
|
||||||
|
|
||||||
// AuthKey 생성 및 기타 정보 저장
|
// 기타 정보 저장
|
||||||
String sessionId = req.getSession().getId();
|
String sessionId = req.getSession().getId();
|
||||||
nlibLoginVO = (NlibLoginVO)authentication.getPrincipal();
|
nlibLoginVO = (NlibLoginVO)authentication.getPrincipal();
|
||||||
nlibLoginVO.getOrCreateAuthKey(sessionId); // SET AUTHKEY
|
|
||||||
nlibLoginVO.setIp(req.getRemoteAddr());
|
nlibLoginVO.setIp(req.getRemoteAddr());
|
||||||
|
|
||||||
// 지방문화원 정보
|
// 지방문화원 정보
|
||||||
@ -257,9 +249,7 @@ public class LoginServiceImpl implements LoginService
|
|||||||
// // AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
// // AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||||
// Authentication authentication = authenticationManager.authenticate(token);
|
// Authentication authentication = authenticationManager.authenticate(token);
|
||||||
//
|
//
|
||||||
// // AuthKey 등록
|
|
||||||
// SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
// SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
||||||
// userVO.getAndCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
|
||||||
//
|
//
|
||||||
// // 실제 SecurityContext 에 authentication 정보를 등록한다.
|
// // 실제 SecurityContext 에 authentication 정보를 등록한다.
|
||||||
// SecurityContextHolder.getContext().setAuthentication(authentication);
|
// SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||||
|
|||||||
@ -432,11 +432,6 @@ public class LoginController {
|
|||||||
return "redirect:" + NlibProperty.getString("login.dormant.url");
|
return "redirect:" + NlibProperty.getString("login.dormant.url");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 신규 지방문화원 정보 제공 동의 필요
|
|
||||||
if(StringUtil.equalsIgnoreCase(loginResult, loginService.ERR_CODE_REQ_AGREE)) {
|
|
||||||
return "redirect:" + NlibProperty.getString("login.newcouncil.url");
|
|
||||||
}
|
|
||||||
|
|
||||||
// SNS 로그인은 정상적이나, NLIB 시스템에 등록되지 않은 사용자 : 회원가입으로 전환
|
// SNS 로그인은 정상적이나, NLIB 시스템에 등록되지 않은 사용자 : 회원가입으로 전환
|
||||||
model.addAttribute("error", loginResult);
|
model.addAttribute("error", loginResult);
|
||||||
if(StringUtil.equalsIgnoreCase(loginResult, loginService.ERR_CODE_REQ_MEMBERSHIP)) {
|
if(StringUtil.equalsIgnoreCase(loginResult, loginService.ERR_CODE_REQ_MEMBERSHIP)) {
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
<typeAlias alias="NlibLoginVO" type="nlib.user.service.NlibLoginVO" />
|
<typeAlias alias="NlibLoginVO" type="nlib.user.service.NlibLoginVO" />
|
||||||
<typeAlias alias="SecUserVO" type="nlib.security.SecUserVO" />
|
<typeAlias alias="SecUserVO" type="nlib.security.SecUserVO" />
|
||||||
<typeAlias alias="NotificationVO" type="nlib.cmm.service.NotificationVO" />
|
<typeAlias alias="NotificationVO" type="nlib.cmm.service.NotificationVO" />
|
||||||
|
<typeAlias alias="ArticleVO" type="nlib.bbs.service.ArticleVO" />
|
||||||
</typeAliases>
|
</typeAliases>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><!--Converted at: Wed May 11 15:49:38 KST 2016-->
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="nlib.bbs.service.impl.AncmntDAO">
|
||||||
|
|
||||||
|
<select id="listArticles" parameterType="ArticleVO" resultType="ArticleVO">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
A.ANCMNT_ID
|
||||||
|
, A.MNG_ORG_CD
|
||||||
|
, B.DEPT_NM
|
||||||
|
, A.TITLE
|
||||||
|
, A.CONTENT
|
||||||
|
, A.NOTI_YN
|
||||||
|
, A.OPEN_YN
|
||||||
|
, A.POST_START_DATE
|
||||||
|
, A.POST_END_DATE
|
||||||
|
, A.VIEW_CNT
|
||||||
|
, A.BD_ATTACH_FILE_ID
|
||||||
|
, DATE_FORMAT(A.REG_DD, '%Y-%M-%D') AS REG_DD
|
||||||
|
FROM BD_NLIB_ANCMNT A
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT S.ANCMNT_ID
|
||||||
|
FROM BD_NLIB_ANCMNT S
|
||||||
|
WHERE OPEN_YN = 'Y'
|
||||||
|
AND DATE_FORMAT(NOW(), '%Y%m%d') BETWEEN IFNULL(POST_START_DATE,'00010101') AND IFNULL(POST_END_DATE, '99991231')
|
||||||
|
ORDER BY S.ANCMNT_ID DESC
|
||||||
|
LIMIT #{pageStartRowNum}, #{pageSize}
|
||||||
|
) AS A2
|
||||||
|
USING(ANCMNT_ID)
|
||||||
|
JOIN SM_DEPT B
|
||||||
|
ON B.ORG_CD = A.MNG_ORG_CD
|
||||||
|
WHERE 1=1
|
||||||
|
ORDER BY A.ANCMNT_ID DESC
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countArticles" parameterType="ArticleVO" resultType="Integer">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM BD_NLIB_ANCMNT A
|
||||||
|
WHERE OPEN_YN = 'Y'
|
||||||
|
AND DATE_FORMAT(NOW(), '%Y%m%d') BETWEEN IFNULL(POST_START_DATE,'00010101') AND IFNULL(POST_END_DATE, '99991231')
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectArticle" parameterType="ArticleVO" resultType="ArticleVO">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT A.*
|
||||||
|
FROM BD_NLIB_ANCMNT A
|
||||||
|
WHERE ANCMNT_ID = #{articleId}
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateRead" parameterType="ArticleVO">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE BD_NLIB_ANCMNT
|
||||||
|
SET VIEW_CNT = VIEW_CNT + 1
|
||||||
|
WHERE ANCMNT_ID = #{articleId}
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -34,17 +34,17 @@
|
|||||||
|
|
||||||
<select id="selectNCultureAddr" parameterType="String" resultType="HashMap">
|
<select id="selectNCultureAddr" parameterType="String" resultType="HashMap">
|
||||||
SELECT
|
SELECT
|
||||||
'서울 마포구 삼개로 16' AS ADDR1
|
DEPT_NM
|
||||||
, '근신빌딩' AS ADDR2
|
, ADDRESS
|
||||||
, '04173' AS ZIPCODE
|
, ADDRESS_DETAIL
|
||||||
, '02-1111-2222' AS TEL_NO
|
, ZIP_CODE
|
||||||
, '02-1111-3333' AS FAX_NO
|
, PHONE_NO
|
||||||
, '37.5392866' AS LATITUDE
|
, FAX_NO
|
||||||
, '126.9472778' AS LONGITUDE
|
, LATITUDE
|
||||||
|
, LONGITUDE
|
||||||
FROM SM_DEPT A
|
FROM SM_DEPT A
|
||||||
/*WHERE DEPT_SEQ = x{councilCd}*/
|
WHERE ORG_CD = #{councilCd}
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -30,12 +30,9 @@
|
|||||||
, B.SNS_TYPE
|
, B.SNS_TYPE
|
||||||
, B.SNS_ID
|
, B.SNS_ID
|
||||||
, 'ROLE_USER' AS AUTHORITY_LIST
|
, 'ROLE_USER' AS AUTHORITY_LIST
|
||||||
, C.JOIN_COUNCIL_CD
|
|
||||||
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
||||||
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
||||||
ON A.MB_INFO_ID = B.MB_INFO_ID
|
ON A.MB_INFO_ID = B.MB_INFO_ID
|
||||||
LEFT OUTER JOIN UAC_CLTR_DB.MB_SITE /* 가입문화원정보 */ C
|
|
||||||
ON A.MB_INFO_ID = C.MB_INFO_ID AND C.JOIN_COUNCIL_CD = #{joinCouncilCd}
|
|
||||||
WHERE B.SNS_ID = #{snsId}
|
WHERE B.SNS_ID = #{snsId}
|
||||||
AND UPPER(SNS_TYPE) = UPPER(#{snsType})
|
AND UPPER(SNS_TYPE) = UPPER(#{snsType})
|
||||||
AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */
|
AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */
|
||||||
|
|||||||
@ -31,9 +31,7 @@
|
|||||||
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
||||||
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
||||||
ON A.MB_INFO_ID = B.MB_INFO_ID
|
ON A.MB_INFO_ID = B.MB_INFO_ID
|
||||||
JOIN UAC_CLTR_DB.MB_SITE /* 가입문화원정보 */ C
|
WHERE A.LOGIN_USER_ID = #{loginUserId}
|
||||||
ON A.MB_INFO_ID = C.MB_INFO_ID
|
|
||||||
WHERE CONCAT(C.JOIN_COUNCIL_CD, '@', A.LOGIN_USER_ID) = #{councilloginUserId}
|
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
216
src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp
Normal file
216
src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
<%
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : listAncmnts.jsp
|
||||||
|
*
|
||||||
|
* @Description : 공지사항 목록 화면을 표출한다.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 9. 13. KNKIM 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||||
|
* @since 2021. 9. 13.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
|
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||||
|
|
||||||
|
<c:set var="pageTitle">공지사항</c:set>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<title>${pageTitle}</title>
|
||||||
|
|
||||||
|
<!-- GRID -->
|
||||||
|
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
|
||||||
|
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javaScript" language="javascript">
|
||||||
|
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
//=======================================================
|
||||||
|
// 그리드 생성 환경설정
|
||||||
|
//=======================================================
|
||||||
|
$("#jsGrid").jsGrid({
|
||||||
|
pageSize : $("#pageSize").val(),
|
||||||
|
scrollOffset:0,
|
||||||
|
controller: {
|
||||||
|
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
|
||||||
|
var data = $.Deferred();
|
||||||
|
//======================================
|
||||||
|
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
|
||||||
|
//======================================
|
||||||
|
var reqUrl = "${pageContext.request.contextPath}/bbs/listAncmntsAjax.do";
|
||||||
|
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
|
||||||
|
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
|
||||||
|
|
||||||
|
$("#pageIndex").val(pageIndex);
|
||||||
|
|
||||||
|
var inputData = {
|
||||||
|
"pageIndex" : pageIndex
|
||||||
|
, "pageSize": pageSize};
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------
|
||||||
|
// 요청 처리
|
||||||
|
//--------------------------------------
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
url: reqUrl,
|
||||||
|
dataType: "json",
|
||||||
|
data: JSON.stringify(inputData),
|
||||||
|
}).done(function(response){
|
||||||
|
<%
|
||||||
|
// 그리드 데이터 예시 :
|
||||||
|
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
|
||||||
|
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
|
||||||
|
%>
|
||||||
|
var jsonObj = JSON.parse(response);
|
||||||
|
//$("#itemsCount").val(jsonOjb.itemsCount);
|
||||||
|
console.log(jsonObj.itemsCount);
|
||||||
|
|
||||||
|
if(jsonObj.itemsCount == undefined) $("#itemsCount").val("0");
|
||||||
|
else $("#itemsCount").val(jsonObj.itemsCount);
|
||||||
|
|
||||||
|
data.resolve(jsonObj);
|
||||||
|
});
|
||||||
|
return data.promise();
|
||||||
|
} // loadData
|
||||||
|
},
|
||||||
|
|
||||||
|
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
|
||||||
|
|
||||||
|
// 클릭된 행의 자료 객체
|
||||||
|
var getData = args.item;
|
||||||
|
|
||||||
|
// 추출할 컬럼의 데이터 가져오기
|
||||||
|
var articleId = getData["articleId"];
|
||||||
|
var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row');
|
||||||
|
|
||||||
|
// 상세 내용 보기
|
||||||
|
fn_viewDetail(articleId, selectedRow);
|
||||||
|
},
|
||||||
|
|
||||||
|
//======================================
|
||||||
|
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
|
||||||
|
//======================================
|
||||||
|
fields: [
|
||||||
|
{ title:"ID", name: "articleId" , type: "text", width: 200, align: "left" },
|
||||||
|
{ title:"알림방법", name: "notiMethod" , type: "text", width: 100, align: "center"},
|
||||||
|
{ title:"구분코드", name: "notiTypeCd" , type: "text", width: 100, align: "center"},
|
||||||
|
{ title:"구분", name: "notiTypeNm" , type: "text", width: 100, align: "center"},
|
||||||
|
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" },
|
||||||
|
{ title:"확인여부", name: "readYn" , type: "text", width: 100, align: "center"},
|
||||||
|
{ title:"날짜", name: "regDd" , type: "text", width: 100, align: "center"}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 검색 버튼 클릭
|
||||||
|
$("#btnSearch").on("click", function(e) {
|
||||||
|
fn_searchArticle($("#pageSize").val(), 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
//초기 자료 조회
|
||||||
|
fn_searchArticle();
|
||||||
|
|
||||||
|
}); // document ready
|
||||||
|
|
||||||
|
|
||||||
|
// 선택한 글 상세 보기로 이동
|
||||||
|
function fn_viewDetail(articleId, selectedRow) {
|
||||||
|
|
||||||
|
var $selectedRow = $(selectedRow);
|
||||||
|
var reqUrl = "${pageContext.request.contextPath}/bbs/selectAncmntAjax.do";
|
||||||
|
var inputData = { "articleId" : articleId };
|
||||||
|
|
||||||
|
//--------------------------------------
|
||||||
|
// 요청 처리
|
||||||
|
//--------------------------------------
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
url: reqUrl,
|
||||||
|
dataType: "json",
|
||||||
|
data: JSON.stringify(inputData),
|
||||||
|
}).done(function(response){
|
||||||
|
var jsonObj = JSON.parse(response);
|
||||||
|
$("#jsGrid").find('table tr.answer').remove();
|
||||||
|
//alert("DDDDDDDD remove = " + $("#jsGrid")[0].scrollHeight);
|
||||||
|
|
||||||
|
$("#jsGrid").jsGrid("rowByItem", $selectedRow).data("JSGridItem")["readYn"] = jsonObj.data.readYn;
|
||||||
|
$selectedRow.find('td').eq(GRID_INDEX_OF_READYN).text(jsonObj.data.readYn);
|
||||||
|
|
||||||
|
$selectedRow.after("<tr class='answer'><td colspan='7'>" + jsonObj.data.content
|
||||||
|
+ "<br/>" + jsonObj.data.content
|
||||||
|
+ "<br/>" + jsonObj.data.content
|
||||||
|
+ "<br/>" + jsonObj.data.content
|
||||||
|
+ "<br/>알림확인여부=" + jsonObj.data.readYn
|
||||||
|
+ "<br/>알림일자=" + jsonObj.data.regDd
|
||||||
|
+ "</td></tr>");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#jsGrid").closest('.ui-jqgrid-bdiv').width($("#jsGrid").closest('.ui-jqgrid-bdiv').width() + 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 그리드 데이터 조회 호출
|
||||||
|
function fn_searchArticle(pageSize, pageIndex) {
|
||||||
|
$("#jsGrid").jsGrid("search"
|
||||||
|
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
|
||||||
|
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", ${pageIndex}))
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>${pageTitle }</h1>
|
||||||
|
|
||||||
|
메시지 : ${message}
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<form name="articleForm" id="articleForm" method="post">
|
||||||
|
|
||||||
|
<!-- 검색조건 -->
|
||||||
|
<input type="text" name="pageSize" id="pageSize" value="${pageSize }" />
|
||||||
|
<input type="text" name="itemsCount" id="itemsCount" value="0" />
|
||||||
|
|
||||||
|
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
|
||||||
|
<input type="button" name="btnSearch" id="btnSearch" title="새로고침" value="새로고침" />
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@ -113,7 +113,6 @@ function fn_update() {
|
|||||||
<tr>
|
<tr>
|
||||||
<th>비밀번호<br/>(변경시 입력)</th>
|
<th>비밀번호<br/>(변경시 입력)</th>
|
||||||
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="" size="100" maxlength="200" /><br/>
|
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="" size="100" maxlength="200" /><br/>
|
||||||
* 비밀번호 : SHA-256 암호화 처리 후, DB에 저장되며, 웹 화면에 표출될 때는 Aria로 AuthKey를 Salt값으로 하여 재암호화처리하고 BASE64로 다시한번 인코딩하여 표출함
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -7,9 +7,7 @@
|
|||||||
|
|
||||||
<sec:authorize access="isAuthenticated()">
|
<sec:authorize access="isAuthenticated()">
|
||||||
<sec:authentication property="principal.name" var="userName" />
|
<sec:authentication property="principal.name" var="userName" />
|
||||||
<sec:authentication property="principal.authKey" var="authKey" />
|
|
||||||
${userName}님의 방문을 환영합니다.<br />
|
${userName}님의 방문을 환영합니다.<br />
|
||||||
귀하의 authKey 값은 "${authKey}"" 입니다.
|
|
||||||
</sec:authorize>
|
</sec:authorize>
|
||||||
<sec:authorize access="not isAuthenticated()">
|
<sec:authorize access="not isAuthenticated()">
|
||||||
환영합니다. <br />
|
환영합니다. <br />
|
||||||
|
|||||||
@ -50,9 +50,9 @@ ${informContent }
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
${zipCode }<br>
|
${zipCode }<br>
|
||||||
${addr1 }<br>
|
${address }<br>
|
||||||
${addr2 }<br>
|
${addressDetail }<br>
|
||||||
${telNo }<br>
|
${phoneNo }<br>
|
||||||
${faxNo }<br>
|
${faxNo }<br>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -62,7 +62,6 @@
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
authKey : <input name="authKey" id="authKey" value="yjhOJW0gKZ13f0/mofcEeA==" /> <br />
|
|
||||||
page : <input name="page" id="page" value="1" /> <br />
|
page : <input name="page" id="page" value="1" /> <br />
|
||||||
rows : <input name="rows" id="rows" value="10" /> <br />
|
rows : <input name="rows" id="rows" value="10" /> <br />
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,6 @@
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
authKey : <input name="authKey" id="authKey" value="yjhOJW0gKZ13f0/mofcEeA==" /> <br />
|
|
||||||
page : <input name="page" id="page" value="1" /> <br />
|
page : <input name="page" id="page" value="1" /> <br />
|
||||||
rows : <input name="rows" id="rows" value="10" /> <br />
|
rows : <input name="rows" id="rows" value="10" /> <br />
|
||||||
|
|
||||||
@ -84,7 +83,6 @@
|
|||||||
실제 서버로 REQ ============= <br />
|
실제 서버로 REQ ============= <br />
|
||||||
<!-- < formx : form action="http://210.181.197.70/uac/service/exports" method="GET" > -->
|
<!-- < formx : form action="http://210.181.197.70/uac/service/exports" method="GET" > -->
|
||||||
<form:form action="http://localhost:8088/uac/service/exports" method="GET" >
|
<form:form action="http://localhost:8088/uac/service/exports" method="GET" >
|
||||||
authKey : <input name="authKey" id="authKey" value="yjhOJW0gKZ13f0/mofcEeA==" /> <br />
|
|
||||||
page : <input name="page" id="page" value="1" /> <br />
|
page : <input name="page" id="page" value="1" /> <br />
|
||||||
rows : <input name="rows" id="rows" value="10" /> <br />
|
rows : <input name="rows" id="rows" value="10" /> <br />
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,9 @@
|
|||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectGreeting.do';">인사말</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectGreeting.do';">인사말</a></li>
|
||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureOperationInfo.do';">이용안내</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureOperationInfo.do';">이용안내</a></li>
|
||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listNotices.do';">공지사항</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listNotices.do';">공지사항</a></li>
|
||||||
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listAncmnts.do';">공지사항(DB)</a></li>
|
||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listFAQs.do';">자주하는질문</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listFAQs.do';">자주하는질문</a></li>
|
||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';">묻고답하기</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/bbs/listQnAs.do';">묻고답하기</a></li>
|
||||||
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureLocationInfo.do';">찾아오시는길</a></li>
|
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/inform/selectNCultureLocationInfo.do';">찾아오시는길</a></li>
|
||||||
|
|
||||||
<!-- 자료검색 -->
|
<!-- 자료검색 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user