알림톡 목록에 발송승인, 발송취소 버튼 추가
@adc496aa65124b8d169dee5803ec371c13d95eee
--- src/main/java/itn/let/kakao/admin/kakaoAt/web/MjonKakaoATController.java
+++ src/main/java/itn/let/kakao/admin/kakaoAt/web/MjonKakaoATController.java
... | ... | @@ -259,6 +259,10 @@ |
| 259 | 259 |
System.out.println("sendKakaoATList Controller Error !!! " +e);
|
| 260 | 260 |
} |
| 261 | 261 |
|
| 262 |
+ // 로그인VO에서 사용자 정보 가져오기 |
|
| 263 |
+ String admId = loginVO == null ? "" : loginVO.getId(); |
|
| 264 |
+ model.addAttribute("admId", admId);
|
|
| 265 |
+ |
|
| 262 | 266 |
return "/uss/ion/kakaoat/SendKakaoATList"; |
| 263 | 267 |
|
| 264 | 268 |
} |
--- src/main/webapp/WEB-INF/jsp/uss/ion/kakaoat/SendKakaoATList.jsp
+++ src/main/webapp/WEB-INF/jsp/uss/ion/kakaoat/SendKakaoATList.jsp
... | ... | @@ -27,6 +27,8 @@ |
| 27 | 27 |
response.setDateHeader("Expires",0);
|
| 28 | 28 |
if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache");
|
| 29 | 29 |
%> |
| 30 |
+<jsp:useBean id="now" class="java.util.Date" /> |
|
| 31 |
+ |
|
| 30 | 32 |
<!DOCTYPE html> |
| 31 | 33 |
<html lang="ko"> |
| 32 | 34 |
<head> |
... | ... | @@ -373,6 +375,156 @@ |
| 373 | 375 |
} |
| 374 | 376 |
} |
| 375 | 377 |
} |
| 378 |
+ |
|
| 379 |
+ |
|
| 380 |
+//지연 알림톡 즉시 발송 |
|
| 381 |
+function kakaoATDelaySend(msgGroupId, userId){
|
|
| 382 |
+ var msg = ""; |
|
| 383 |
+ var url = "/uss/ion/msg/updateKakaoATDelaySendRealTimeDataAjax.do"; |
|
| 384 |
+ var json = {"msgGroupId" : msgGroupId, "userId" : userId};
|
|
| 385 |
+ |
|
| 386 |
+ if(confirm("해당 지연 알림톡을 즉시 발송 하시겠습니까?")){
|
|
| 387 |
+ $.ajax({
|
|
| 388 |
+ type: "POST" |
|
| 389 |
+ , url: url |
|
| 390 |
+ , data: json |
|
| 391 |
+ , dataType:'json' |
|
| 392 |
+ , async: false |
|
| 393 |
+ , success: function (data, status) {
|
|
| 394 |
+ var result = data.isStatus; |
|
| 395 |
+ var msg = data.msg; |
|
| 396 |
+ if (result == 'loginFail') {
|
|
| 397 |
+ alert(msg); |
|
| 398 |
+ location.reload(); |
|
| 399 |
+ }else if(result == 'dateFail'){
|
|
| 400 |
+ alert(msg); |
|
| 401 |
+ location.reload(); |
|
| 402 |
+ }else if(result == 'fail'){
|
|
| 403 |
+ alert(msg); |
|
| 404 |
+ return false; |
|
| 405 |
+ }else{
|
|
| 406 |
+ alert(msg); |
|
| 407 |
+ location.reload(); |
|
| 408 |
+ } |
|
| 409 |
+ } |
|
| 410 |
+ , beforeSend: function () {
|
|
| 411 |
+ //로딩창 show |
|
| 412 |
+ $('.loading_layer').addClass('active');
|
|
| 413 |
+ } |
|
| 414 |
+ , complete: function () {
|
|
| 415 |
+ //로딩창 hide |
|
| 416 |
+ $('.loading_layer').removeClass('active');
|
|
| 417 |
+ } |
|
| 418 |
+ , error: function (e) {
|
|
| 419 |
+ alert("에러가 발생했습니다."); console.log("ERROR : ", e);
|
|
| 420 |
+ } |
|
| 421 |
+ }); |
|
| 422 |
+ } |
|
| 423 |
+} |
|
| 424 |
+ |
|
| 425 |
+//지연 알림톡 발송취소 |
|
| 426 |
+function kakaoATDelayCancel(msgGroupId, userId){
|
|
| 427 |
+ var msg = ""; |
|
| 428 |
+ var url = "/uss/ion/msg/deleteKakaoATDelaySendCancelDataAjax.do"; |
|
| 429 |
+ var json = {"msgGroupId" : msgGroupId, "userId" : userId};
|
|
| 430 |
+ |
|
| 431 |
+ if(confirm("해당 지연 알림톡을 발송취소 하시겠습니까?")){
|
|
| 432 |
+ $.ajax({
|
|
| 433 |
+ type: "POST" |
|
| 434 |
+ , url: url |
|
| 435 |
+ , data: json |
|
| 436 |
+ , dataType:'json' |
|
| 437 |
+ , async: false |
|
| 438 |
+ , success: function (data, status) {
|
|
| 439 |
+ var result = data.isStatus; |
|
| 440 |
+ var msg = data.msg; |
|
| 441 |
+ |
|
| 442 |
+ if (result == 'loginFail') {
|
|
| 443 |
+ alert(msg); |
|
| 444 |
+ location.reload(); |
|
| 445 |
+ }else if(result == 'dateFail'){
|
|
| 446 |
+ |
|
| 447 |
+ alert(msg); |
|
| 448 |
+ location.reload(); |
|
| 449 |
+ |
|
| 450 |
+ }else if(result == 'fail'){
|
|
| 451 |
+ alert(msg); |
|
| 452 |
+ return false; |
|
| 453 |
+ }else{
|
|
| 454 |
+ alert(msg); |
|
| 455 |
+ |
|
| 456 |
+ //회원 이용정지 처리하기 |
|
| 457 |
+ fn_MsgDelayCancel_after(userId); |
|
| 458 |
+ } |
|
| 459 |
+ } |
|
| 460 |
+ , beforeSend: function () {
|
|
| 461 |
+ //로딩창 show |
|
| 462 |
+ $('.loading_layer').addClass('active');
|
|
| 463 |
+ } |
|
| 464 |
+ , complete: function () {
|
|
| 465 |
+ //로딩창 hide |
|
| 466 |
+ $('.loading_layer').removeClass('active');
|
|
| 467 |
+ } |
|
| 468 |
+ , error: function (e) {
|
|
| 469 |
+ alert("에러가 발생했습니다."); console.log("ERROR : ", e);
|
|
| 470 |
+ } |
|
| 471 |
+ }); |
|
| 472 |
+ } |
|
| 473 |
+} |
|
| 474 |
+ |
|
| 475 |
+//문자 지연 내역 발송 취소를 통한 회원 이용정지시 |
|
| 476 |
+function fn_MsgDelayCancel_after(userId){
|
|
| 477 |
+ var mberSttus = $('#mberSttus').val();
|
|
| 478 |
+ mberSttus = "B"; //이용자 정지 처리 |
|
| 479 |
+ var smiMemo = "관리자가 최근 문자 지연 내역에서 스미싱의심으로 판단하여 발송취소를 한 후 이용자 정지 처리함"; |
|
| 480 |
+ |
|
| 481 |
+ fn_SpamMberUpdt(userId, mberSttus, smiMemo, "이용자 정지를 진행하시겠습니까?"); |
|
| 482 |
+} |
|
| 483 |
+ |
|
| 484 |
+//회원 이용정지 처리 |
|
| 485 |
+function fn_SpamMberUpdt(userId, p_mberSttus, p_smiMemo, p_confirm_msg) {
|
|
| 486 |
+ url = "/uss/umt/user/EgovGnrlUpdateUserMsttusAjax.do"; |
|
| 487 |
+ var json = {"mberId" : userId, "mberSttus" : p_mberSttus, "smiMemo" : p_smiMemo};
|
|
| 488 |
+ if(confirm(p_confirm_msg)){
|
|
| 489 |
+ $.ajax({
|
|
| 490 |
+ type: "POST", |
|
| 491 |
+ url: url, |
|
| 492 |
+ data: json, |
|
| 493 |
+ dataType:'json', |
|
| 494 |
+ async: false, |
|
| 495 |
+ success: function (returnData, status) {
|
|
| 496 |
+ if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
| 497 |
+ if("fail"==returnData.result){
|
|
| 498 |
+ alert(returnData.message); |
|
| 499 |
+ return false; |
|
| 500 |
+ }else if("loginFail"==returnData.result){
|
|
| 501 |
+ alert(returnData.message); |
|
| 502 |
+ return false; |
|
| 503 |
+ }else{ //이용자 상태 변경 성공시 처리
|
|
| 504 |
+ alert(returnData.message); |
|
| 505 |
+ location.reload(); |
|
| 506 |
+ } |
|
| 507 |
+ |
|
| 508 |
+ } else if(status== 'fail'){
|
|
| 509 |
+ alert("이용자 상태 변경에 실패하였습니다.");
|
|
| 510 |
+ } |
|
| 511 |
+ }, |
|
| 512 |
+ beforeSend: function () {
|
|
| 513 |
+ //로딩창 show |
|
| 514 |
+ $('.loading_layer').addClass('active');
|
|
| 515 |
+ }, |
|
| 516 |
+ complete: function () {
|
|
| 517 |
+ //로딩창 hide |
|
| 518 |
+ $('.loading_layer').removeClass('active');
|
|
| 519 |
+ }, |
|
| 520 |
+ error: function (e) { alert("이용자 상태 변경에 실패하였습니다."); console.log("ERROR : ", e); }
|
|
| 521 |
+ }); |
|
| 522 |
+ } |
|
| 523 |
+ else {
|
|
| 524 |
+ location.reload(); |
|
| 525 |
+ } |
|
| 526 |
+} |
|
| 527 |
+ |
|
| 376 | 528 |
</script> |
| 377 | 529 |
<style> |
| 378 | 530 |
.calBtn{
|
... | ... | @@ -393,6 +545,10 @@ |
| 393 | 545 |
.pageCont .tbType1 tbody tr td.sms_detail .sms_detail_hover {overflow:hidden;text-overflow:ellipsis;display:none;word-wrap:break-word;-webkit-line-clamp:20;-webkit-box-orient:vertical;position:absolute;left:-50px;top:45px;width:calc(100% + 150px);padding:15px;line-height:20px;white-space:normal;border:1px solid #e5e5e5;background:#fff;border-radius:5px;box-sizing:border-box;box-shadow:0px 3px 10px 0px rgb(0 0 0 / 0.2);z-index:1;font-size:14px;text-align:left;}
|
| 394 | 546 |
.pageCont .tbType1 tbody tr td.sms_detail .sms_detail_hover:after {content:'';position:absolute;left:0;bottom:0;width:100%;height:10px;background:#fff;border-radius:0 0 5px 5px;}
|
| 395 | 547 |
.pageCont .tbType1 tbody tr td.sms_detail:hover .sms_detail_hover {display:-webkit-box;}
|
| 548 |
+ |
|
| 549 |
+.pageCont .tbType1 tbody tr td .fillBlue {margin-top:5px;height:25px;padding:3 3px;font-size:13px;text-align:center;color:#ffffff !important;background:#456ded;border-radius:3px;}
|
|
| 550 |
+.pageCont .tbType1 tbody tr td .fillRed {margin-top:5px;height:25px;padding:3 3px;font-size:13px;text-align:center;color:#ffffff !important;background:#e40000;border-radius:3px;}
|
|
| 551 |
+ |
|
| 396 | 552 |
</style> |
| 397 | 553 |
</head> |
| 398 | 554 |
<body> |
... | ... | @@ -493,13 +649,12 @@ |
| 493 | 649 |
<col style="width: 5%"> |
| 494 | 650 |
<col style="width: 13%"> |
| 495 | 651 |
<col style="width: 13%"> |
| 496 |
- <%-- <col style="width: 10%"> --%> |
|
| 497 | 652 |
<col style="width: 10%"> |
| 498 |
- <col style="width: 10%"> |
|
| 653 |
+ <col style="width: 13%"> |
|
| 499 | 654 |
<col style="width: 10%"> |
| 500 | 655 |
<col style="width: 5%"> |
| 501 | 656 |
<col style="width: auto"> |
| 502 |
- <col style="width: 10%"> |
|
| 657 |
+ <col style="width: 7%"> |
|
| 503 | 658 |
</colgroup> |
| 504 | 659 |
<thead> |
| 505 | 660 |
<tr> |
... | ... | @@ -575,6 +730,19 @@ |
| 575 | 730 |
<c:when test="${result.atDelayCompleteYn eq 'N'}">
|
| 576 | 731 |
<c:if test="${result.atSmishingYn eq 'Y'}">온</c:if>
|
| 577 | 732 |
<c:if test="${result.atSmishingYn eq 'N'}">오프</c:if>[미처리]
|
| 733 |
+ |
|
| 734 |
+ <c:if test="${admId eq 'jsp'}">
|
|
| 735 |
+ <c:if test="${result.reserveCYn eq 'N' && result.atDelayYn eq 'Y' && result.atDelayCompleteYn eq 'N'}">
|
|
| 736 |
+ <br /> |
|
| 737 |
+ <fmt:formatDate value="${now}" pattern="yyyyMMddhhmm" var="nowDate" />
|
|
| 738 |
+ <fmt:parseDate value="${result.reqDate}" pattern="yyyy-MM-dd HH:mm" var="checkValue" />
|
|
| 739 |
+ <fmt:formatDate value="${checkValue}" pattern="yyyyMMddhhmm" var="checkDate"/>
|
|
| 740 |
+ <c:if test="${nowDate < checkDate}">
|
|
| 741 |
+ <button type="button" class="fillBlue" onclick="kakaoATDelaySend('<c:out value="${result.msgGroupId}"/>','<c:out value="${result.userId}"/>'); return false;">발송승인</button>
|
|
| 742 |
+ <button type="button" class="fillRed" onclick="kakaoATDelayCancel('<c:out value="${result.msgGroupId}"/>','<c:out value="${result.userId}"/>'); return false;">발송취소</button>
|
|
| 743 |
+ </c:if> |
|
| 744 |
+ </c:if> |
|
| 745 |
+ </c:if> |
|
| 578 | 746 |
</c:when> |
| 579 | 747 |
<c:otherwise> |
| 580 | 748 |
<span style="color: #0000FF;"> |
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?