Merge remote-tracking branch 'origin/master'

This commit is contained in:
JSYOO 2021-09-09 17:11:27 +09:00
commit 310dbb2efe
16 changed files with 493 additions and 145 deletions

View File

@ -7,13 +7,13 @@ import java.util.Map;
import nlib.user.service.NlibLoginVO; import nlib.user.service.NlibLoginVO;
public interface AlertService public interface NotificationService
{ {
/* /*
* 사용자 알림 목록을 조회한다. * 사용자 알림 목록을 조회한다.
*/ */
public List<AlertVO> listAlerts(AlertVO alertVO) throws Exception; public List<NotificationVO> listNotifications(NotificationVO notificationVO) throws Exception;
/** /**
@ -23,18 +23,27 @@ public interface AlertService
* @return * @return
* @throws Exception * @throws Exception
*/ */
public int countUnreadAlert(String mbInfoId) throws Exception; public int countUnreadNotification(String mbInfoId) throws Exception;
/**
* 알림을 읽음으로 변경한다.
* 만일, 이미 읽음표시된 경우에는 변경 없다.
*
* @param notiVO (notiId, recvUserId 필수)
* @return
* @throws Exception
*/
public int updateRead(NotificationVO notiVO) throws Exception;
// /* /**
// * 사용자 미확인 신규 알림 건수를 조회한다. * 알림내용 상세 조회
// */ *
// public HashMap<String, String> selectNewAlertCount(NlibLoginVO nlibLoginVO) throws Exception; * @param notiVO (notiId, recvUserId 필수)
// * @return
// /* * @throws Exception
// * 가장 최근 알림건을 읽음 처리하고 내용을 조회한다. */
// */ public NotificationVO selectNotification(NotificationVO notiVO) throws Exception;
// public HashMap<String, String> selectAlert(NlibLoginVO nlibLoginVO, int nlibAlertId) throws Exception;
} }

View File

