--- src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
... | ... | @@ -4226,48 +4226,16 @@ |
| 4226 | 4226 |
|
| 4227 | 4227 |
|
| 4228 | 4228 |
|
| 4229 |
- /* |
|
| 4230 |
- * // 1건 이상 발송이 있는 경우만 캐쉬를 차감 시킨다. |
|
| 4231 |
- if (resultCnt > 0) {
|
|
| 4232 |
- |
|
| 4233 |
- int totSendCnt = mjonMsgVO.getTotalCallCnt(); |
|
| 4234 |
- Float eachPrice = Float.parseFloat(mjonMsgVO.getEachPrice()); |
|
| 4235 |
- Float totPrice = eachPrice * resultCnt; |
|
| 4236 |
- String strTotPrice = String.format("%.1f", totPrice);
|
|
| 4237 |
- |
|
| 4238 |
- mjonMsgVO.setTotPrice(strTotPrice);// 현재 합산 금액 셋팅 |
|
| 4239 |
- mjonPayVO.setCashId(idgenMjonCashId.getNextStringId()); |
|
| 4240 |
- mjonPayVO.setUserId(mjonMsgVO.getUserId()); |
|
| 4241 |
- mjonPayVO.setCash(-Float.parseFloat(strTotPrice)); |
|
| 4242 |
- mjonPayVO.setFrstRegisterId(mjonMsgVO.getUserId()); |
|
| 4243 |
- mjonPayVO.setMemo("SMS 문자 총 " + totSendCnt + "건 중 " + resultCnt + "건 발송");
|
|
| 4244 |
- mjonPayVO.setMsgGroupId(mjonMsgVO.getMsgGroupId()); |
|
| 4245 |
- |
|
| 4246 |
- mjonPayService.insertCash(mjonPayVO); // 캐시차감 |
|
| 4247 |
- mjonPayService.updateMemberCash(mjonPayVO); // 회원정보 업데이트 |
|
| 4248 |
- } |
|
| 4249 |
- */ |
|
| 4250 |
- |
|
| 4251 | 4229 |
|
| 4252 | 4230 |
////////////////////////////////// |
| 4253 | 4231 |
////////////////////////////////// |
| 4254 | 4232 |
////////////////////////////////// |
| 4255 | 4233 |
|
| 4256 |
- // 강제로 IllegalArgumentException 발생시키기 |
|
| 4257 |
-// if (true) {
|
|
| 4258 |
-// throw new IllegalArgumentException("강제로 발생한 오류입니다.");
|
|
| 4259 |
-// } |
|
| 4260 | 4234 |
////////////////////////////////// |
| 4261 | 4235 |
////////////////////////////////// |
| 4262 | 4236 |
////////////////////////////////// |
| 4263 | 4237 |
|
| 4264 | 4238 |
|
| 4265 |
- // 발송 처리 |
|
| 4266 |
-// statusResponse = processMessageSending(mjonMsgVO, intiLists, statusResponse); |
|
| 4267 |
-// } else {
|
|
| 4268 |
-// // 일반 문자 발송 |
|
| 4269 |
-// statusResponse = fncSendMsg(mjonMsgVO); |
|
| 4270 |
-// } |
|
| 4271 | 4239 |
statusResponse.setStatus(HttpStatus.OK); |
| 4272 | 4240 |
statusResponse.setObject(returnMap); |
| 4273 | 4241 |
return statusResponse; |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
... | ... | @@ -1724,6 +1724,22 @@ |
| 1724 | 1724 |
//END |
| 1725 | 1725 |
</script> |
| 1726 | 1726 |
|
| 1727 |
+ |
|
| 1728 |
+ |
|
| 1729 |
+ <div class="progress_bar_wrap"> |
|
| 1730 |
+ <div class="progress_box"> |
|
| 1731 |
+ <p class="time_text">0%</p> |
|
| 1732 |
+ <div class="bar"> |
|
| 1733 |
+ <span class="change_bar"></span> |
|
| 1734 |
+ </div> |
|
| 1735 |
+ </div> |
|
| 1736 |
+ <div class="btn_wrap"> |
|
| 1737 |
+ <!-- <button type="button" class="btnType btnType2" style="margin:50px 0;" onclick="progressStart(10,'완료되었습니다.');">시작</button> |
|
| 1738 |
+ <button type="button" class="btnType btnType2" style="margin:50px 0;" onclick="progressComplete('완료되었습니다.');return false;">멈춤</button> -->
|
|
| 1739 |
+ </div> |
|
| 1740 |
+ |
|
| 1741 |
+ </div> |
|
| 1742 |
+ |
|
| 1727 | 1743 |
<div class="tooltip-wrap"> |
| 1728 | 1744 |
<!-- 문자발송 성공 레이어팝업 --> |
| 1729 | 1745 |
<div class="popup-com pop_msg_success"> |
--- src/main/webapp/publish/js/content.js
+++ src/main/webapp/publish/js/content.js
... | ... | @@ -1581,10 +1581,78 @@ |
| 1581 | 1581 |
} |
| 1582 | 1582 |
|
| 1583 | 1583 |
|
| 1584 |
+ |
|
| 1585 |
+ |
|
| 1586 |
+ |
|
| 1587 |
+ |
|
| 1584 | 1588 |
// 프로그레스바 |
| 1585 | 1589 |
var start, change; |
| 1590 |
+let progressInterval = null; // 전역 변수로 타이머 ID 관리 |
|
| 1586 | 1591 |
|
| 1587 |
-function progressStart(time, msg) {
|
|
| 1592 |
+function progressStart(time) {
|
|
| 1593 |
+ // 기존 타이머 정지 및 초기화 |
|
| 1594 |
+ if (progressInterval !== null) {
|
|
| 1595 |
+ clearInterval(progressInterval); // 이전 타이머 정지 |
|
| 1596 |
+ progressInterval = null; // 타이머 ID 초기화 |
|
| 1597 |
+ } |
|
| 1598 |
+ resetProgressBar(); // 프로그레스바 초기화 |
|
| 1599 |
+ |
|
| 1600 |
+ // 프로그레스바 보이기 |
|
| 1601 |
+ $(".progress_bar_wrap").css("display", "flex");
|
|
| 1602 |
+ |
|
| 1603 |
+ // 프로그레스바 요소 가져오기 |
|
| 1604 |
+ var timeText = document.querySelector(".time_text");
|
|
| 1605 |
+ var bar = document.querySelector(".change_bar");
|
|
| 1606 |
+ |
|
| 1607 |
+ // 초기 상태 설정 |
|
| 1608 |
+ var width = 1; |
|
| 1609 |
+ var totalTime = time * 1000; // 총 실행 시간 (밀리초) |
|
| 1610 |
+ var cmpWid = totalTime / 100; // width 증가 간격 (밀리초) |
|
| 1611 |
+ |
|
| 1612 |
+ // 새 타이머 시작 |
|
| 1613 |
+ progressInterval = setInterval(changeWidth, cmpWid); |
|
| 1614 |
+ |
|
| 1615 |
+ function changeWidth() {
|
|
| 1616 |
+ if (width >= 100) {
|
|
| 1617 |
+ // 프로그레스바 100% 도달 |
|
| 1618 |
+ clearInterval(progressInterval); // 타이머 종료 |
|
| 1619 |
+ progressInterval = null; // 타이머 ID 초기화 |
|
| 1620 |
+ |
|
| 1621 |
+ timeText.innerHTML = "100%"; |
|
| 1622 |
+ |
|
| 1623 |
+ setTimeout(function () {
|
|
| 1624 |
+ // 100% 표시 후 "잠시만 기다려주세요" 변경 |
|
| 1625 |
+ timeText.innerHTML = "잠시만 기다려주세요..."; |
|
| 1626 |
+ $(".time_text").addClass("animation");
|
|
| 1627 |
+ }, 1000); |
|
| 1628 |
+ } else {
|
|
| 1629 |
+ // 프로그레스바 진행 |
|
| 1630 |
+ width++; |
|
| 1631 |
+ bar.style.width = width + "%"; |
|
| 1632 |
+ timeText.innerHTML = width + "%"; |
|
| 1633 |
+ } |
|
| 1634 |
+ } |
|
| 1635 |
+} |
|
| 1636 |
+ |
|
| 1637 |
+// 프로그레스바 초기화 함수 |
|
| 1638 |
+function resetProgressBar() {
|
|
| 1639 |
+ $(".time_text").text("0%");
|
|
| 1640 |
+ $(".change_bar").css("width", "0%");
|
|
| 1641 |
+ $(".time_text").removeClass("animation");
|
|
| 1642 |
+ $(".progress_bar_wrap").hide();
|
|
| 1643 |
+} |
|
| 1644 |
+ |
|
| 1645 |
+ |
|
| 1646 |
+ |
|
| 1647 |
+ |
|
| 1648 |
+/* |
|
| 1649 |
+function progressStart(time) {
|
|
| 1650 |
+ |
|
| 1651 |
+ // 초기셋팅 |
|
| 1652 |
+ $(".time_text").text("0%");
|
|
| 1653 |
+ $(".change_bar").css("width", "0");
|
|
| 1654 |
+ $(".time_text").removeClass("animation");
|
|
| 1655 |
+ |
|
| 1588 | 1656 |
$(".progress_bar_wrap").css("display", "flex");
|
| 1589 | 1657 |
|
| 1590 | 1658 |
var timeText = document.querySelector(".time_text");
|
... | ... | @@ -1608,10 +1676,6 @@ |
| 1608 | 1676 |
$(".time_text").addClass("animation");
|
| 1609 | 1677 |
}, 1000) |
| 1610 | 1678 |
|
| 1611 |
- // 메시지 있을 때 alert 띄움 |
|
| 1612 |
- if (msg !== "" && msg !== undefined && msg !== null) {
|
|
| 1613 |
- alert(msg); |
|
| 1614 |
- } else {}
|
|
| 1615 | 1679 |
|
| 1616 | 1680 |
} else {
|
| 1617 | 1681 |
// width 증가 및 text 변경 |
... | ... | @@ -1620,30 +1684,74 @@ |
| 1620 | 1684 |
timeText.innerHTML = width + "%"; |
| 1621 | 1685 |
} |
| 1622 | 1686 |
} |
| 1623 |
-} |
|
| 1687 |
+}*/ |
|
| 1624 | 1688 |
|
| 1625 | 1689 |
// 프로그레스바 완료 |
| 1626 |
-function progressComplete(msg,time,backtime) {
|
|
| 1690 |
+function progressComplete() {
|
|
| 1691 |
+ // var width = parseInt($(".time_text").text().replace('%', '')) || 0; // 현재 width 가져오기
|
|
| 1692 |
+ |
|
| 1693 |
+ var widthText = $(".change_bar").attr("style");
|
|
| 1694 |
+ var width = widthText.replace(/[width:%;overfloen]/ig, ""); // width 값 퍼센트로 가져오기 |
|
| 1695 |
+ var currentText = $(".time_text").text().trim(); // 현재 텍스트 가져오기
|
|
| 1696 |
+ console.log('width : ', width, 'currentText : ', currentText);
|
|
| 1697 |
+ |
|
| 1698 |
+ // 이미 "100%" 상태이고 "잠시만 기다려주세요" 메시지가 표시된 경우 즉시 종료 |
|
| 1699 |
+ if (width >= 100 && currentText === "잠시만 기다려주세요...") {
|
|
| 1700 |
+ console.log("이미 완료 상태입니다. 즉시 종료합니다.");
|
|
| 1701 |
+ $(".progress_bar_wrap").hide();
|
|
| 1702 |
+ return; |
|
| 1703 |
+ } |
|
| 1704 |
+ |
|
| 1705 |
+ // 진행 중인 경우 |
|
| 1706 |
+ change = setInterval(() => {
|
|
| 1707 |
+ if (width >= 100) {
|
|
| 1708 |
+ console.log('width : ', width);
|
|
| 1709 |
+ $(".time_text").text("100%");
|
|
| 1710 |
+ $(".change_bar").css("width", "100%");
|
|
| 1711 |
+ |
|
| 1712 |
+ setTimeout(function () {
|
|
| 1713 |
+ clearInterval(change); // 인터벌 종료 |
|
| 1714 |
+ |
|
| 1715 |
+ setTimeout(() => {
|
|
| 1716 |
+ // $(".time_text").text("잠시만 기다려주세요...");
|
|
| 1717 |
+ // $(".time_text").addClass("animation");
|
|
| 1718 |
+ $(".progress_bar_wrap").hide();
|
|
| 1719 |
+ }, 10); // "잠시만 기다려주세요..." 1초 후 숨기기 |
|
| 1720 |
+ }, 1000); // "100%" 표시 후 1초 대기 |
|
| 1721 |
+ |
|
| 1722 |
+ } else {
|
|
| 1723 |
+ // width 증가 및 text 변경 |
|
| 1724 |
+ width++; |
|
| 1725 |
+ $(".time_text").text(width + "%");
|
|
| 1726 |
+ $(".change_bar").css("width", width + "%");
|
|
| 1727 |
+ } |
|
| 1728 |
+ }, 10); // DOM 업데이트 간격 (10ms) |
|
| 1729 |
+} |
|
| 1730 |
+ |
|
| 1731 |
+/*// 프로그레스바 완료 |
|
| 1732 |
+function progressComplete() {
|
|
| 1627 | 1733 |
|
| 1628 | 1734 |
change = setInterval(changeText); |
| 1629 | 1735 |
var width = 1; |
| 1630 | 1736 |
|
| 1631 | 1737 |
function changeText() {
|
| 1632 | 1738 |
|
| 1633 |
- var widthText = $(".change_bar").attr("style");
|
|
| 1634 |
- widthText = widthText.replace(/[width:%;overfloen]/ig, ""); // width 값 퍼센트로 가져오기 |
|
| 1739 |
+ // var widthText = $(".change_bar").attr("style");
|
|
| 1740 |
+ // widthText = widthText.replace(/[width:%;overfloen]/ig, ""); // width 값 퍼센트로 가져오기 |
|
| 1635 | 1741 |
|
| 1636 | 1742 |
if (width >= 100) {
|
| 1743 |
+ console.log('width : ', width);
|
|
| 1637 | 1744 |
$(".time_text").text("100%");
|
| 1638 | 1745 |
|
| 1639 |
- if(backtime>=time){
|
|
| 1746 |
+ // if(backtime>=time){
|
|
| 1640 | 1747 |
// 예상시간보다 먼저 처리됐을 경우 |
| 1641 | 1748 |
setTimeout(function () {
|
| 1642 | 1749 |
$(".time_text").text("잠시만 기다려주세요...");
|
| 1643 | 1750 |
$(".time_text").addClass("animation");
|
| 1644 |
- }, 10) |
|
| 1645 |
- }else{}
|
|
| 1646 |
- |
|
| 1751 |
+ }, 1000) |
|
| 1752 |
+ // }else{}
|
|
| 1753 |
+ |
|
| 1754 |
+ $(".progress_bar_wrap").hide();
|
|
| 1647 | 1755 |
|
| 1648 | 1756 |
setTimeout(function () {
|
| 1649 | 1757 |
clearInterval(change); |
... | ... | @@ -1656,15 +1764,7 @@ |
| 1656 | 1764 |
$(".change_bar").css("width", width + "%");
|
| 1657 | 1765 |
} |
| 1658 | 1766 |
} |
| 1659 |
- |
|
| 1660 | 1767 |
clearInterval(start); // 프로그레스바 시작 멈추기 |
| 1661 |
- |
|
| 1662 |
- // 메시지 있을 때 alert 띄움 |
|
| 1663 |
- if (msg !== "" && msg !== undefined && msg !== null) {
|
|
| 1664 |
- setTimeout(function () {
|
|
| 1665 |
- alert(msg); |
|
| 1666 |
- }, 0) |
|
| 1667 |
- } else {}
|
|
| 1668 | 1768 |
|
| 1669 | 1769 |
|
| 1670 |
-} |
|
| 1770 |
+}*/ |
--- src/main/webapp/publish/security_login_ajax.html
+++ src/main/webapp/publish/security_login_ajax.html
... | ... | @@ -30,10 +30,6 @@ |
| 30 | 30 |
|
| 31 | 31 |
function fn_test() {
|
| 32 | 32 |
|
| 33 |
- // 초기셋팅 |
|
| 34 |
- $(".time_text").text("0%");
|
|
| 35 |
- $(".change_bar").css("width", "0");
|
|
| 36 |
- $(".time_text").removeClass("animation");
|
|
| 37 | 33 |
|
| 38 | 34 |
var url = "/web/mjon/test/ajaxTest.do"; |
| 39 | 35 |
|
... | ... | @@ -63,7 +59,7 @@ |
| 63 | 59 |
if (data.status == 'OK') {
|
| 64 | 60 |
// 성공 시 프로그레스바 100% 로 변경 |
| 65 | 61 |
// 예상 성공시간 = time, 백단 성공시간 == params.sleep |
| 66 |
- progressComplete(data.message,time,params.sleep); |
|
| 62 |
+ progressComplete(time); |
|
| 67 | 63 |
} else if (data.status == 'BAD_REQUEST') {
|
| 68 | 64 |
// 실패시 alert 띄우고 닫기. |
| 69 | 65 |
alert(params.f_msg); |
... | ... | @@ -143,11 +139,6 @@ |
| 143 | 139 |
<span class="change_bar"></span> |
| 144 | 140 |
</div> |
| 145 | 141 |
</div> |
| 146 |
- <div class="btn_wrap"> |
|
| 147 |
- <!-- <button type="button" class="btnType btnType2" style="margin:50px 0;" onclick="progressStart(10,'완료되었습니다.');">시작</button> |
|
| 148 |
- <button type="button" class="btnType btnType2" style="margin:50px 0;" onclick="progressComplete('완료되었습니다.');return false;">멈춤</button> -->
|
|
| 149 |
- </div> |
|
| 150 |
- |
|
| 151 | 142 |
</div> |
| 152 | 143 |
|
| 153 | 144 |
<!-- skip 메뉴 --> |
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?