2024-03-22 17:44 마이페이지 페이지 로딩 개선을 위해 최근 발송내역 - 알림톡 ajax 처리

This commit is contained in:
myname 2024-03-22 17:44:47 +09:00
parent 6396af29b7
commit c21c8ce1ca
4 changed files with 199 additions and 1 deletions

View File

@ -378,6 +378,8 @@ public class EgovMypageController {
model.addAttribute("mjonMsgSentList", mjonMsgSentList);
}
/*
* 2024-03-22 페이지 로딩 속도 개선을 위해 ajax로 처리
{//최근 발송 알림톡 내용 불러오기 - 최근 3개 내역만
KakaoSentVO kakaoSentVO = new KakaoSentVO();
kakaoSentVO.setUserId(userId);
@ -391,6 +393,7 @@ public class EgovMypageController {
List<KakaoSentVO> kakaoATSentList = kakaoSentService.selectAllKakaoSentList(kakaoSentVO);
model.addAttribute("kakaoATSentList", kakaoATSentList);
}
*/
{//최근 발송 팩스 내용 불러오기 - 최근 3개 내역만
FaxGroupDataVO faxGroupDataVO = new FaxGroupDataVO();
@ -518,6 +521,42 @@ public class EgovMypageController {
return "/web/user/subcontent/mberInfo_send_reservAjax";
}
/**
* 마이페이지 - 최근발송내역-알림톡
* @param mjonMsgVO
* @param model
* @return "/web/member/pay/PayUserListAjax.do"
* @throws Exception
*/
@RequestMapping(value="/web/user/subcontent/mberInfo_kakaoATSentListAjax.do")
public String mberInfo_kakaoATSentListAjax(
HttpServletRequest request,
ModelMap model) throws Exception{
System.out.println("mberInfo_kakaoATSentListAjax");
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId());
{//최근 발송 알림톡 내용 불러오기 - 최근 3개 내역만
KakaoSentVO kakaoSentVO = new KakaoSentVO();
kakaoSentVO.setUserId(userId);
kakaoSentVO.setTabType("at");
kakaoSentVO.setRecordCountPerPage(3);
kakaoSentVO.setFirstIndex(0);
kakaoSentVO.setListType("groupList");
kakaoSentVO.setStateType("all");
kakaoSentVO.setSearchSortOrd("desc");
kakaoSentVO.setSearchSortCnd("regdate");
List<KakaoSentVO> kakaoATSentList = kakaoSentService.selectAllKakaoSentList(kakaoSentVO);
model.addAttribute("kakaoATSentList", kakaoATSentList);
}
System.out.println("mberInfo_kakaoATSentListAjax_end");
return "/web/user/subcontent/mberInfo_kakaoATSentListAjax";
}
//발송문자 건수 계산하는 함수
public String[] getTotalSendCnt(List<MjonMsgSentVO> mjonMsgSentVO) {

View File

@ -201,6 +201,7 @@
<!-- 전체 발송결과 조회 (그룹별)-->
<select id="KakaoSentDAO.selectAllKakaoSentList" parameterClass="kakaoSentVO" resultClass="kakaoSentVO">
/* KakaoSentDAO.selectAllKakaoSentList */
SELECT
M2.totMsgCnt ,
M2.userId ,
@ -478,6 +479,7 @@
<!-- 전체 발송결과 조회 (개인별)-->
<select id="KakaoSentDAO.selectAllPrivateKakaoSentList" parameterClass="kakaoSentVO" resultClass="kakaoSentVO">
/* KakaoSentDAO.selectAllPrivateKakaoSentList */
SELECT
M2.totMsgCnt
, M2.userId

View File

@ -45,6 +45,8 @@ $(document).ready(function(){
subContent(); //이용내역 총금액
subContentSendReserv(); //발송,예약건수
subContentKakaoATSentList();//톡 발송 정보
});
//기간 요일 지정
@ -143,6 +145,43 @@ function subContentSendReserv(p_content_no){
}
//마이페이지 - 세부내역 - 발송/예약건수
function subContentKakaoATSentList(p_content_no){
var sendData = $(document.listForm).serializeArray();
var v_html_pre = '<table>'
+ '<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>'
+ '<colgroup>'
+ '<col style="width: 10%;">'
+ '<col style="width: 15%;">'
+ '<col style="width: auto;">'
+ '<col style="width: 10%;">'
+ '<col style="width: 10%;">'
+ '<col style="width: 15%;">'
+ '</colgroup>'
+ '<thead>'
+ '<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>'
+ '</tr>'
+ '</thead>'
+ '<tbody>'
+ '<tr><td colspan="6">LOADING...</td></tr>'
+ '</tbody>'
+ '</table>';
//$("#prePaymentYn_Y").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>');
$("#kakaoATSentList").html(v_html_pre);
$("#kakaoATSentList").load("/web/user/subcontent/mberInfo_kakaoATSentListAjax.do", sendData ,function(response, status, xhr){
});
}
//[문자]상세보기 버튼 실행
function fnRevDetailPop(msgGroupId, fileCnt){
document.resPopForm.msgGroupId.value = msgGroupId;
@ -772,7 +811,7 @@ function getMberGrdChk() {
<div class="my_dashboard_cont3">
<p class="dashboard_title">최근 발송내역 - 알림톡</p>
<div class="table_wrap">
<div class="table_wrap" id="kakaoATSentList">
<table>
<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
<colgroup>

View File

@ -0,0 +1,118 @@
<%--
Class Name : mberInfo_kakaoATSentListAjax.jsp
Description : 마이페이지 - 최근발송내역-알림톡
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2021.03.31 신명섭 최초 생성
Copyright (C) 2009 by ITN All right reserved.
--%>
<%@ page 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="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%>
<script src="/publish/js/content.js"></script>
<script>
$(document).ready(function(){
});
</script>
<table>
<caption>등록일자, 발신번호, 발신번호 명, 상태 정보를 제공하는 표</caption>
<colgroup>
<col style="width: 10%;">
<col style="width: 15%;">
<col style="width: auto;">
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 15%;">
</colgroup>
<thead>
<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>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${not empty kakaoATSentList}">
<c:forEach var="resultSentMsg" items="${kakaoATSentList}" varStatus="status">
<tr>
<td>
알림톡
</td>
<td>
<c:choose>
<c:when test="${not empty resultSentMsg.regdate}">
<fmt:formatDate value="${resultSentMsg.regdate}" pattern="yyyy-MM-dd HH:mm:ss"/>
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
</td>
<td>
<button class="btnType btnType20" onClick="javascript:fnRevDetailPop02('${resultSentMsg.msgGroupId}'); return false;">상세보기</button>
</td>
<td class="font_ellipsis">
<p>
<fmt:formatNumber value="${resultSentMsg.msgGroupCnt}" type="number" />
</p>
</td>
<td class="font_ellipsis">
<p class= "c_002c9a fwMd">
<c:choose>
<c:when test="${resultSentMsg.msgResult == 'S'}">
정상수신
</c:when>
<c:when test="${resultSentMsg.msgResult == 'W'}">
발송대기
</c:when>
<c:when test="${resultSentMsg.msgResult == 'F'}">
수신오류
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
</p>
</td>
<td>
<c:choose>
<c:when test="${resultSentMsg.bizKakaoResendYn == 'Y'}">
<c:choose>
<c:when test="${resultSentMsg.kakaoResendSuccCount ne '0'}">
<c:out value="${resultSentMsg.kakaoResendSuccCount}"/>
</c:when>
<c:otherwise>
0
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
0
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="6">발송 내역이 없습니다.</td>
</tr>
</c:otherwise>
</c:choose>
</tbody>
</table>