@ -1,25 +1,26 @@
package nlib.cmm.service; package nlib.cmm.service;
public class AlertVO extends PagingVO { public class NotificationVO extends PagingVO {
private String nlibAlertId; /* 알림ID */ private String notiId; /* 알림ID */
private String title; /* 알림제목 */ private String title; /* 알림제목 */
private String content; /* 알림내용 */ private String content; /* 알림내용 */
private String alertType; /* 알림유형 */ private String notiMethod; /* 알림방법 */
private String alertDivCd; /* 알림내용구분코드 */ private String notiTypeCd; /* 알림유형코드(알림내용구분코드) */
private String notiTypeNm; /* 알림유형코드명 */
private String readDd; /* 알림확인일시 */ private String readDd; /* 알림확인일시 */
private String RegId; /* 등록자아이디 */ private String RegId; /* 등록자아이디 */
private String regDd; /* 등록일자 */ private String regDd; /* 등록일자 */
private String mbInfoId; /* 알림대상자 회원아이디 */ private String recvUserId; /* 알림대상자 회원아이디 */
private String readYn; /* 알림확인여부 */ private String readYn; /* 알림확인여부 */
private int totCnt = 0; private int totCnt = 0; /* 알림건수(최근1개월) */
public String getNlibAlertId() { public String getNotiId() {
return nlibAlertId; return notiId;
} }
public void setNlibAlertId(String nlibAlertId) { public void setNotiId(String notiId) {
this.nlibAlertId = nlibAlertId; this.notiId = notiId;
} }
public String getTitle() { public String getTitle() {
return title; return title;
@ -33,17 +34,17 @@ public class AlertVO extends PagingVO {
public void setContent(String content) { public void setContent(String content) {
this.content = content; this.content = content;
} }
public String getAlertType() { public String getNotiMethod() {
return alertType; return notiMethod;
} }
public void setAlertType(String alertType) { public void setNotiMethod(String notiMethod) {
this.alertType = alertType; this.notiMethod = notiMethod;
} }
public String getAlertDivCd() { public String getNotiTypeCd() {
return alertDivCd; return notiTypeCd;
} }
public void setAlertDivCd(String alertDivCd) { public void setNotiTypeCd(String notiTypeCd) {
this.alertDivCd = alertDivCd; this.notiTypeCd = notiTypeCd;
} }
public String getReadDd() { public String getReadDd() {
return readDd; return readDd;
@ -63,11 +64,11 @@ public class AlertVO extends PagingVO {
public void setRegDd(String regDd) { public void setRegDd(String regDd) {
this.regDd = regDd; this.regDd = regDd;
} }
public String getMbInfoId() { public String getRecvUserId() {
return mbInfoId; return recvUserId;
} }
public void setMbInfoId(String mbInfoId) { public void setRecvUserId(String recvUserId) {
this.mbInfoId = mbInfoId; this.recvUserId = recvUserId;
} }
public int getTotCnt() { public int getTotCnt() {
return totCnt; return totCnt;
@ -81,5 +82,11 @@ public class AlertVO extends PagingVO {
public void setReadYn(String readYn) { public void setReadYn(String readYn) {
this.readYn = readYn; this.readYn = readYn;
} }
public String getNotiTypeNm() {
return notiTypeNm;
}
public void setNotiTypeNm(String notiTypeNm) {
this.notiTypeNm = notiTypeNm;
}
} }

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository;
import egovframework.com.cmm.service.impl.EgovComAbstractDAO; import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
import egovframework.rte.psl.dataaccess.mapper.Mapper; import egovframework.rte.psl.dataaccess.mapper.Mapper;
import nlib.cmm.service.AlertVO; import nlib.cmm.service.NotificationVO;
import nlib.cmm.service.NlibProperty; import nlib.cmm.service.NlibProperty;
import nlib.user.service.NlibLoginVO; import nlib.user.service.NlibLoginVO;
import nlib.util.StringUtil; import nlib.util.StringUtil;
@ -37,22 +37,45 @@ import nlib.util.StringUtil;
*/ */
@Repository("alertDAO") @Repository("notificationDAO")
public class AlertDAO extends EgovComAbstractDAO { public class NotificationDAO extends EgovComAbstractDAO {
/* /*
* 사용자 알림 목록을 조회한다. * 사용자 알림 목록을 조회한다.
*/ */
public List<AlertVO> listAlerts(AlertVO searchAlertVO) throws Exception { public List<NotificationVO> listNotifications(NotificationVO searchNotificationVO) throws Exception {
return selectList("AlertDAO.listAlerts", searchAlertVO); return selectList("NotificationDAO.listNotifications", searchNotificationVO);
} }
/* /*
* 사용자가 확인하지 않은 알림 건수를 조회한다. * 사용자가 확인하지 않은 알림 건수를 조회한다.
*/ */
public int countUnreadAlert(String mbInfoId) throws Exception { public int countUnreadNotification(String recvUserId) throws Exception {
return selectOne("AlertDAO.countUnreadAlert", mbInfoId); return selectOne("NotificationDAO.countUnreadNotification", recvUserId);
}
/**
* 알림을 읽음으로 변경한다.
* 만일, 이미 읽음표시된 경우에는 변경 없다.
*
* @param notiVO (notiId, recvUserId 필수)
* @return
* @throws Exception
*/
public int updateRead(NotificationVO notiVO) throws Exception {
return update("NotificationDAO.updateRead", notiVO);
}
/**
* 알림내용 상세 조회
*
* @param notiVO (notiId, recvUserId 필수)
* @return
* @throws Exception
*/
public NotificationVO selectNotification(NotificationVO notiVO) throws Exception {
return selectOne("NotificationDAO.selectNotification", notiVO);
} }
} }

View File

@ -10,29 +10,28 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import nlib.cmm.service.AlertService; import nlib.cmm.service.NotificationService;
import nlib.cmm.service.AlertVO; import nlib.cmm.service.NotificationVO;
import nlib.cmm.service.NlibProperty; import nlib.cmm.service.NlibProperty;
import nlib.user.service.NlibLoginVO; import nlib.user.service.NlibLoginVO;
import nlib.util.StringUtil; import nlib.util.StringUtil;
@Service("alertService") @Service("notificationService")
public class AlertServiceImpl implements AlertService public class NotificationServiceImpl implements NotificationService
{ {
private static final Logger log = LoggerFactory.getLogger(AlertServiceImpl.class); private static final Logger log = LoggerFactory.getLogger(NotificationServiceImpl.class);
@Resource(name="alertDAO") @Resource(name="notificationDAO")
private AlertDAO alertDAO; private NotificationDAO notificationDAO;
/** /**
* 사용자 알림 목록을 조회한다. * 사용자 알림 목록을 조회한다.
*/ */
public List<AlertVO> listAlerts(AlertVO alertVO) throws Exception { public List<NotificationVO> listNotifications(NotificationVO notificationVO) throws Exception {
return alertDAO.listAlerts(alertVO); return notificationDAO.listNotifications(notificationVO);
} }
/** /**
* 읽지 않은 알림 건수를 조회한다. * 읽지 않은 알림 건수를 조회한다.
* *
@ -40,25 +39,33 @@ public class AlertServiceImpl implements AlertService
* @return * @return
* @throws Exception * @throws Exception
*/ */
public int countUnreadAlert(String mbInfoId) throws Exception { public int countUnreadNotification(String recvUserId) throws Exception {
return alertDAO.countUnreadAlert(mbInfoId); return notificationDAO.countUnreadNotification(recvUserId);
} }
// /**
// /* * 알림을 읽음으로 변경한다.
// * 사용자 미확인 신규 알림 건수를 조회한다. * 만일, 이미 읽음표시된 경우에는 변경 없다.
// */ *
// public int selectNewAlertCount(String mbInfoId) throws Exception { * @param notiVO (notiId, recvUserId 필수)
// return alertDAO.selectNewAlertCount(mbInfoId); * @return
// } * @throws Exception
// */
// /* public int updateRead(NotificationVO notiVO) throws Exception {
// * 알림건을 읽음 처리하고 내용을 조회한다. return notificationDAO.updateRead(notiVO);
// * 이미 읽은 건의 경우, 내용만 조회한다. }
// */
// public HashMap<String, String> selectUserAlert(AlertVO alertVO) throws Exception { /**
// return alertDAO.selectUserAlert(alertVO); * 알림내용 상세 조회
// } *
* @param notiVO (notiId, recvUserId 필수)
* @return
* @throws Exception
*/
public NotificationVO selectNotification(NotificationVO notiVO) throws Exception {
updateRead(notiVO);
return notificationDAO.selectNotification(notiVO);
}
} }

View File

@ -14,7 +14,7 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import nlib.cmm.NlibCommonController; import nlib.cmm.NlibCommonController;
import nlib.cmm.service.AlertService; import nlib.cmm.service.NotificationService;
import nlib.user.service.NlibLoginVO; import nlib.user.service.NlibLoginVO;
import nlib.util.StringUtil; import nlib.util.StringUtil;
@ -45,8 +45,8 @@ public class MainController extends NlibCommonController {
private static final Logger log = LoggerFactory.getLogger(MainController.class); private static final Logger log = LoggerFactory.getLogger(MainController.class);
@Resource(name="alertService") @Resource(name="notificationService")
private AlertService alertService; private NotificationService notificationService;
@RequestMapping( {"/index.do"} ) @RequestMapping( {"/index.do"} )
public String setContent( public String setContent(
@ -63,13 +63,13 @@ public class MainController extends NlibCommonController {
// 알림 확인 // 알림 확인
String mbInfoId = getMbInfoId(req); String mbInfoId = getMbInfoId(req);
int unreadAlertCnt = 0; int unreadNotiCnt = 0;
if(!isAlerted(req) && StringUtil.isNotEmpty(mbInfoId)) { if(!isAlerted(req) && StringUtil.isNotEmpty(mbInfoId)) {
unreadAlertCnt = alertService.countUnreadAlert(mbInfoId); unreadNotiCnt = notificationService.countUnreadNotification(mbInfoId);
setAlerted(req, true); setAlerted(req, true);
} }
model.addAttribute("unreadAlertCnt", unreadAlertCnt); model.addAttribute("unreadNotiCnt", unreadNotiCnt);
return "nlib/cmm/home"; return "nlib/cmm/home";
} }

View File

@ -21,8 +21,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import nlib.cmm.NlibCommonController; import nlib.cmm.NlibCommonController;
import nlib.cmm.service.AlertService; import nlib.cmm.service.NotificationService;
import nlib.cmm.service.AlertVO; import nlib.cmm.service.NotificationVO;
import nlib.cmm.service.NlibProperty; import nlib.cmm.service.NlibProperty;
import nlib.restful.service.DataApiReqVO; import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO; import nlib.restful.service.DataApiResVO;
@ -30,7 +30,7 @@ import nlib.util.StringUtil;
/** /**
* <pre> * <pre>
* @Class Name : AlertController.java * @Class Name : NotificationController.java
* *
* @Description : 사용자 홈페이지 알림 안내 컨트롤러 * @Description : 사용자 홈페이지 알림 안내 컨트롤러
* *
@ -51,24 +51,24 @@ import nlib.util.StringUtil;
* *
*/ */
@Controller @Controller
public class AlertController extends NlibCommonController { public class NotificationController extends NlibCommonController {
private static final Logger log = LoggerFactory.getLogger(AlertController.class); private static final Logger log = LoggerFactory.getLogger(NotificationController.class);
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="alertService") @Resource(name="notificationService")
private AlertService alertService; private NotificationService notificationService;
/** /**
* 알림 목록 조회한다. * 알림 목록 화면을 표시한다.
* *
* @param req * @param req
* @return * @return
*/ */
@RequestMapping("/cmm/listAlerts.do") @RequestMapping("/cmm/listNotifications.do")
public String listAlerts( public String listNotifications(
HttpServletRequest req, HttpServletRequest req,
@RequestParam Map<String, String> paramMap, @RequestParam Map<String, String> paramMap,
ModelMap model ModelMap model
@ -78,22 +78,25 @@ public class AlertController extends NlibCommonController {
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); String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
log.debug("listAlerts > pageIndex = " + pageIndex); log.debug("listNotifications > pageIndex = " + pageIndex);
log.debug("listAlerts > pageSize = " + pageSize); log.debug("listNotifications > pageSize = " + pageSize);
AlertVO searchAlertVO = new AlertVO(); NotificationVO searchNotificationVO = new NotificationVO();
searchAlertVO.setPageIndex(pageIndex); searchNotificationVO.setPageIndex(pageIndex);
searchAlertVO.setPageSize(pageSize); searchNotificationVO.setPageSize(pageSize);
searchAlertVO.setMbInfoId(mbInfoId); searchNotificationVO.setRecvUserId(mbInfoId);
List<AlertVO> list = alertService.listAlerts(searchAlertVO); List<NotificationVO> list = notificationService.listNotifications(searchNotificationVO);
int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt(); int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt();
searchAlertVO.setTotRecordCount(totRecordCount); searchNotificationVO.setTotRecordCount(totRecordCount);
model.addAttribute("notificationList", list);
model.addAttribute("searchNotificationVO", searchNotificationVO);
model.addAttribute("pageSize", NlibProperty.getString("list.paging.page.size"));
model.addAttribute("pageIndex", "1");
model.addAttribute("alertList", list);
model.addAttribute("searchAlertVO", searchAlertVO);
return "nlib/cmm/listAlerts"; return "nlib/cmm/listNotifications";
} }
/** /**
@ -102,26 +105,26 @@ public class AlertController extends NlibCommonController {
* @param req * @param req
* @return * @return
*/ */
@RequestMapping(value="/cmm/listAlertsAjax.do") @RequestMapping(value="/cmm/listNotificationsAjax.do")
public ResponseEntity<String> listAlertsAjax(HttpServletRequest req, public ResponseEntity<String> listNotificationsAjax(HttpServletRequest req,
Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception { Authentication authentication, @RequestBody Map<String, String> paramMap) throws Exception {
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); String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
log.debug("listAlertsAjax > pageIndex = " + pageIndex); log.debug("listNotificationsAjax > pageIndex = " + pageIndex);
log.debug("listAlertsAjax > pageSize = " + pageSize); log.debug("listNotificationsAjax > pageSize = " + pageSize);
AlertVO searchAlertVO = new AlertVO(); NotificationVO searchNotificationtVO = new NotificationVO();
searchAlertVO.setPageIndex(pageIndex); searchNotificationtVO.setPageIndex(pageIndex);
searchAlertVO.setPageSize(pageSize); searchNotificationtVO.setPageSize(pageSize);
searchAlertVO.setMbInfoId(mbInfoId); searchNotificationtVO.setRecvUserId(mbInfoId);
List<AlertVO> list = alertService.listAlerts(searchAlertVO); List<NotificationVO> list = notificationService.listNotifications(searchNotificationtVO);
int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt(); int totRecordCount = (list == null || list.get(0) == null) ? 0 : list.get(0).getTotCnt();
searchAlertVO.setTotRecordCount(totRecordCount); searchNotificationtVO.setTotRecordCount(totRecordCount);
//------------------------------- //-------------------------------
// JSON변환 응답 처리 // JSON변환 응답 처리
@ -137,4 +140,38 @@ public class AlertController extends NlibCommonController {
return makeResponseEntityJson(retMap); 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
log.debug("selectNotificationAjax > notiId = " + notiId);
NotificationVO paramNotiVO = new NotificationVO();
paramNotiVO.setNotiId(notiId);
paramNotiVO.setRecvUserId(getMbInfoId(req));
// 읽음처리 상세내용 조회
NotificationVO notiVO = notificationService.selectNotification(paramNotiVO);
//-------------------------------
// JSON변환 응답 처리
//-------------------------------
// JS-GRID 페이징 처리를 포함한 응답값 처리
// {data: [{...}],
// itemsCount: 255
// }
HashMap<String, Object> retMap = new HashMap<String, Object>();
retMap.put("data", notiVO);
return makeResponseEntityJson(retMap);
}
} }

View File

@ -16,7 +16,7 @@
<typeAlias alias="EgovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap" /> <typeAlias alias="EgovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap" />
<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="AlertVO" type="nlib.cmm.service.AlertVO" /> <typeAlias alias="NotificationVO" type="nlib.cmm.service.NotificationVO" />
</typeAliases> </typeAliases>
</configuration> </configuration>

View File

@ -1,35 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?><!--Converted at: Wed May 11 15:49:38 KST 2016--> <?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" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="AlertDAO"> <mapper namespace="NotificationDAO">
<select id="listAlerts" parameterType="AlertVO" resultType="AlertVO"> <select id="listNotifications" parameterType="NotificationVO" resultType="NotificationVO">
<![CDATA[ <![CDATA[
SELECT SELECT
NLIB_ALERT_ID A.NOTI_ID
, MB_INFO_ID , A.RECV_USER_ID
, TITLE , A.TITLE
, CONTENT , A.CONTENT
, ALERT_TYPE , A.NOTI_METHOD
, ALERT_DIV_CD , A.NOTI_TYPE_CD
, ALERT_DIV_CD AS ALERT_DIV_NM , B.S_CODE_NM AS NOTI_TYPE_NM
, IF(READ_DD IS NULL, 'N', 'Y') AS READ_YN , IF(A.READ_DD IS NULL, 'N', 'Y') AS READ_YN
, DATE_FORMAT(A.REG_DD, '%Y-%m-%d') AS REG_DD , DATE_FORMAT(A.REG_DD, '%Y-%m-%d') AS REG_DD
, COUNT(NLIB_ALERT_ID) OVER(PARTITION BY 1) AS TOT_CNT , COUNT(A.NOTI_ID) OVER(PARTITION BY 1) AS TOT_CNT
FROM TMP_NLIB_ALERT A FROM SM_NOTIFICATION A
WHERE A.MB_INFO_ID = #{mbInfoId} JOIN SM_CODE_S B
ON B.S_CODE_ID = A.NOTI_TYPE_CD
WHERE A.RECV_USER_ID = #{recvUserId}
AND A.REG_DD > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND A.REG_DD > DATE_SUB(NOW(), INTERVAL 1 MONTH)
ORDER BY NLIB_ALERT_ID DESC AND B.L_CODE_ID = 'NOTI_TYPE_CD'
AND B.USE_YN = 'Y'
ORDER BY A.NOTI_ID DESC
]]> ]]>
</select> </select>
<select id="countUnreadAlert" parameterType="String" resultType="Integer"> <select id="countUnreadNotification" parameterType="String" resultType="Integer">
<![CDATA[ <![CDATA[
SELECT COUNT(NLIB_ALERT_ID) AS UNREAD_CNT SELECT COUNT(NOTI_ID) AS UNREAD_CNT
FROM TMP_NLIB_ALERT A FROM SM_NOTIFICATION A
WHERE A.MB_INFO_ID = #{mbInfoId} WHERE A.RECV_USER_ID = #{recvUserId}
AND A.READ_DD IS NULL AND A.READ_DD IS NULL
]]> ]]>
</select> </select>
<select id="selectNotification" parameterType="NotificationVO" resultType="NotificationVO">
<![CDATA[
SELECT *
FROM SM_NOTIFICATION A
WHERE A.RECV_USER_ID = #{recvUserId}
AND A.NOTI_ID = #{notiId}
]]>
</select>
<update id="updateRead" parameterType="NotificationVO">
<![CDATA[
UPDATE SM_NOTIFICATION
SET READ_DD = NOW()
WHERE RECV_USER_ID = #{recvUserId}
AND NOTI_ID = #{notiId}
AND READ_DD IS NULL
]]>
</update>
</mapper> </mapper>

View File

@ -19,7 +19,7 @@
<script type="text/javascript"> <script type="text/javascript">
window.onload = function() { window.onload = function() {
fn_myAlert(${unreadAlertCnt}); fn_myAlert(${unreadNotiCnt});
}; };
</script> </script>

View File

@ -1,7 +1,7 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : lisAlerts.jsp * @Class Name : lisNotifications.jsp
* *
* @Description : 알림 목록을 조회한다. * @Description : 알림 목록을 조회한다.
* *
@ -59,9 +59,11 @@
//====================================== //======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정) // 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//====================================== //======================================
var reqUrl = "${pageContext.request.contextPath}/cmm/listAlertsAjax.do"; var reqUrl = "${pageContext.request.contextPath}/cmm/listNotificationsAjax.do";
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val()); var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val()); var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
alert("page index : " + pageIndex + ", " + pageSize);
$("#pageIndex").val(pageIndex); $("#pageIndex").val(pageIndex);
@ -104,20 +106,23 @@
var getData = args.item; var getData = args.item;
// 추출할 컬럼의 데이터 가져오기 // 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"]; var notiId = getData["notiId"];
var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row'); var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row');
// 상세 내용 보기 // 상세 내용 보기
fn_viewDetail(articleNo, selectedRow); fn_viewDetail(notiId, selectedRow);
}, },
//====================================== //======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정) // 그리드 컬럼 정의 (각 요청에 맞게 조정)
//====================================== //======================================
fields: [ fields: [
{ title:"ID", name: "nlibAlertId" , type: "text", width: 200, align: "left" }, { title:"ID", name: "notiId" , type: "text", width: 200, align: "left" },
{ title:"구분", name: "alertDivCd" , type: "text", width: 100, align: "center"}, { 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: "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"} { title:"날짜", name: "regDd" , type: "text", width: 100, align: "center"}
] ]
}); });
@ -133,21 +138,12 @@
}); // document ready }); // document ready
// 선택한 게시글 상세 보기로 이동 // 선택한 글 상세 보기로 이동
function fn_viewDetail(articleNo, selectedRow) { function fn_viewDetail(notiId, selectedRow) {
var $selectedRow = $(selectedRow); var $selectedRow = $(selectedRow);
var reqUrl = "${pageContext.request.contextPath}/board/selectFAQAjax.do"; var reqUrl = "${pageContext.request.contextPath}/cmm/selectNotificationAjax.do";
var inputData = { "notiId" : notiId };
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = $("#pageIndex").val();
var pageSize = $("#pageSize").val();
var faqType = document.articleForm.faqType.value;
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "faqType": faqType};
//-------------------------------------- //--------------------------------------
// 요청 처리 // 요청 처리
@ -167,6 +163,8 @@
+ "<br/>" + jsonObj.content + "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content + "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content + "<br/>" + jsonObj.content
+ "<br/>readYn=" + jsonObj.readYn
+ "<br/>regDd=" + jsonObj.regDd
+ "</td></tr>"); + "</td></tr>");
//alert("DDDDDDDD add = " + $("#jsGrid")[0].scrollHeight); //alert("DDDDDDDD add = " + $("#jsGrid")[0].scrollHeight);
//$("#jsGrid").find('table.jsgrid-table.jsgrid-grid-body').height($("#jsGrid").find('table.jsgrid-table')[0].scrollHeight + 100); //$("#jsGrid").find('table.jsgrid-table.jsgrid-grid-body').height($("#jsGrid").find('table.jsgrid-table')[0].scrollHeight + 100);

