상단 알림 이미지 카운터 적용

This commit is contained in:
hylee 2023-12-20 12:24:56 +09:00
parent 41c07639f5
commit 473791b65a
6 changed files with 39 additions and 6 deletions

View File

@ -57,6 +57,8 @@ public interface NotifyManageService {
void insertNotifyAsgnmCnfrmForInstr(LoginVO loginVO, String eduAplctOrd, String eduChasiOrd, String asgnmAprvlCd) throws FdlException;
int selectNotifyCnt(String uniqId);
}

View File

@ -78,5 +78,9 @@ public class NotifyManageDAO extends EgovAbstractDAO {
return (String) select("VEANotifyDAO.selectNotifyInstr", notifyManageVO);
}
public int selectNotifyCnt(String uniqId) {
return (int) select("VEANotifyDAO.selectNotifyCnt", uniqId);
}
}

View File

@ -379,4 +379,9 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements
public void updateNotifyChkWhereCmmNotifyOrd(String cmmNotifyOrd) {
notifyManageDAO.updateNotifyChkWhereCmmNotifyOrd(cmmNotifyOrd);
}
@Override
public int selectNotifyCnt(String uniqId) {
return notifyManageDAO.selectNotifyCnt(uniqId);
}
}

View File

@ -94,6 +94,7 @@ import kcc.let.sym.prm.service.ProgrmManageVO;
import kcc.let.sym.site.service.EgovSiteManagerService;
import kcc.let.sym.site.service.SiteManagerVO;
import kcc.let.uat.uia.service.SsoLoginVO;
import kcc.let.uss.notify.service.NotifyManageService;
import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrDetailVO;
import kcc.ve.instr.tngrVisitEdu.instrInfo.service.VEInstrService;
@ -181,6 +182,10 @@ public class MainController {
@Resource(name="EgovFileMngUtil")
private EgovFileMngUtil fileUtil;
//알림 서비스
@Resource(name = "NotifyManageService")
private NotifyManageService notifyManageService;
//강사 정보
@Resource(name="vEInstrService")
private VEInstrService vEInstrService;
@ -611,6 +616,13 @@ public class MainController {
model.addAttribute("modifyUrl", modifyUrl);
model.addAttribute("environment", environment); //로그인, 회원가입 URL 환경에 따른 구분 ex) local, dev, svr
if(loginVO != null)
{
int cnt = notifyManageService.selectNotifyCnt(loginVO.getUniqId());
System.out.println("cnt : "+ cnt);
model.addAttribute("notifyCnt", cnt); //로그인, 회원가입 URL 환경에 따른 구분 ex) local, dev, svr
}
return "web/com/webCommonHeader";
}

View File

@ -144,6 +144,16 @@
</select>
<select id="VEANotifyDAO.selectNotifyCnt" parameterClass="String" resultClass="int">
/* VEANotifyDAO.selectNotifyCnt */
SELECT count(*)
from VEA_CMM_NOTIFY
WHERE TO_USER_ID = #uniqId#
AND NOTIFY_CHK = 'N'
</select>
</sqlMap>

View File

@ -206,7 +206,7 @@ function usrJoin(){
</button> --%>
<div class="area_right">
<p class="login_info"><span class="t_none">알림</span><a href="#" class="header_alarm"><span class="a_count">28</span></a></p>
<!-- <p class="login_info"><span class="t_none">알림</span><a href="#" class="header_alarm"><span class="a_count">28</span></a></p> -->
<!-- local -->
<c:if test="${environment eq 'local' }">
<p class="login_info header_login_wrap"><a href="${pageContext.request.contextPath}/web/user/login/ssoLogin.do" class="header_login"><i></i>로그인</a></p>
@ -269,7 +269,7 @@ function usrJoin(){
</button> --%>
<div class="area_right">
<p class="login_info"><span class="t_none">알림</span><a href="#" class="header_alarm"><span class="a_count">28</span></a></p>
<p class="login_info"><span class="t_none">알림</span><a href="<c:url value="/web/my/myNotifyMngList.do" />" class="header_alarm"><c:if test="${notifyCnt > 0}"><span class="a_count">${notifyCnt }</span></c:if></a></p>
<p class="login_after"><c:out value="${LoginVO.id}"/><span>님</span></p>
<p class="login_after"><a href="<c:url value="/web/my/myPageDashBoard.do" />" title="새창열림">마이페이지</a></p>
<!-- e배움터 로그인 연동으로 인하여 개발, 운영 구분 -->
@ -302,17 +302,17 @@ function usrJoin(){
<c:choose>
<c:when test="${empty LoginVO or empty ssoLoginVO}">
<c:if test="${environment eq 'local' }">
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="#"><span class="m_a_count">28</span></a></p>
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="<c:url value="/web/my/myNotifyMngList.do" />"><c:if test="${notifyCnt > 0}"><span class="m_a_count">${notifyCnt }</span></c:if></a></p>
<button type="button" class="btn_mobile btn_login" onclick="location.href='${pageContext.request.contextPath}/web/user/login/ssoLogin.do'" title="로그인"></button>
<button type="button" class="btn_mobile btn_join" onclick="javascript:usrJoin();" title="회원가입"></button>
</c:if>
<c:if test="${environment eq 'dev' }">
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="#"><span class="m_a_count">28</span></a></p>
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="<c:url value="/web/my/myNotifyMngList.do" />"><c:if test="${notifyCnt > 0}"><span class="m_a_count">${notifyCnt }</span></c:if></a></p>
<button type="button" class="btn_mobile btn_login" onclick="location.href='http://223.255.205.7/user/member/loginForm.do?eduOff=Y'" title="로그인"></button>
<button type="button" class="btn_mobile btn_join" onclick="location.href='http://223.255.205.7/user/usrservice/selectUserSeView.do?eduOff=Y'" title="회원가입"></button>
</c:if>
<c:if test="${environment eq 'real' }">
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="#"><span class="m_a_count">28</span></a></p>
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="<c:url value="/web/my/myNotifyMngList.do" />"><c:if test="${notifyCnt > 0}"><span class="m_a_count">${notifyCnt }</span></c:if></a></p>
<button type="button" class="btn_mobile btn_login" onclick="location.href='https://edu-copyright.or.kr/user/member/loginForm.do?eduOff=Y'" title="로그인"></button>
<button type="button" class="btn_mobile btn_join" onclick="location.href='https://edu-copyright.or.kr/user/usrservice/selectUserSeView.do?eduOff=Y'" title="회원가입"></button>
</c:if>
@ -320,7 +320,7 @@ function usrJoin(){
<c:when test="${!empty LoginVO and !empty ssoLoginVO}">
<button type="button" class="btn_mobile btn_logout" onclick="location.href='${pageContext.request.contextPath}/web/uat/uia/actionLogout.do'" title="로그아웃"></button>
<button class="btn_mobile btn_mypage" title="마이페이지"></button>
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="#"><span class="m_a_count">28</span></a></p>
<p class="btn_mobile btn_alarm"><span class="t_none">알림</span><a href="<c:url value="/web/my/myNotifyMngList.do" />"><c:if test="${notifyCnt > 0}"><span class="m_a_count">${notifyCnt }</span></c:if></a></p>
<button type="button" class="btn_mobile btn_usredit" onclick="javascript:usrModify();" title="개인정보 수정"></button>
</c:when>
</c:choose>