문자전송, 선거문자 주소록불러오기 왼쪽화면(주소록그룹) 로딩속도 개선
@c17b9780e75522ff5618807908ac8df8f98bd1cd
--- src/main/java/itn/let/mjo/msgcampain/web/MjonMsgCampainDataController.java
+++ src/main/java/itn/let/mjo/msgcampain/web/MjonMsgCampainDataController.java
... | ... | @@ -1,9 +1,6 @@ |
| 1 | 1 |
package itn.let.mjo.msgcampain.web; |
| 2 | 2 |
|
| 3 | 3 |
import java.io.BufferedReader; |
| 4 |
-import java.io.File; |
|
| 5 |
-import java.io.FileInputStream; |
|
| 6 |
-import java.io.FileOutputStream; |
|
| 7 | 4 |
import java.io.InputStreamReader; |
| 8 | 5 |
import java.math.BigDecimal; |
| 9 | 6 |
import java.math.RoundingMode; |
... | ... | @@ -1722,6 +1719,8 @@ |
| 1722 | 1719 |
addrGroupVO.setSiteId("web");
|
| 1723 | 1720 |
List<AddrGroupVO> addrGroupList = addrGroupService.selectAddrGroupList(addrGroupVO); |
| 1724 | 1721 |
|
| 1722 |
+ /* |
|
| 1723 |
+ * JSPark 2023.08.30 => Ajax 로 변경 |
|
| 1725 | 1724 |
//회원별 주소록 전체 갯수 조회 |
| 1726 | 1725 |
int addrTotalCount = addrService.selectAddrTotalCount(addrVO); |
| 1727 | 1726 |
|
... | ... | @@ -1732,10 +1731,12 @@ |
| 1732 | 1731 |
List<AddrVO> addrNoGrpList = addrService.selectAddrBasicGrpList(addrVO); |
| 1733 | 1732 |
|
| 1734 | 1733 |
model.addAttribute("addrTotalCount", addrTotalCount);
|
| 1735 |
- model.addAttribute("addrGroupList", addrGroupList);
|
|
| 1736 | 1734 |
model.addAttribute("addrBookmarkList", addrBookmarkList);
|
| 1737 | 1735 |
model.addAttribute("addrNoGrpList", addrNoGrpList);
|
| 1738 |
- |
|
| 1736 |
+ */ |
|
| 1737 |
+ |
|
| 1738 |
+ model.addAttribute("addrGroupList", addrGroupList);
|
|
| 1739 |
+ |
|
| 1739 | 1740 |
return "web/msgcampain/addr/MsgAddrGroupListAjax"; |
| 1740 | 1741 |
} |
| 1741 | 1742 |
|
--- src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
+++ src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
... | ... | @@ -1,9 +1,6 @@ |
| 1 | 1 |
package itn.let.mjo.msgdata.web; |
| 2 | 2 |
|
| 3 | 3 |
import java.io.BufferedReader; |
| 4 |
-import java.io.File; |
|
| 5 |
-import java.io.FileInputStream; |
|
| 6 |
-import java.io.FileOutputStream; |
|
| 7 | 4 |
import java.io.InputStreamReader; |
| 8 | 5 |
import java.io.OutputStream; |
| 9 | 6 |
import java.math.BigDecimal; |
... | ... | @@ -1694,6 +1691,8 @@ |
| 1694 | 1691 |
addrGroupVO.setSiteId("web");
|
| 1695 | 1692 |
List<AddrGroupVO> addrGroupList = addrGroupService.selectAddrGroupList(addrGroupVO); |
| 1696 | 1693 |
|
| 1694 |
+ /* |
|
| 1695 |
+ * JSPark 2023.08.30 => Ajax 로 변경 |
|
| 1697 | 1696 |
//회원별 주소록 전체 갯수 조회 |
| 1698 | 1697 |
int addrTotalCount = addrService.selectAddrTotalCount(addrVO); |
| 1699 | 1698 |
|
... | ... | @@ -1704,9 +1703,11 @@ |
| 1704 | 1703 |
List<AddrVO> addrNoGrpList = addrService.selectAddrBasicGrpList(addrVO); |
| 1705 | 1704 |
|
| 1706 | 1705 |
model.addAttribute("addrTotalCount", addrTotalCount);
|
| 1707 |
- model.addAttribute("addrGroupList", addrGroupList);
|
|
| 1708 | 1706 |
model.addAttribute("addrBookmarkList", addrBookmarkList);
|
| 1709 | 1707 |
model.addAttribute("addrNoGrpList", addrNoGrpList);
|
| 1708 |
+ */ |
|
| 1709 |
+ |
|
| 1710 |
+ model.addAttribute("addrGroupList", addrGroupList);
|
|
| 1710 | 1711 |
|
| 1711 | 1712 |
return "web/msgdata/addr/MsgAddrGroupListAjax"; |
| 1712 | 1713 |
} |
--- src/main/webapp/WEB-INF/jsp/web/msgcampain/addr/MsgAddrGroupListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgcampain/addr/MsgAddrGroupListAjax.jsp
... | ... | @@ -4,33 +4,112 @@ |
| 4 | 4 |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> |
| 5 | 5 |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> |
| 6 | 6 |
<script type="text/javascript"> |
| 7 |
+$(document).ready(function(){
|
|
| 8 |
+ |
|
| 9 |
+ // 주소록 그룹 카운트(전체) |
|
| 10 |
+ getAddrGroupTotCnt(); |
|
| 7 | 11 |
|
| 12 |
+ //주소록 그룹 카운트(그룹미지정) |
|
| 13 |
+ getAddrGroupNogrpCnt(); |
|
| 14 |
+ |
|
| 15 |
+ //주소록 그룹 카운트(자주보내는 번호) |
|
| 16 |
+ getAddrGroupBookmarkCnt(); |
|
| 17 |
+ |
|
| 18 |
+}); |
|
| 19 |
+ |
|
| 20 |
+// 주소록 그룹 카운트(전체) |
|
| 21 |
+function getAddrGroupTotCnt() {
|
|
| 22 |
+ $.ajax({
|
|
| 23 |
+ type: "POST", |
|
| 24 |
+ url: "/web/addr/selectAddrGroupTotCntAjax.do", |
|
| 25 |
+ data: {},
|
|
| 26 |
+ dataType:'json', |
|
| 27 |
+ async: true, |
|
| 28 |
+ success: function (data) {
|
|
| 29 |
+ if (data.isSuccess) {
|
|
| 30 |
+ $("#addrTotCnt").html(numberWithCommas(data.addrTotCnt));
|
|
| 31 |
+ } |
|
| 32 |
+ else {
|
|
| 33 |
+ //alert("Msg : " + data.msg);
|
|
| 34 |
+ } |
|
| 35 |
+ }, |
|
| 36 |
+ error: function (e) {
|
|
| 37 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 38 |
+ } |
|
| 39 |
+ }); |
|
| 40 |
+} |
|
| 41 |
+ |
|
| 42 |
+//주소록 그룹 카운트(그룹미지정) |
|
| 43 |
+function getAddrGroupNogrpCnt() {
|
|
| 44 |
+ $.ajax({
|
|
| 45 |
+ type: "POST", |
|
| 46 |
+ url: "/web/addr/selectAddrGroupNogrpCntAjax.do", |
|
| 47 |
+ data: {},
|
|
| 48 |
+ dataType:'json', |
|
| 49 |
+ async: true, |
|
| 50 |
+ success: function (data) {
|
|
| 51 |
+ if (data.isSuccess) {
|
|
| 52 |
+ $("#nogrpCnt").html(data.nogrpCnt);
|
|
| 53 |
+ } |
|
| 54 |
+ else {
|
|
| 55 |
+ //alert("Msg : " + data.msg);
|
|
| 56 |
+ } |
|
| 57 |
+ }, |
|
| 58 |
+ error: function (e) {
|
|
| 59 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 60 |
+ } |
|
| 61 |
+ }); |
|
| 62 |
+} |
|
| 63 |
+ |
|
| 64 |
+//주소록 그룹 카운트(자주보내는 번호) |
|
| 65 |
+function getAddrGroupBookmarkCnt() {
|
|
| 66 |
+ $.ajax({
|
|
| 67 |
+ type: "POST", |
|
| 68 |
+ url: "/web/addr/selectAddrGroupBookmarkCntAjax.do", |
|
| 69 |
+ data: {},
|
|
| 70 |
+ dataType:'json', |
|
| 71 |
+ async: true, |
|
| 72 |
+ success: function (data) {
|
|
| 73 |
+ if (data.isSuccess) {
|
|
| 74 |
+ $("#bookmarkCnt").html(data.bookmarkCnt);
|
|
| 75 |
+ } |
|
| 76 |
+ else {
|
|
| 77 |
+ //alert("Msg : " + data.msg);
|
|
| 78 |
+ } |
|
| 79 |
+ }, |
|
| 80 |
+ error: function (e) {
|
|
| 81 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 82 |
+ } |
|
| 83 |
+ }); |
|
| 84 |
+} |
|
| 85 |
+ |
|
| 86 |
+ |
|
| 87 |
+//그룹 클릭했을 때 활성화 디자인 추가 |
|
| 88 |
+$(".adr_cb_wrap2").click(function(){
|
|
| 89 |
+ $(this).addClass("active");
|
|
| 90 |
+ $(this).siblings(".adr_cb_wrap2").removeClass("active");
|
|
| 91 |
+}); |
|
| 8 | 92 |
</script> |
| 9 | 93 |
|
| 10 | 94 |
<div class="adr_pop_list"> |
| 11 | 95 |
<div class="adr_cb_wrap2"> |
| 12 |
- <%-- <label for="group0" class="label"></label> |
|
| 13 |
- <input type="checkbox" name="grpCheck" id="group0" value="all"> --%> |
|
| 14 | 96 |
<p onClick="javascript:fnSelectAddrList('all','',this); return false;">
|
| 15 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span><c:out value="${addrTotalCount}"/></span>명]
|
|
| 97 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span id="addrTotCnt"></span>명] |
|
| 16 | 98 |
</p> |
| 17 | 99 |
</div> |
| 18 |
- <c:set var="noGrpSize" value="${fn:length(addrNoGrpList)}" />
|
|
| 100 |
+ |
|
| 19 | 101 |
<div class="adr_cb_wrap2"> |
| 20 |
- <%-- <label for="group1" class="label"></label> |
|
| 21 |
- <input type="checkbox" name="grpCheck" id="group1" value="none"> --%> |
|
| 22 | 102 |
<p onClick="javascript:fnSelectAddrList('none','',this); return false;">
|
| 23 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span><c:out value="${noGrpSize}"/></span>명]
|
|
| 103 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명] |
|
| 24 | 104 |
</p> |
| 25 | 105 |
</div> |
| 26 |
- <c:set var="bookmarkSize" value="${fn:length(addrBookmarkList)}" />
|
|
| 106 |
+ |
|
| 27 | 107 |
<div class="adr_cb_wrap2"> |
| 28 |
- <%-- <label for="group2" class="label"></label> |
|
| 29 |
- <input type="checkbox" name="grpCheck" id="group2" value="book"> --%> |
|
| 30 | 108 |
<p onClick="javascript:fnSelectAddrList('book','',this); return false;">
|
| 31 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span><c:out value="${bookmarkSize}"/></span>명]
|
|
| 109 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명] |
|
| 32 | 110 |
</p> |
| 33 | 111 |
</div> |
| 112 |
+ |
|
| 34 | 113 |
<c:choose> |
| 35 | 114 |
<c:when test="${not empty addrGroupList}">
|
| 36 | 115 |
<c:forEach var="addrGroupList" items="${addrGroupList}" varStatus="status">
|
--- src/main/webapp/WEB-INF/jsp/web/msgdata/addr/MsgAddrGroupListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/addr/MsgAddrGroupListAjax.jsp
... | ... | @@ -5,6 +5,87 @@ |
| 5 | 5 |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> |
| 6 | 6 |
|
| 7 | 7 |
<script type="text/javascript"> |
| 8 |
+ |
|
| 9 |
+$(document).ready(function(){
|
|
| 10 |
+ |
|
| 11 |
+ // 주소록 그룹 카운트(전체) |
|
| 12 |
+ getAddrGroupTotCnt(); |
|
| 13 |
+ |
|
| 14 |
+ //주소록 그룹 카운트(그룹미지정) |
|
| 15 |
+ getAddrGroupNogrpCnt(); |
|
| 16 |
+ |
|
| 17 |
+ //주소록 그룹 카운트(자주보내는 번호) |
|
| 18 |
+ getAddrGroupBookmarkCnt(); |
|
| 19 |
+ |
|
| 20 |
+}); |
|
| 21 |
+ |
|
| 22 |
+// 주소록 그룹 카운트(전체) |
|
| 23 |
+function getAddrGroupTotCnt() {
|
|
| 24 |
+ $.ajax({
|
|
| 25 |
+ type: "POST", |
|
| 26 |
+ url: "/web/addr/selectAddrGroupTotCntAjax.do", |
|
| 27 |
+ data: {},
|
|
| 28 |
+ dataType:'json', |
|
| 29 |
+ async: true, |
|
| 30 |
+ success: function (data) {
|
|
| 31 |
+ if (data.isSuccess) {
|
|
| 32 |
+ $("#addrTotCnt").html(numberWithCommas(data.addrTotCnt));
|
|
| 33 |
+ } |
|
| 34 |
+ else {
|
|
| 35 |
+ //alert("Msg : " + data.msg);
|
|
| 36 |
+ } |
|
| 37 |
+ }, |
|
| 38 |
+ error: function (e) {
|
|
| 39 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 40 |
+ } |
|
| 41 |
+ }); |
|
| 42 |
+} |
|
| 43 |
+ |
|
| 44 |
+//주소록 그룹 카운트(그룹미지정) |
|
| 45 |
+function getAddrGroupNogrpCnt() {
|
|
| 46 |
+ $.ajax({
|
|
| 47 |
+ type: "POST", |
|
| 48 |
+ url: "/web/addr/selectAddrGroupNogrpCntAjax.do", |
|
| 49 |
+ data: {},
|
|
| 50 |
+ dataType:'json', |
|
| 51 |
+ async: true, |
|
| 52 |
+ success: function (data) {
|
|
| 53 |
+ if (data.isSuccess) {
|
|
| 54 |
+ $("#nogrpCnt").html(data.nogrpCnt);
|
|
| 55 |
+ } |
|
| 56 |
+ else {
|
|
| 57 |
+ //alert("Msg : " + data.msg);
|
|
| 58 |
+ } |
|
| 59 |
+ }, |
|
| 60 |
+ error: function (e) {
|
|
| 61 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 62 |
+ } |
|
| 63 |
+ }); |
|
| 64 |
+} |
|
| 65 |
+ |
|
| 66 |
+//주소록 그룹 카운트(자주보내는 번호) |
|
| 67 |
+function getAddrGroupBookmarkCnt() {
|
|
| 68 |
+ $.ajax({
|
|
| 69 |
+ type: "POST", |
|
| 70 |
+ url: "/web/addr/selectAddrGroupBookmarkCntAjax.do", |
|
| 71 |
+ data: {},
|
|
| 72 |
+ dataType:'json', |
|
| 73 |
+ async: true, |
|
| 74 |
+ success: function (data) {
|
|
| 75 |
+ if (data.isSuccess) {
|
|
| 76 |
+ $("#bookmarkCnt").html(data.bookmarkCnt);
|
|
| 77 |
+ } |
|
| 78 |
+ else {
|
|
| 79 |
+ //alert("Msg : " + data.msg);
|
|
| 80 |
+ } |
|
| 81 |
+ }, |
|
| 82 |
+ error: function (e) {
|
|
| 83 |
+ //alert("ERROR : " + JSON.stringify(e));
|
|
| 84 |
+ } |
|
| 85 |
+ }); |
|
| 86 |
+} |
|
| 87 |
+ |
|
| 88 |
+ |
|
| 8 | 89 |
// 그룹 클릭했을 때 활성화 디자인 추가 |
| 9 | 90 |
$(".adr_cb_wrap2").click(function(){
|
| 10 | 91 |
$(this).addClass("active");
|
... | ... | @@ -14,34 +95,27 @@ |
| 14 | 95 |
|
| 15 | 96 |
<div class="adr_pop_list"> |
| 16 | 97 |
<div class="adr_cb_wrap2"> |
| 17 |
- <%-- <label for="group0" class="label"></label> |
|
| 18 |
- <input type="checkbox" name="grpCheck" id="group0" value="all"> --%> |
|
| 19 | 98 |
<p onClick="javascript:fnSelectAddrList('all','',this); return false;">
|
| 20 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span><c:out value="${addrTotalCount}"/></span>명]
|
|
| 99 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">전체[<span id="addrTotCnt"></span>명] |
|
| 21 | 100 |
</p> |
| 22 | 101 |
</div> |
| 23 |
- <c:set var="noGrpSize" value="${fn:length(addrNoGrpList)}" />
|
|
| 102 |
+ |
|
| 24 | 103 |
<div class="adr_cb_wrap2"> |
| 25 |
- <%-- <label for="group1" class="label"></label> |
|
| 26 |
- <input type="checkbox" name="grpCheck" id="group1" value="none"> --%> |
|
| 27 | 104 |
<p onClick="javascript:fnSelectAddrList('none','',this); return false;">
|
| 28 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span><c:out value="${noGrpSize}"/></span>명]
|
|
| 105 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">그룹미지정[<span id="nogrpCnt"></span>명] |
|
| 29 | 106 |
</p> |
| 30 | 107 |
</div> |
| 31 |
- <c:set var="bookmarkSize" value="${fn:length(addrBookmarkList)}" />
|
|
| 108 |
+ |
|
| 32 | 109 |
<div class="adr_cb_wrap2"> |
| 33 |
- <%-- <label for="group2" class="label"></label> |
|
| 34 |
- <input type="checkbox" name="grpCheck" id="group2" value="book"> --%> |
|
| 35 | 110 |
<p onClick="javascript:fnSelectAddrList('book','',this); return false;">
|
| 36 |
- <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span><c:out value="${bookmarkSize}"/></span>명]
|
|
| 111 |
+ <img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘">자주보내는 번호[<span id="bookmarkCnt"></span>명] |
|
| 37 | 112 |
</p> |
| 38 | 113 |
</div> |
| 114 |
+ |
|
| 39 | 115 |
<c:choose> |
| 40 | 116 |
<c:when test="${not empty addrGroupList}">
|
| 41 | 117 |
<c:forEach var="addrGroupList" items="${addrGroupList}" varStatus="status">
|
| 42 | 118 |
<div class="adr_cb_wrap2"> |
| 43 |
- <%-- <label for="group${status.index+3}" class="label"></label>
|
|
| 44 |
- <input type="checkbox" name="grpCheck" id="group${status.index+3}" value="${addrGroupList.addrGrpId}"> --%>
|
|
| 45 | 119 |
<p onClick="javascript:fnSelectAddrList('grp','${addrGroupList.addrGrpId}',this); return false;">
|
| 46 | 120 |
<img src="/publish/images/content/close_folder2.png" alt="폴더 닫힘"> |
| 47 | 121 |
<c:out value="${addrGroupList.addrGrpNm}" />[<span><c:out value="${addrGroupList.grpCount}" /></span>명]
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?