View File

@ -0,0 +1,103 @@
<%
/**
* <pre>
* @Class Name : listCodes.jsp
*
* @Description : 묻고답하기 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 8. 5. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 8. 5.
* @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>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
}); // document ready
function popSubmit() {
var dataList = $("#codeForm").serialize();
//alert("popSubmit : " + dataList);
var url = $("#codeForm").attr('action');
//alert("action : " + url);
$.ajax({
type: "post",
url: url,
data: dataList
}).done(function(response){
$("#myPop").html(response);
});
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 Popup : ${message}
&nbsp;<br/>
<form name="codeForm" id="codeForm"
action="${pageContext.request.contextPath}/code/listCodesPopup.do"
method="post">
<!-- 검색조건 -->
<input type="text" name="lCodeId" id="lCodeId" title="검색어" value="${lCodeId }" size="35" maxlength="50" />
<input type="text" name="title" id="title" title="검색어" value="ThisIsTitleVal" size="35" maxlength="50" />
<input type="text" name="content" id="content" value="ThisIsCCCCContent Val" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" onclick="popSubmit()" />
PAGE_SIZE_OPTION
</form>
<table>
<tr>
<th>코드2222</th>
<th>코드명22222222</th>
</tr>
<c:forEach var="codeItem" items="${resultList }" varStatus="status">
<tr>
<td><c:out value="${codeItem.sCodeId }" /></td>
<td><c:out value="${codeItem.sCodeNm }" /></td>
</tr>
</c:forEach>
</table>
<a href="javascript:void(0)" onclick="gotoInPop('/nlib/inform/selectNCultureOperationInfo.do')">팝업내에서 링크이동</a>
</body>
</html>

View File

@ -20,7 +20,7 @@
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listReservations.do';">예약</a></li> <li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listReservations.do';">예약</a></li>
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRequestsForViewingItem.do';">열람요청</a></li> <li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/rent/listRequestsForViewingItem.do';">열람요청</a></li>
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/collection/listInterests.do';">관심자료</a></li> <li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/collection/listInterests.do';">관심자료</a></li>
<li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/cmm/listAlerts.do';">알림</a></li> <li><a href="#" onclick="javascript:location.href='${pageContext.request.contextPath}/cmm/listNotifications.do';">알림</a></li>
<!-- 개발자용 메뉴 --> <!-- 개발자용 메뉴 -->
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getSampleInfoForm.do';">통신API</a></li> <li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getSampleInfoForm.do';">통신API</a></li>

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<title>Insert title here</title>
</head>
<body>
<button class="btn btn-primary btn-lg pop" pageTitle="About Us" pageName="about.html" >About us</button> |
<button class="btn btn-primary btn-lg pop" pageTitle="Contact Us" pageName="contact.html" >Contact Us</button> |
<button class="btn btn-primary btn-lg pop" pageTitle="Our Team 1" pageName="team.html">Our Team 2</button>
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
body
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
$(function() {
$(".pop").click(function(){
var pageTitle = $(this).attr('pageTitle');
var pageName = $(this).attr('pageName');
$(".modal .modal-title").html(pageTitle);
$(".modal .modal-body").html("Content loading please wait...");
$(".modal").modal("show");
$(".modal .modal-body").load(pageName);
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link href="/nlib/css/nlib.css" rel="stylesheet" type="text/css" />
<script src="/nlib/js/jquery/jquery.min.js"></script>
<script src="/nlib/js/nlib.js"></script>
</head>
<body>
<button name="btnShow" onclick="popPop2()">SHOW popPop2</button>
<script>
function popPop() {
$.ajax({
type: "post",
url: "https://seoul.nculture.org/nlib/code/listCodes.do",
}).done(function(response){
$("#myPop").html(response);
});
}
function popPop2() {
gotoInPop("https://seoul.nculture.org/nlib/code/listCodesPopup.do");
}
function gotoInPop(url) {
$("#myPop").show();
$("#NLIB_LAYERPOP").load(url);
}
</script>
&nbsp;<br>
&nbsp;<br>
<div id="myPop" style="z-index:10000000; display:blcok; margin-left:20px !important; position:relative; width:90%; height:auto; min-height:100px; max-height:500px; border:3px solid black !important; overflow:scroll; ">POP</div>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>감사</title>
</head>
<body>
감사합니다.
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="/nlib/js/jquery/jquery.min.js"></script>
<script src="/nlib/js/nlib.js"></script>
<style>
p {
font-size: 5em;
}
p span {
font-size: 5rem;
}
</style>
</head>
<body>
<div id="para">
가테스트1
<p>가테스트2
<span>R테스트 3</span>
</p>
</div>
</body>
</html>