Merge branch 'advc' of http://yongjoon.cho@vcs.iten.co.kr:9999/hylee/offedu into advc
This commit is contained in:
commit
82be7f6228
@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
@ -493,7 +494,42 @@ public class MyPageController {
|
|||||||
return "web/my/myQnaMngDetail";
|
return "web/my/myQnaMngDetail";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = { "/web/my/myNotifyMngDeleteAjax.do"})
|
||||||
|
public ModelAndView myNotifyMngDeleteAjax(
|
||||||
|
@ModelAttribute("notifyManageVO") NotifyManageVO notifyManageVO
|
||||||
|
, ModelMap model
|
||||||
|
, RedirectAttributes redirectAttributes
|
||||||
|
, HttpSession session
|
||||||
|
, HttpServletRequest request
|
||||||
|
, String[] chk
|
||||||
|
) throws Exception {
|
||||||
|
|
||||||
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
|
modelAndView.setViewName("jsonView");
|
||||||
|
|
||||||
|
//로그인 처리====================================
|
||||||
|
//로그인 정보 가져오기
|
||||||
|
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
||||||
|
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
|
||||||
|
|
||||||
|
if (loginVO == null || ssoLoginVO == null) {
|
||||||
|
modelAndView.addObject("result", "loginFail");
|
||||||
|
}
|
||||||
|
//로그인 처리====================================
|
||||||
|
|
||||||
|
try {
|
||||||
|
notifyManageVO.setCmmNotifyOrdArr(chk);
|
||||||
|
notifyManageService.updateChkedUseYnN(notifyManageVO);
|
||||||
|
modelAndView.addObject("result", "success");
|
||||||
|
}catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
modelAndView.addObject("result", "fail");
|
||||||
|
}
|
||||||
|
|
||||||
|
//세부과정 목록 조회
|
||||||
|
|
||||||
|
return modelAndView;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@ -60,6 +60,8 @@ public interface NotifyManageService {
|
|||||||
int selectNotifyCnt(String uniqId);
|
int selectNotifyCnt(String uniqId);
|
||||||
|
|
||||||
void updateM7DaysUseYnN();
|
void updateM7DaysUseYnN();
|
||||||
|
|
||||||
|
void updateChkedUseYnN(NotifyManageVO notifyManageVO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,7 @@ public class NotifyManageVO extends ComDefaultVO implements Serializable {
|
|||||||
private String mngUserId;
|
private String mngUserId;
|
||||||
private String mngUserNm;
|
private String mngUserNm;
|
||||||
|
|
||||||
|
private String[] cmmNotifyOrdArr;
|
||||||
|
|
||||||
public String getCmmNotifyOrd() {
|
public String getCmmNotifyOrd() {
|
||||||
return cmmNotifyOrd;
|
return cmmNotifyOrd;
|
||||||
@ -143,6 +144,12 @@ public class NotifyManageVO extends ComDefaultVO implements Serializable {
|
|||||||
public void setMngUserNm(String mngUserNm) {
|
public void setMngUserNm(String mngUserNm) {
|
||||||
this.mngUserNm = mngUserNm;
|
this.mngUserNm = mngUserNm;
|
||||||
}
|
}
|
||||||
|
public String[] getCmmNotifyOrdArr() {
|
||||||
|
return cmmNotifyOrdArr;
|
||||||
|
}
|
||||||
|
public void setCmmNotifyOrdArr(String[] cmmNotifyOrdArr) {
|
||||||
|
this.cmmNotifyOrdArr = cmmNotifyOrdArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@ import java.util.List;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||||
import kcc.com.cmm.service.CmmnDetailCode;
|
|
||||||
import kcc.let.sym.ccm.cde.service.CmmnDetailCodeVO;
|
|
||||||
import kcc.let.uss.notify.service.NotifyManageVO;
|
import kcc.let.uss.notify.service.NotifyManageVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,6 +83,9 @@ public class NotifyManageDAO extends EgovAbstractDAO {
|
|||||||
public void updateM7DaysUseYnN() {
|
public void updateM7DaysUseYnN() {
|
||||||
update("VEANotifyDAO.updateM7DaysUseYnN");
|
update("VEANotifyDAO.updateM7DaysUseYnN");
|
||||||
}
|
}
|
||||||
|
public void updateChkedUseYnN(NotifyManageVO notifyManageVO) {
|
||||||
|
update("VEANotifyDAO.updateChkedUseYnN", notifyManageVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -392,4 +392,10 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
notifyManageDAO.updateM7DaysUseYnN();
|
notifyManageDAO.updateM7DaysUseYnN();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateChkedUseYnN(NotifyManageVO notifyManageVO) {
|
||||||
|
notifyManageDAO.updateChkedUseYnN(notifyManageVO);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,4 +165,10 @@
|
|||||||
WHERE FRST_REGIST_PNTTM <![CDATA[ <= ]]> SYSDATE - 7;
|
WHERE FRST_REGIST_PNTTM <![CDATA[ <= ]]> SYSDATE - 7;
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<delete id="VEANotifyDAO.updateChkedUseYnN" parameterClass="notifyManageVO">
|
||||||
|
UPDATE VEA_CMM_NOTIFY
|
||||||
|
SET USE_YN = 'N'
|
||||||
|
WHERE <iterate open="(" close=")" conjunction="," property="cmmNotifyOrdArr" prepend="cmm_notify_ord IN " > #cmmNotifyOrdArr[]#</iterate>
|
||||||
|
</delete>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
@ -40,9 +40,44 @@ function fn_goDetail(cmmNotifyOrd){
|
|||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function chkDelete(){
|
||||||
|
var chkLen = $(listForm).find("input[name=chk]:checked").length;
|
||||||
|
if(chkLen == 0){
|
||||||
|
alert("선택된 항목이 없습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirm("삭제하시겠습니까?")){
|
||||||
|
var data = new FormData(document.getElementById("listForm"));
|
||||||
|
var url = "<c:url value='/web/my/myNotifyMngDeleteAjax.do'/>"
|
||||||
|
$.ajax({
|
||||||
|
type : "Post",
|
||||||
|
url : url,
|
||||||
|
data : data,
|
||||||
|
dataType : 'json',
|
||||||
|
async : false,
|
||||||
|
processData : false,
|
||||||
|
contentType : false,
|
||||||
|
cache : false,
|
||||||
|
success : function(returnData){
|
||||||
|
if(returnData.result == "success"){
|
||||||
|
alert("삭제되었습니다.");
|
||||||
|
location.reload();
|
||||||
|
}else{
|
||||||
|
alert("실패하였습니다.")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function(request, status, error){
|
||||||
|
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -81,12 +116,15 @@ function fn_goDetail(cmmNotifyOrd){
|
|||||||
<table>
|
<table>
|
||||||
<caption>내알림 : 분야, 메시지, 등록일 등의 정보제공</caption>
|
<caption>내알림 : 분야, 메시지, 등록일 등의 정보제공</caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
<col style="width:3%;">
|
||||||
|
<col style="width:13%;">
|
||||||
|
<col style="width:13%;">
|
||||||
<col style="width:10%;">
|
<col style="width:10%;">
|
||||||
<col style="width:13%;">
|
|
||||||
<col style="width:13%;">
|
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
<th scope="col"></th>
|
||||||
<th scope="col">분야</th>
|
<th scope="col">분야</th>
|
||||||
<th scope="col">메시지</th>
|
<th scope="col">메시지</th>
|
||||||
<th scope="col">등록일</th>
|
<th scope="col">등록일</th>
|
||||||
@ -95,6 +133,9 @@ function fn_goDetail(cmmNotifyOrd){
|
|||||||
<tbody>
|
<tbody>
|
||||||
<c:forEach var="list" items="${list}">
|
<c:forEach var="list" items="${list}">
|
||||||
<tr onclick="fn_goDetail('${list.cmmNotifyOrd}')" onkeypress="if(event.keyCode == 13){fn_goDetail('${list.cmmNotifyOrd}');}" style="cursor: pointer;" tabindex="0" >
|
<tr onclick="fn_goDetail('${list.cmmNotifyOrd}')" onkeypress="if(event.keyCode == 13){fn_goDetail('${list.cmmNotifyOrd}');}" style="cursor: pointer;" tabindex="0" >
|
||||||
|
<td onclick="event.cancelBubble=true">
|
||||||
|
<input name="chk" id="<c:out value="${list.cmmNotifyOrd}"/>" type="checkbox" value="<c:out value="${list.cmmNotifyOrd}"/>"/> <label for="<c:out value="${list.cmmNotifyOrd}"/>"></label>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<c:if test="${list.notifyChk ne 'Y'}">
|
<c:if test="${list.notifyChk ne 'Y'}">
|
||||||
<span class="mypage_new">NEW</span>
|
<span class="mypage_new">NEW</span>
|
||||||
@ -126,6 +167,7 @@ function fn_goDetail(cmmNotifyOrd){
|
|||||||
|
|
||||||
<div class="btn_wrap btn_layout01">
|
<div class="btn_wrap btn_layout01">
|
||||||
<div class="btn_left">
|
<div class="btn_left">
|
||||||
|
<button type="button" class="btnType01" onclick="chkDelete();" />삭제</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn_center">
|
<div class="btn_center">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user