[사용자] 내 알림 1주일 경과된 데이터 삭제 처리
This commit is contained in:
parent
b1c740a576
commit
f2685aea0f
@ -381,12 +381,27 @@ public class MyPageController {
|
|||||||
, ModelMap model
|
, ModelMap model
|
||||||
) throws Exception {
|
) throws Exception {
|
||||||
|
|
||||||
|
// try {
|
||||||
|
|
||||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
||||||
|
SsoLoginVO ssoLoginVO = checkLoginUtil.getSSOLoginVO(request); //SSO 로그인 정보 가져오기
|
||||||
|
|
||||||
|
if (loginVO == null || ssoLoginVO == null) {
|
||||||
|
//이전 url 처리(beforeSiteUrl)_이준호_220228추가
|
||||||
|
return checkLoginUtil.getUserLoginPage(model, request); //로그인 정보가 없으면 로그인 페이지로 이동한다.
|
||||||
|
// return checkLoginUtil.getUserLoginPage(model); //로그인 정보가 없으면 로그인 페이지로 이동한다.
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyManageService.updateM7DaysUseYnN();
|
||||||
|
|
||||||
|
|
||||||
//1.pageing step1
|
//1.pageing step1
|
||||||
PaginationInfo paginationInfo = this.setNotiPagingStep1(notifyManageVO);
|
PaginationInfo paginationInfo = this.setNotiPagingStep1(notifyManageVO);
|
||||||
//2. pageing step2
|
//2. pageing step2
|
||||||
notifyManageVO = this.setNotiPagingStep2(notifyManageVO, paginationInfo);
|
notifyManageVO = this.setNotiPagingStep2(notifyManageVO, paginationInfo);
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
notifyManageVO.setToUserId(loginVO.getUniqId());
|
notifyManageVO.setToUserId(loginVO.getUniqId());
|
||||||
|
|
||||||
|
|
||||||
@ -412,7 +427,10 @@ public class MyPageController {
|
|||||||
|
|
||||||
//대상 리스트, 페이징 정보 전달
|
//대상 리스트, 페이징 정보 전달
|
||||||
model.addAttribute("list", notifyManageVOList);
|
model.addAttribute("list", notifyManageVOList);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// // TODO: handle exception
|
||||||
|
// }
|
||||||
// return "web/my/myQnaMngList";
|
// return "web/my/myQnaMngList";
|
||||||
return "web/my/myNotifyMngList";
|
return "web/my/myNotifyMngList";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,6 +59,8 @@ public interface NotifyManageService {
|
|||||||
|
|
||||||
int selectNotifyCnt(String uniqId);
|
int selectNotifyCnt(String uniqId);
|
||||||
|
|
||||||
|
void updateM7DaysUseYnN();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,8 @@ public class NotifyManageVO extends ComDefaultVO implements Serializable {
|
|||||||
private String useYn;
|
private String useYn;
|
||||||
private String mngUserId;
|
private String mngUserId;
|
||||||
private String mngUserNm;
|
private String mngUserNm;
|
||||||
|
|
||||||
|
|
||||||
public String getCmmNotifyOrd() {
|
public String getCmmNotifyOrd() {
|
||||||
return cmmNotifyOrd;
|
return cmmNotifyOrd;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,5 +82,9 @@ public class NotifyManageDAO extends EgovAbstractDAO {
|
|||||||
return (int) select("VEANotifyDAO.selectNotifyCnt", uniqId);
|
return (int) select("VEANotifyDAO.selectNotifyCnt", uniqId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateM7DaysUseYnN() {
|
||||||
|
update("VEANotifyDAO.updateM7DaysUseYnN");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -386,4 +386,10 @@ public class NotifyManageServiceImpl extends EgovAbstractServiceImpl implements
|
|||||||
public int selectNotifyCnt(String uniqId) {
|
public int selectNotifyCnt(String uniqId) {
|
||||||
return notifyManageDAO.selectNotifyCnt(uniqId);
|
return notifyManageDAO.selectNotifyCnt(uniqId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateM7DaysUseYnN() {
|
||||||
|
notifyManageDAO.updateM7DaysUseYnN();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
, FRST_REGISTER_ID
|
, FRST_REGISTER_ID
|
||||||
, LAST_UPDT_PNTTM
|
, LAST_UPDT_PNTTM
|
||||||
, LAST_UPDUSR_ID
|
, LAST_UPDUSR_ID
|
||||||
|
, USE_YN
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -43,7 +44,8 @@
|
|||||||
a.FRST_REGIST_PNTTM as frstRegistPnttm ,
|
a.FRST_REGIST_PNTTM as frstRegistPnttm ,
|
||||||
a.FRST_REGISTER_ID as frstRegisterId ,
|
a.FRST_REGISTER_ID as frstRegisterId ,
|
||||||
a.LAST_UPDT_PNTTM as lastUpdtPnttm ,
|
a.LAST_UPDT_PNTTM as lastUpdtPnttm ,
|
||||||
a.LAST_UPDUSR_ID as lastUpdusrId
|
a.LAST_UPDUSR_ID as lastUpdusrId ,
|
||||||
|
a.USE_YN as useYn
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -56,6 +58,7 @@
|
|||||||
<include refid="VEANotifyDAO.table_name"/> a
|
<include refid="VEANotifyDAO.table_name"/> a
|
||||||
WHERE
|
WHERE
|
||||||
a.TO_USER_ID = #toUserId#
|
a.TO_USER_ID = #toUserId#
|
||||||
|
and a.USE_YN = 'Y'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
a.NOTIFY_CHK
|
a.NOTIFY_CHK
|
||||||
, a.FRST_REGIST_PNTTM desc
|
, a.FRST_REGIST_PNTTM desc
|
||||||
@ -80,6 +83,7 @@
|
|||||||
, #frstRegisterId#
|
, #frstRegisterId#
|
||||||
, ''
|
, ''
|
||||||
, ''
|
, ''
|
||||||
|
, 'Y'
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -155,5 +159,10 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="VEANotifyDAO.updateM7DaysUseYnN">
|
||||||
|
UPDATE VEA_CMM_NOTIFY
|
||||||
|
SET USE_YN = 'N'
|
||||||
|
WHERE FRST_REGIST_PNTTM <![CDATA[ <= ]]> SYSDATE - 7;
|
||||||
|
|
||||||
|
</update>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
Loading…
Reference in New Issue
Block a user