문자전송, 선거문자 주소록불러오기 왼쪽화면(주소록그룹) 로딩속도 개선
This commit is contained in:
parent
df8a240896
commit
c17b9780e7
@ -1,9 +1,6 @@
|
||||
package itn.let.mjo.msgcampain.web;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@ -1722,6 +1719,8 @@ public class MjonMsgCampainDataController {
|
||||
addrGroupVO.setSiteId("web");
|
||||
List<AddrGroupVO> addrGroupList = addrGroupService.selectAddrGroupList(addrGroupVO);
|
||||
|
||||
/*
|
||||
* JSPark 2023.08.30 => Ajax 로 변경
|
||||
//회원별 주소록 전체 갯수 조회
|
||||
int addrTotalCount = addrService.selectAddrTotalCount(addrVO);
|
||||
|
||||
@ -1732,9 +1731,11 @@ public class MjonMsgCampainDataController {
|
||||
List<AddrVO> addrNoGrpList = addrService.selectAddrBasicGrpList(addrVO);
|
||||
|
||||
model.addAttribute("addrTotalCount", addrTotalCount);
|
||||
model.addAttribute("addrGroupList", addrGroupList);
|
||||
model.addAttribute("addrBookmarkList", addrBookmarkList);
|
||||
model.addAttribute("addrNoGrpList", addrNoGrpList);
|
||||
*/
|
||||
|
||||
model.addAttribute("addrGroupList", addrGroupList);
|
||||
|
||||
return "web/msgcampain/addr/MsgAddrGroupListAjax";
|
||||
}
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package itn.let.mjo.msgdata.web;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigDecimal;
|
||||
@ -1694,6 +1691,8 @@ public class MjonMsgDataController {
|
||||
addrGroupVO.setSiteId("web");
|
||||
List<AddrGroupVO> addrGroupList = addrGroupService.selectAddrGroupList(addrGroupVO);
|
||||
|
||||
/*
|
||||
* JSPark 2023.08.30 => Ajax 로 변경
|
||||
//회원별 주소록 전체 갯수 조회
|
||||
int addrTotalCount = addrService.selectAddrTotalCount(addrVO);
|
||||
|
||||
@ -1704,9 +1703,11 @@ public class MjonMsgDataController {
|
||||
List<AddrVO> addrNoGrpList = addrService.selectAddrBasicGrpList(addrVO);
|
||||
|
||||
model.addAttribute("addrTotalCount", addrTotalCount);
|
||||
model.addAttribute("addrGroupList", addrGroupList);
|
||||
model.addAttribute("addrBookmarkList", addrBookmarkList);
|
||||
model.addAttribute("addrNoGrpList", addrNoGrpList);
|
||||
*/
|
||||
|
||||
model.addAttribute("addrGroupList", addrGroupList);
|
||||
|
||||
return "web/msgdata/addr/MsgAddrGroupListAjax";
|
||||
}
|
||||
|
||||
@ -4,33 +4,112 @@
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
// 주소록 그룹 카운트(전체)
|
||||
getAddrGroupTotCnt();
|
||||
|
||||
//주소록 그룹 카운트(그룹미지정)
|
||||
getAddrGroupNogrpCnt();
|
||||
|
||||
//주소록 그룹 카운트(자주보내는 번호)
|
||||
getAddrGroupBookmarkCnt();
|
||||
|
||||
});
|
||||
|
||||
// 주소록 그룹 카운트(전체)
|
||||
function getAddrGroupTotCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupTotCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#addrTotCnt").html(numberWithCommas(data.addrTotCnt));
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//주소록 그룹 카운트(그룹미지정)
|
||||
function getAddrGroupNogrpCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupNogrpCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#nogrpCnt").html(data.nogrpCnt);
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//주소록 그룹 카운트(자주보내는 번호)
|
||||
function getAddrGroupBookmarkCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupBookmarkCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#bookmarkCnt").html(data.bookmarkCnt);
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//그룹 클릭했을 때 활성화 디자인 추가
|
||||
$(".adr_cb_wrap2").click(function(){
|
||||
$(this).addClass("active");
|
||||
$(this).siblings(".adr_cb_wrap2").removeClass("active");
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="adr_pop_list">
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group0" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group0" value="all"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('all','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span><c:out value="${addrTotalCount}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span id="addrTotCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
<c:set var="noGrpSize" value="${fn:length(addrNoGrpList)}" />
|
||||
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group1" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group1" value="none"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('none','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span><c:out value="${noGrpSize}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
<c:set var="bookmarkSize" value="${fn:length(addrBookmarkList)}" />
|
||||
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group2" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group2" value="book"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('book','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span><c:out value="${bookmarkSize}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${not empty addrGroupList}">
|
||||
<c:forEach var="addrGroupList" items="${addrGroupList}" varStatus="status">
|
||||
|
||||
@ -5,6 +5,87 @@
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// 주소록 그룹 카운트(전체)
|
||||
getAddrGroupTotCnt();
|
||||
|
||||
//주소록 그룹 카운트(그룹미지정)
|
||||
getAddrGroupNogrpCnt();
|
||||
|
||||
//주소록 그룹 카운트(자주보내는 번호)
|
||||
getAddrGroupBookmarkCnt();
|
||||
|
||||
});
|
||||
|
||||
// 주소록 그룹 카운트(전체)
|
||||
function getAddrGroupTotCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupTotCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#addrTotCnt").html(numberWithCommas(data.addrTotCnt));
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//주소록 그룹 카운트(그룹미지정)
|
||||
function getAddrGroupNogrpCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupNogrpCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#nogrpCnt").html(data.nogrpCnt);
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//주소록 그룹 카운트(자주보내는 번호)
|
||||
function getAddrGroupBookmarkCnt() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/addr/selectAddrGroupBookmarkCntAjax.do",
|
||||
data: {},
|
||||
dataType:'json',
|
||||
async: true,
|
||||
success: function (data) {
|
||||
if (data.isSuccess) {
|
||||
$("#bookmarkCnt").html(data.bookmarkCnt);
|
||||
}
|
||||
else {
|
||||
//alert("Msg : " + data.msg);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
//alert("ERROR : " + JSON.stringify(e));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 그룹 클릭했을 때 활성화 디자인 추가
|
||||
$(".adr_cb_wrap2").click(function(){
|
||||
$(this).addClass("active");
|
||||
@ -14,34 +95,27 @@ $(".adr_cb_wrap2").click(function(){
|
||||
|
||||
<div class="adr_pop_list">
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group0" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group0" value="all"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('all','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span><c:out value="${addrTotalCount}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span id="addrTotCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
<c:set var="noGrpSize" value="${fn:length(addrNoGrpList)}" />
|
||||
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group1" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group1" value="none"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('none','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span><c:out value="${noGrpSize}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
<c:set var="bookmarkSize" value="${fn:length(addrBookmarkList)}" />
|
||||
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group2" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group2" value="book"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('book','',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span><c:out value="${bookmarkSize}"/></span>명]
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명]
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${not empty addrGroupList}">
|
||||
<c:forEach var="addrGroupList" items="${addrGroupList}" varStatus="status">
|
||||
<div class="adr_cb_wrap2">
|
||||
<%-- <label for="group${status.index+3}" class="label"></label>
|
||||
<input type="checkbox" name="grpCheck" id="group${status.index+3}" value="${addrGroupList.addrGrpId}"> --%>
|
||||
<p onClick="javascript:fnSelectAddrList('grp','${addrGroupList.addrGrpId}',this); return false;">
|
||||
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">
|
||||
<c:out value="${addrGroupList.addrGrpNm}" />[<span><c:out value="${addrGroupList.grpCount}" /></span>명]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user