--- pom.xml
+++ pom.xml
... | ... | @@ -569,20 +569,15 @@ |
| 569 | 569 |
<artifactId>spring-data-redis</artifactId> |
| 570 | 570 |
<version>1.8.11.RELEASE</version> |
| 571 | 571 |
</dependency> |
| 572 |
+ |
|
| 573 |
+ <!-- 해외접속IP 차단 --> |
|
| 572 | 574 |
<dependency> |
| 573 |
- <groupId>junit</groupId> |
|
| 574 |
- <artifactId>junit</artifactId> |
|
| 575 |
- <version>4.13.2</version> |
|
| 576 |
- <scope>test</scope> |
|
| 575 |
+ <groupId>com.maxmind.geoip2</groupId> |
|
| 576 |
+ <artifactId>geoip2</artifactId> |
|
| 577 |
+ <version>2.15.0</version> |
|
| 577 | 578 |
</dependency> |
| 578 | 579 |
|
| 579 |
- <dependency> |
|
| 580 |
- <groupId>org.springframework</groupId> |
|
| 581 |
- <artifactId>spring-test</artifactId> |
|
| 582 |
- <version>${spring.maven.artifact.version}</version>
|
|
| 583 |
- <scope>test</scope> |
|
| 584 |
- </dependency> |
|
| 585 |
- <!-- valkey --> |
|
| 580 |
+ <!-- valkey --> |
|
| 586 | 581 |
</dependencies> |
| 587 | 582 |
|
| 588 | 583 |
<build> |
+++ src/main/java/itn/com/cmm/interceptor/GeoIpBlockInterceptor.java
... | ... | @@ -0,0 +1,122 @@ |
| 1 | +package itn.com.cmm.interceptor; | |
| 2 | + | |
| 3 | +import itn.let.mjo.block.service.MjonBlockService; | |
| 4 | +import org.slf4j.Logger; | |
| 5 | +import org.slf4j.LoggerFactory; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.stereotype.Component; | |
| 8 | +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
| 9 | + | |
| 10 | +import javax.servlet.http.HttpServletRequest; | |
| 11 | +import javax.servlet.http.HttpServletResponse; | |
| 12 | +import java.io.*; | |
| 13 | + | |
| 14 | +@Component | |
| 15 | +public class GeoIpBlockInterceptor extends HandlerInterceptorAdapter { | |
| 16 | + | |
| 17 | + private static final Logger LOGGER = LoggerFactory.getLogger(GeoIpBlockInterceptor.class); | |
| 18 | + | |
| 19 | + @Autowired | |
| 20 | + private MjonBlockService mjonBlockService; | |
| 21 | + | |
| 22 | + @Override | |
| 23 | + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { | |
| 24 | + | |
| 25 | + if (Boolean.TRUE.equals(request.getAttribute("GEOIP_CHECKED"))) { | |
| 26 | + Boolean isAlreadyBlocked = (Boolean) request.getAttribute("GEOIP_BLOCKED"); | |
| 27 | + if (Boolean.TRUE.equals(isAlreadyBlocked)) { | |
| 28 | + redirectToAccessBlock(request, response); | |
| 29 | + return false; | |
| 30 | + } | |
| 31 | + return true; | |
| 32 | + } | |
| 33 | + | |
| 34 | + request.setAttribute("GEOIP_CHECKED", true); | |
| 35 | + | |
| 36 | + String clientIp = getClientIp(request); | |
| 37 | + | |
| 38 | + LOGGER.warn( | |
| 39 | + "[GEOIP TEST] " + | |
| 40 | + "RemoteAddr={}, X-Forwarded-For={}, Proxy-Client-IP={}, " + | |
| 41 | + "X-Real-IP={}, ResolvedClientIp={}", | |
| 42 | + request.getRemoteAddr(), | |
| 43 | + request.getHeader("X-Forwarded-For"), | |
| 44 | + request.getHeader("Proxy-Client-IP"), | |
| 45 | + request.getHeader("X-Real-IP"), | |
| 46 | + clientIp | |
| 47 | + ); | |
| 48 | + | |
| 49 | + //clientIp = "51.159.125.179"; | |
| 50 | + if ("127.0.0.1".equals(clientIp) || "0:0:0:0:0:0:0:1".equals(clientIp) || "::1".equals(clientIp)) { | |
| 51 | + request.setAttribute("GEOIP_BLOCKED", false); | |
| 52 | + return true; | |
| 53 | + } | |
| 54 | + | |
| 55 | + // 해외 접속 검사 및 로그 적재 | |
| 56 | + boolean isBlocked = mjonBlockService.checkAndLogGeoIpBlock(clientIp, request.getRequestURI()); | |
| 57 | + request.setAttribute("GEOIP_BLOCKED", isBlocked); | |
| 58 | + | |
| 59 | + if (isBlocked) { | |
| 60 | + redirectToAccessBlock(request, response); | |
| 61 | + return false; | |
| 62 | + } | |
| 63 | + | |
| 64 | + return true; | |
| 65 | + } | |
| 66 | + | |
| 67 | + private void redirectToAccessBlock(HttpServletRequest request, HttpServletResponse response) throws Exception { | |
| 68 | + response.reset(); | |
| 69 | + response.setStatus(HttpServletResponse.SC_OK); | |
| 70 | + response.setContentType("text/html;charset=UTF-8"); | |
| 71 | + response.setCharacterEncoding("UTF-8"); | |
| 72 | + | |
| 73 | + PrintWriter writer = response.getWriter(); | |
| 74 | + | |
| 75 | + StringBuilder sb = new StringBuilder(); | |
| 76 | + sb.append("<!DOCTYPE html>"); | |
| 77 | + sb.append("<html lang='ko'>"); | |
| 78 | + sb.append("<head>"); | |
| 79 | + sb.append("<meta charset='UTF-8'>"); | |
| 80 | + sb.append("<meta name='viewport' content='width=device-width, initial-scale=1.0'>"); | |
| 81 | + sb.append("<title>국외 IP 접속 제한 안내</title>"); | |
| 82 | + sb.append("<style>"); | |
| 83 | + sb.append("html, body { margin: 0 !important; padding: 0 !important; width: 100% !important; height: 100% !important; overflow: hidden !important; }"); | |
| 84 | + sb.append(".geoip-full-mask { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; background-color: #eee !important; z-index: 99999999 !important; display: flex !important; justify-content: center !important; align-items: center !important; }"); | |
| 85 | + sb.append(".geoip-card-box { width: 620px !important; min-height: 260px !important; padding: 35px 40px 50px 40px !important; background-color: #fff !important; border: 15px solid #d8d8d8 !important; box-sizing: border-box !important; }"); | |
| 86 | + sb.append(".geoip-card-box h1 { color: #222 !important; font-size: 24px !important; text-align: center !important; border-bottom: 1px solid #a8a8a8 !important; padding: 0 0 20px 0 !important; font-weight: 600 !important; margin-top: 0 !important; word-break: keep-all !important; font-family: 'Noto Sans KR', sans-serif !important; }"); | |
| 87 | + sb.append(".geoip-card-box p { text-align: center !important; margin: 20px 0 0 0 !important; font-size: 16px !important; font-weight: 400 !important; color: #555 !important; line-height: 28px !important; word-break: keep-all !important; font-family: 'Noto Sans KR', sans-serif !important; }"); | |
| 88 | + sb.append("</style>"); | |
| 89 | + sb.append("</head>"); | |
| 90 | + sb.append("<body>"); | |
| 91 | + sb.append("<div class='geoip-full-mask'>"); | |
| 92 | + sb.append(" <div class='geoip-card-box'>"); | |
| 93 | + sb.append(" <h1>국외 IP 접속 제한 안내</h1>"); | |
| 94 | + sb.append(" <p>문자온은 보안 정책에 따라 국내에서만 서비스를 이용하실 수 있습니다.<br><br>국외 IP로 확인되어 접속이 제한되었습니다.<br>국내 네트워크 환경에서 다시 접속해 주시기 바랍니다.</p>"); | |
| 95 | + sb.append(" </div>"); | |
| 96 | + sb.append("</div>"); | |
| 97 | + sb.append("</body>"); | |
| 98 | + sb.append("</html>"); | |
| 99 | + | |
| 100 | + writer.write(sb.toString()); | |
| 101 | + writer.flush(); | |
| 102 | + | |
| 103 | + writer.flush(); | |
| 104 | + } | |
| 105 | + | |
| 106 | + private String getClientIp(HttpServletRequest request) { | |
| 107 | + String ip = request.getHeader("X-Forwarded-For"); | |
| 108 | + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { | |
| 109 | + ip = request.getHeader("Proxy-Client-IP"); | |
| 110 | + } | |
| 111 | + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { | |
| 112 | + ip = request.getHeader("X-Real-IP"); | |
| 113 | + } | |
| 114 | + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { | |
| 115 | + ip = request.getRemoteAddr(); | |
| 116 | + } | |
| 117 | + if (ip != null && ip.contains(",")) { | |
| 118 | + ip = ip.split(",")[0].trim(); | |
| 119 | + } | |
| 120 | + return ip; | |
| 121 | + } | |
| 122 | +}(No newline at end of file) |
+++ src/main/java/itn/com/cmm/interceptor/UserAccessLogInterceptor.java
... | ... | @@ -0,0 +1,83 @@ |
| 1 | +package itn.com.cmm.interceptor; | |
| 2 | + | |
| 3 | +import itn.com.cmm.util.ClientRequestUtil; | |
| 4 | +import itn.let.sym.log.access.UserAccessLogService; | |
| 5 | +import itn.let.sym.log.access.UserAccessLogVO; | |
| 6 | +import itn.let.sym.mnu.mpm.service.EgovMenuManageService; | |
| 7 | +import itn.let.utl.sim.service.EgovClntInfo; | |
| 8 | +import org.slf4j.Logger; | |
| 9 | +import org.slf4j.LoggerFactory; | |
| 10 | +import org.springframework.stereotype.Component; | |
| 11 | +import org.springframework.web.method.HandlerMethod; | |
| 12 | +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
| 13 | + | |
| 14 | +import javax.annotation.Resource; | |
| 15 | +import javax.servlet.DispatcherType; | |
| 16 | +import javax.servlet.http.HttpServletRequest; | |
| 17 | +import javax.servlet.http.HttpServletResponse; | |
| 18 | + | |
| 19 | +@Component | |
| 20 | +public class UserAccessLogInterceptor extends HandlerInterceptorAdapter { | |
| 21 | + | |
| 22 | + private static final Logger LOGGER = LoggerFactory.getLogger(UserAccessLogInterceptor.class); | |
| 23 | + | |
| 24 | + private static final String LOGGED_ATTRIBUTE = UserAccessLogInterceptor.class.getName() + ".LOGGED"; | |
| 25 | + | |
| 26 | + | |
| 27 | + @Resource(name = "userAccessLogService") | |
| 28 | + private UserAccessLogService userAccessLogService; | |
| 29 | + @Resource(name = "meunManageService") | |
| 30 | + private EgovMenuManageService menuManageService; | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public void afterCompletion( | |
| 34 | + HttpServletRequest request, | |
| 35 | + HttpServletResponse response, | |
| 36 | + Object handler, | |
| 37 | + Exception ex | |
| 38 | + ) throws Exception { | |
| 39 | + | |
| 40 | + try { | |
| 41 | + if (request.getDispatcherType() != DispatcherType.REQUEST) { | |
| 42 | + return; | |
| 43 | + } | |
| 44 | + | |
| 45 | + if (!(handler instanceof HandlerMethod)) { | |
| 46 | + return; | |
| 47 | + } | |
| 48 | + | |
| 49 | + if (Boolean.TRUE.equals(request.getAttribute(LOGGED_ATTRIBUTE))) { | |
| 50 | + return; | |
| 51 | + } | |
| 52 | + String requestUri = request.getRequestURI(); | |
| 53 | + String menuNm = menuManageService.selectAnonymousMenuNmByUrl(requestUri); | |
| 54 | + | |
| 55 | + if (menuNm == null) { | |
| 56 | + return; | |
| 57 | + } | |
| 58 | + | |
| 59 | + request.setAttribute(LOGGED_ATTRIBUTE, Boolean.TRUE); | |
| 60 | + | |
| 61 | + int statusCode = response.getStatus(); | |
| 62 | + | |
| 63 | + boolean success = ex == null && statusCode < HttpServletResponse.SC_BAD_REQUEST; | |
| 64 | + | |
| 65 | + UserAccessLogVO userAccessLogVO = new UserAccessLogVO(); | |
| 66 | + userAccessLogVO.setUserId(ClientRequestUtil.getUserId(request)); | |
| 67 | + userAccessLogVO.setAccessIp(EgovClntInfo.getClntIP(request)); | |
| 68 | + userAccessLogVO.setUri(requestUri); | |
| 69 | + userAccessLogVO.setMenuNm(menuNm); | |
| 70 | + userAccessLogVO.setResult(success ? "SUCCESS" : "FAIL"); | |
| 71 | + | |
| 72 | + userAccessLogService.insertUserAccessLog(userAccessLogVO); | |
| 73 | + } catch (Exception logException) { | |
| 74 | + LOGGER.error( | |
| 75 | + "사용자 접근 로그 저장 중 오류가 발생했습니다. URI: {}", | |
| 76 | + request.getRequestURI(), | |
| 77 | + logException | |
| 78 | + ); | |
| 79 | + } finally { | |
| 80 | + super.afterCompletion(request, response, handler, ex); | |
| 81 | + } | |
| 82 | + } | |
| 83 | +}(No newline at end of file) |
+++ src/main/java/itn/com/cmm/util/ClientRequestUtil.java
... | ... | @@ -0,0 +1,35 @@ |
| 1 | +package itn.com.cmm.util; | |
| 2 | + | |
| 3 | +import itn.com.cmm.LoginVO; | |
| 4 | + | |
| 5 | +import javax.servlet.http.HttpServletRequest; | |
| 6 | +import javax.servlet.http.HttpSession; | |
| 7 | + | |
| 8 | +public class ClientRequestUtil { | |
| 9 | + private static final String ANONYMOUS = "ANONYMOUS"; | |
| 10 | + private static final String LOGIN_VO_ATTRIBUTE = "LoginVO"; | |
| 11 | + | |
| 12 | + public static String getUserId(HttpServletRequest request) { | |
| 13 | + if (request == null) { | |
| 14 | + return ANONYMOUS; | |
| 15 | + } | |
| 16 | + | |
| 17 | + HttpSession session = request.getSession(false); | |
| 18 | + | |
| 19 | + if (session == null) { | |
| 20 | + return ANONYMOUS; | |
| 21 | + } | |
| 22 | + | |
| 23 | + Object loginAttribute = session.getAttribute(LOGIN_VO_ATTRIBUTE); | |
| 24 | + | |
| 25 | + if (!(loginAttribute instanceof LoginVO)) { | |
| 26 | + return ANONYMOUS; | |
| 27 | + } | |
| 28 | + | |
| 29 | + LoginVO loginVO = (LoginVO) loginAttribute; | |
| 30 | + | |
| 31 | + return loginVO.getId() == null || loginVO.getId().trim().isEmpty() | |
| 32 | + ? ANONYMOUS | |
| 33 | + : loginVO.getId(); | |
| 34 | + } | |
| 35 | +} |
--- src/main/java/itn/com/cmm/util/MsgSendUtils.java
+++ src/main/java/itn/com/cmm/util/MsgSendUtils.java
... | ... | @@ -55,7 +55,12 @@ |
| 55 | 55 |
public static final String LONG_MSG_TYPE = "6"; |
| 56 | 56 |
// 이벤트 최저 잔액 |
| 57 | 57 |
public static final double MIN_EVENT_REMAIN_CASH = 7.5; // 이벤트 최소 잔액 |
| 58 |
- |
|
| 58 |
+ // 문자 내용 중 외부 URL 탐지용 정규식 |
|
| 59 |
+ private static final Pattern URL_PATTERN = Pattern.compile( |
|
| 60 |
+ "\\b((https?://|www\\.)[\\w가-힣\\-]+(\\.[\\w가-힣\\-]+)+(/[^\\s]*)?" |
|
| 61 |
+ + "|[\\w가-힣\\-]+(\\.[\\w가-힣\\-]+)*\\.[a-z]{2,24}\\b(/[^\\s]*)?)"
|
|
| 62 |
+ , Pattern.CASE_INSENSITIVE); |
|
| 63 |
+ |
|
| 59 | 64 |
|
| 60 | 65 |
/** |
| 61 | 66 |
* @methodName : getMsgType |
... | ... | @@ -424,7 +429,7 @@ |
| 424 | 429 |
|
| 425 | 430 |
private static void checkSpamAndSetStatus(MjonMsgVO mjonMsgVO, String personalizedSmsTxt, List<String> resultSpamTxt, boolean isHolidayNotified) throws Exception {
|
| 426 | 431 |
|
| 427 |
- |
|
| 432 |
+ // SpamStatus: 스팸문자유무, DelayYn: 지연발송 여부 |
|
| 428 | 433 |
mjonMsgVO.setSpamStatus("N");
|
| 429 | 434 |
mjonMsgVO.setDelayYn("N");
|
| 430 | 435 |
|
... | ... | @@ -441,7 +446,14 @@ |
| 441 | 446 |
spmFilterTxt += spmTxt + ","; |
| 442 | 447 |
} |
| 443 | 448 |
} |
| 444 |
- |
|
| 449 |
+ |
|
| 450 |
+ // 문자 내용 중 URL 탐지 (원본 텍스트: personalizedSmsTxt) |
|
| 451 |
+ Matcher urlMatcher = URL_PATTERN.matcher(personalizedSmsTxt); |
|
| 452 |
+ if (urlMatcher.find()) {
|
|
| 453 |
+ spmCnt++; |
|
| 454 |
+ spmFilterTxt += urlMatcher.group() + ","; |
|
| 455 |
+ } |
|
| 456 |
+ |
|
| 445 | 457 |
if (spmCnt > 0) { // 스팸 문자가 포함된 경우
|
| 446 | 458 |
|
| 447 | 459 |
if (StringUtil.getWordRight(spmFilterTxt.trim(), 1).equals(",")) {
|
... | ... | @@ -455,6 +467,7 @@ |
| 455 | 467 |
* - 해당 시간이면 지연 미처리 |
| 456 | 468 |
* */ |
| 457 | 469 |
mjonMsgVO.setSpamStatus("Y");
|
| 470 |
+ mjonMsgVO.setSpamKeyword(spmFilterTxt.trim()); |
|
| 458 | 471 |
if(isHolidayNotified) {
|
| 459 | 472 |
mjonMsgVO.setDelayYn("Y");
|
| 460 | 473 |
} |
--- src/main/java/itn/com/uss/olh/hpc/service/HackIpService.java
+++ src/main/java/itn/com/uss/olh/hpc/service/HackIpService.java
... | ... | @@ -38,4 +38,6 @@ |
| 38 | 38 |
|
| 39 | 39 |
// 차단아이피가 아닌 고트래픽 유저 검색 후 차단처리 |
| 40 | 40 |
public void selectHighTrafficNotIgnoreIp() throws Exception; |
| 41 |
+ |
|
| 42 |
+ boolean isBlockedIp(String userIp) throws Exception; |
|
| 41 | 43 |
} |
--- src/main/java/itn/com/uss/olh/hpc/service/impl/HackIpDAO.java
+++ src/main/java/itn/com/uss/olh/hpc/service/impl/HackIpDAO.java
... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 | 34 |
public void updateHackIp(HackIpVO hackIpVO) throws Exception{
|
| 35 |
+ |
|
| 35 | 36 |
update("hackIpDAO.updateHackIp", hackIpVO);
|
| 36 | 37 |
} |
| 37 | 38 |
|
--- src/main/java/itn/com/uss/olh/hpc/service/impl/HackIpServiceImpl.java
+++ src/main/java/itn/com/uss/olh/hpc/service/impl/HackIpServiceImpl.java
... | ... | @@ -135,9 +135,16 @@ |
| 135 | 135 |
System.out.println("@@@@@@@@@@@@@@@ ----------- "+msg);
|
| 136 | 136 |
// mjonCommon.sendSimpleSlackMsg(msg); |
| 137 | 137 |
} |
| 138 |
-// |
|
| 139 |
- |
|
| 140 |
- |
|
| 138 |
+// |
|
| 141 | 139 |
} |
| 142 |
- |
|
| 140 |
+ |
|
| 141 |
+ @Override |
|
| 142 |
+ public boolean isBlockedIp(String userIp) throws Exception {
|
|
| 143 |
+ HackIpVO hackIpVO = new HackIpVO(); |
|
| 144 |
+ hackIpVO.setAccessIp(userIp); |
|
| 145 |
+ hackIpVO.setBlockYn("Y");
|
|
| 146 |
+ |
|
| 147 |
+ return selectHackIpVO(hackIpVO) != null; |
|
| 148 |
+ } |
|
| 149 |
+ |
|
| 143 | 150 |
} |
--- src/main/java/itn/com/utl/page/PaginationUtil.java
+++ src/main/java/itn/com/utl/page/PaginationUtil.java
... | ... | @@ -4,6 +4,17 @@ |
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
public class PaginationUtil {
|
| 7 |
+ /** |
|
| 8 |
+ * 작성자 : 조민수 |
|
| 9 |
+ * 작성일자 : 2026/07/24 |
|
| 10 |
+ * 공통 페이징 정보를 초기화한다. |
|
| 11 |
+ * |
|
| 12 |
+ * <p>사용 방법 및 적용 예시는 사내 Wiki의 |
|
| 13 |
+ * 'https://wiki.iten.co.kr/40.프로젝트:2026_base_프로젝트:0.참고자료:공용함수정보:pagination-util' 문서를 참고한다.</p> |
|
| 14 |
+ * |
|
| 15 |
+ * @param <T vo> BasePaginationVO를 상속한 VO |
|
| 16 |
+ * @return 초기화된 PaginationInfo |
|
| 17 |
+ */ |
|
| 7 | 18 |
public static <T extends PageableVO> PaginationInfo init(T vo) {
|
| 8 | 19 |
PaginationInfo paginationInfo = new PaginationInfo(); |
| 9 | 20 |
paginationInfo.setCurrentPageNo(vo.getPageIndex()); |
... | ... | @@ -25,5 +36,6 @@ |
| 25 | 36 |
} |
| 26 | 37 |
return init(vo); |
| 27 | 38 |
} |
| 28 |
-} |
|
| 29 | 39 |
|
| 40 |
+ |
|
| 41 |
+} |
+++ src/main/java/itn/com/utl/response/ApiResponse.java
... | ... | @@ -0,0 +1,52 @@ |
| 1 | +package itn.com.utl.response; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | +import lombok.Setter; | |
| 5 | + | |
| 6 | +@Setter | |
| 7 | +@Getter | |
| 8 | +public class ApiResponse<T> { | |
| 9 | + private boolean success; | |
| 10 | + private String message; | |
| 11 | + private T data; | |
| 12 | + | |
| 13 | + public static <T> ApiResponse<T> success() {return new ApiResponse<>(true, null, null);} | |
| 14 | + | |
| 15 | + public static <T> ApiResponse<T> success(T data) { | |
| 16 | + return new ApiResponse<>(true, null, data); | |
| 17 | + } | |
| 18 | + | |
| 19 | + public static <T> ApiResponse<T> success(T data, String message) { | |
| 20 | + return new ApiResponse<>(true, message, data); | |
| 21 | + } | |
| 22 | + | |
| 23 | + public static <T> ApiResponse<T> fail(String message) { | |
| 24 | + return new ApiResponse<>(false, message, null); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public ApiResponse() {} | |
| 28 | + | |
| 29 | + public ApiResponse(boolean success, String message, T data) { | |
| 30 | + this.success = success; | |
| 31 | + this.message = message; | |
| 32 | + this.data = data; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public static <T> ApiResponse<T> successWithMessage(String message){ | |
| 36 | + ApiResponse<T> res = new ApiResponse<>(); | |
| 37 | + res.success = true; | |
| 38 | + res.message = message; | |
| 39 | + res.data = null; | |
| 40 | + return res; | |
| 41 | + } | |
| 42 | + | |
| 43 | + @Override | |
| 44 | + public String toString() { | |
| 45 | + return "ApiResponse{" + | |
| 46 | + "success=" + success + | |
| 47 | + ", message='" + message + '\'' + | |
| 48 | + ", data=" + data + | |
| 49 | + '}'; | |
| 50 | + } | |
| 51 | +} | |
| 52 | + |
+++ src/main/java/itn/com/utl/response/PageResponse.java
... | ... | @@ -0,0 +1,59 @@ |
| 1 | +package itn.com.utl.response; | |
| 2 | + | |
| 3 | +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; | |
| 4 | +import lombok.Getter; | |
| 5 | +import lombok.NoArgsConstructor; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +import java.util.List; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +@Getter | |
| 12 | +@Setter | |
| 13 | +@NoArgsConstructor | |
| 14 | +public class PageResponse<T> { | |
| 15 | + private List<T> list; | |
| 16 | + private int totalItems; | |
| 17 | + private int totalPages; | |
| 18 | + private int currentPage; | |
| 19 | + private int size; | |
| 20 | + private Map<String, Object> extraData; | |
| 21 | + | |
| 22 | + public PageResponse(List<T> list, Map<String, Object> extraData, int currentPage, int totalItems, int totalPages, int size) { | |
| 23 | + this.list = list; | |
| 24 | + this.extraData = extraData; | |
| 25 | + this.currentPage = currentPage; | |
| 26 | + this.totalItems = totalItems; | |
| 27 | + this.totalPages = totalPages; | |
| 28 | + this.size = size; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public static <T> PageResponse<T> withList(List<T> list, PaginationInfo pageInfo) { | |
| 32 | + PageResponse<T> res = new PageResponse<>(); | |
| 33 | + res.setList(list); | |
| 34 | + res.setPageInfo(pageInfo); | |
| 35 | + return res; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public static <T> PageResponse<T> withExtra(Map<String, Object> extraData, PaginationInfo pageInfo) { | |
| 39 | + PageResponse<T> res = new PageResponse<>(); | |
| 40 | + res.setExtraData(extraData); | |
| 41 | + res.setPageInfo(pageInfo); | |
| 42 | + return res; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public static <T> PageResponse<T> withAll(List<T> list, Map<String, Object> extraData, PaginationInfo pageInfo) { | |
| 46 | + PageResponse<T> res = new PageResponse<>(); | |
| 47 | + res.setList(list); | |
| 48 | + res.setExtraData(extraData); | |
| 49 | + res.setPageInfo(pageInfo); | |
| 50 | + return res; | |
| 51 | + } | |
| 52 | + | |
| 53 | + private void setPageInfo(PaginationInfo pageInfo) { | |
| 54 | + this.currentPage = pageInfo.getCurrentPageNo(); | |
| 55 | + this.totalItems = pageInfo.getTotalRecordCount(); | |
| 56 | + this.totalPages = pageInfo.getTotalPageCount(); | |
| 57 | + this.size = pageInfo.getRecordCountPerPage(); | |
| 58 | + } | |
| 59 | +} |
--- src/main/java/itn/let/cert/ip/service/MberCertLoginLogVO.java
+++ src/main/java/itn/let/cert/ip/service/MberCertLoginLogVO.java
... | ... | @@ -1,5 +1,6 @@ |
| 1 | 1 |
package itn.let.cert.ip.service; |
| 2 | 2 |
|
| 3 |
+import itn.com.utl.page.PageableVO; |
|
| 3 | 4 |
import itn.let.uss.umt.service.UserDefaultVO; |
| 4 | 5 |
/** |
| 5 | 6 |
* |
... | ... | @@ -15,7 +16,7 @@ |
| 15 | 16 |
* |
| 16 | 17 |
* |
| 17 | 18 |
*/ |
| 18 |
-public class MberCertLoginLogVO extends UserDefaultVO{
|
|
| 19 |
+public class MberCertLoginLogVO extends UserDefaultVO {
|
|
| 19 | 20 |
|
| 20 | 21 |
|
| 21 | 22 |
/** |
--- src/main/java/itn/let/cert/phone/service/CertPhoneService.java
+++ src/main/java/itn/let/cert/phone/service/CertPhoneService.java
... | ... | @@ -25,12 +25,19 @@ |
| 25 | 25 |
|
| 26 | 26 |
public StatusResponse selectMberCertPhoneList(MberCertPhoneVO mberCertPhoneVO); |
| 27 | 27 |
|
| 28 |
- public StatusResponse insertCertPhone(MberCertPhoneVO mberCertPhoneVO, String moblphonNo); |
|
| 28 |
+ public StatusResponse insertCertPhone(MberCertPhoneVO mberCertPhoneVO, String moblphonNo, |
|
| 29 |
+ String dept, String accessIp) throws Exception; |
|
| 29 | 30 |
|
| 30 |
- public StatusResponse deleteCertPhone(MberCertPhoneVO mberCertPhoneVO); |
|
| 31 |
+ public StatusResponse deleteCertPhone(MberCertPhoneVO mberCertPhoneVO, String accessIp) throws Exception; |
|
| 31 | 32 |
|
| 32 | 33 |
public List<MberCertPhoneVO> selectMberCertPhoneList(String userId); |
| 33 |
- |
|
| 34 |
+ |
|
| 35 |
+ public List<MberCertPhoneVO> selectEligibleCertPhoneList(String userId); |
|
| 36 |
+ |
|
| 37 |
+ public boolean isRegisteredAuthPhone(String userId, String phoneNo); |
|
| 38 |
+ |
|
| 39 |
+ public boolean isEligibleCertPhone(String userId, String phoneNo); |
|
| 40 |
+ |
|
| 34 | 41 |
public StatusResponse selectMberCertPhoneListWhereUserId(String userId); |
| 35 | 42 |
|
| 36 | 43 |
public StatusResponse updateMberCertPhone(MberCertPhoneVO mberCertPhoneVO); |
... | ... | @@ -41,6 +48,8 @@ |
| 41 | 48 |
|
| 42 | 49 |
public StatusResponse insertCertLog(HttpServletRequest request) throws Exception; |
| 43 | 50 |
|
| 51 |
+ public void resetMemberPhone(String mberId, String phoneNo, String accessIp) throws Exception; |
|
| 52 |
+ |
|
| 44 | 53 |
|
| 45 | 54 |
|
| 46 | 55 |
} |
--- src/main/java/itn/let/cert/phone/service/MberCertPhoneVO.java
+++ src/main/java/itn/let/cert/phone/service/MberCertPhoneVO.java
... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 |
private String certAlias; |
| 32 | 32 |
private String certMemo; |
| 33 | 33 |
private String certUseYn; |
| 34 |
+ private String phoneType; |
|
| 34 | 35 |
|
| 35 | 36 |
private String checkNo; |
| 36 | 37 |
|
... | ... | @@ -77,6 +78,12 @@ |
| 77 | 78 |
public void setCertUseYn(String certUseYn) {
|
| 78 | 79 |
this.certUseYn = certUseYn; |
| 79 | 80 |
} |
| 81 |
+ public String getPhoneType() {
|
|
| 82 |
+ return phoneType; |
|
| 83 |
+ } |
|
| 84 |
+ public void setPhoneType(String phoneType) {
|
|
| 85 |
+ this.phoneType = phoneType; |
|
| 86 |
+ } |
|
| 80 | 87 |
public String getCheckNo() {
|
| 81 | 88 |
return checkNo; |
| 82 | 89 |
} |
--- src/main/java/itn/let/cert/phone/service/impl/CertPhoneDAO.java
+++ src/main/java/itn/let/cert/phone/service/impl/CertPhoneDAO.java
... | ... | @@ -15,20 +15,37 @@ |
| 15 | 15 |
return (List<MberCertPhoneVO>) list("mberCertPhoneVO.selectMberCertPhoneList", userId);
|
| 16 | 16 |
} |
| 17 | 17 |
|
| 18 |
+ @SuppressWarnings("unchecked")
|
|
| 19 |
+ public List<MberCertPhoneVO> selectEligibleCertPhoneList(String userId) {
|
|
| 20 |
+ return (List<MberCertPhoneVO>) list("mberCertPhoneVO.selectEligibleCertPhoneList", userId);
|
|
| 21 |
+ } |
|
| 22 |
+ |
|
| 23 |
+ public int countRegisteredAuthPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 24 |
+ return (Integer) select("mberCertPhoneVO.countRegisteredAuthPhone", mberCertPhoneVO);
|
|
| 25 |
+ } |
|
| 26 |
+ |
|
| 27 |
+ public int countEligibleCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 28 |
+ return (Integer) select("mberCertPhoneVO.countEligibleCertPhone", mberCertPhoneVO);
|
|
| 29 |
+ } |
|
| 30 |
+ |
|
| 31 |
+ public int countAdditionalCertPhone(String userId) {
|
|
| 32 |
+ return (Integer) select("mberCertPhoneVO.countAdditionalCertPhone", userId);
|
|
| 33 |
+ } |
|
| 34 |
+ |
|
| 18 | 35 |
public void insertCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
| 19 | 36 |
insert("mberCertPhoneVO.insertCertPhone", mberCertPhoneVO);
|
| 20 | 37 |
} |
| 21 | 38 |
|
| 22 |
- public void deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 23 |
- insert("mberCertPhoneVO.deleteCertPhone", mberCertPhoneVO);
|
|
| 39 |
+ public int deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 40 |
+ return update("mberCertPhoneVO.deleteCertPhone", mberCertPhoneVO);
|
|
| 24 | 41 |
} |
| 25 | 42 |
|
| 26 | 43 |
public MberCertPhoneVO findByCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO) {
|
| 27 | 44 |
return (MberCertPhoneVO) select("mberCertPhoneVO.findByCertPhoneInfo", mberCertPhoneVO);
|
| 28 | 45 |
} |
| 29 | 46 |
|
| 30 |
- public void updateMberCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 31 |
- insert("mberCertPhoneVO.updateMberCertPhone", mberCertPhoneVO);
|
|
| 47 |
+ public int updateMberCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 48 |
+ return update("mberCertPhoneVO.updateMberCertPhone", mberCertPhoneVO);
|
|
| 32 | 49 |
|
| 33 | 50 |
} |
| 34 | 51 |
|
... | ... | @@ -47,4 +64,8 @@ |
| 47 | 64 |
public void insertCertLog(AuthCertVO authCertVO) throws Exception {
|
| 48 | 65 |
insert("certPhoneDAO.insertCertLog", authCertVO);
|
| 49 | 66 |
} |
| 67 |
+ |
|
| 68 |
+ public void resetMemberPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 69 |
+ update("certPhoneDAO.resetMemberPhone", mberCertPhoneVO);
|
|
| 70 |
+ } |
|
| 50 | 71 |
} |
--- src/main/java/itn/let/cert/phone/service/impl/CertPhoneServiceImpl.java
+++ src/main/java/itn/let/cert/phone/service/impl/CertPhoneServiceImpl.java
... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 |
|
| 11 | 11 |
import org.springframework.http.HttpStatus; |
| 12 | 12 |
import org.springframework.stereotype.Service; |
| 13 |
+import org.springframework.transaction.annotation.Transactional; |
|
| 13 | 14 |
|
| 14 | 15 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
| 15 | 16 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
... | ... | @@ -20,6 +21,9 @@ |
| 20 | 21 |
import itn.let.cert.phone.service.MberCertPhoneVO; |
| 21 | 22 |
import itn.let.mail.service.StatusResponse; |
| 22 | 23 |
import itn.let.uat.uia.service.AuthCertVO; |
| 24 |
+import itn.let.uat.uia.service.SecondAuthMethodLogConstants; |
|
| 25 |
+import itn.let.uat.uia.service.SecondAuthMethodLogService; |
|
| 26 |
+import itn.let.uat.uia.service.SecondAuthMethodLogVO; |
|
| 23 | 27 |
|
| 24 | 28 |
@Service("CertPhoneService")
|
| 25 | 29 |
public class CertPhoneServiceImpl extends EgovAbstractServiceImpl implements CertPhoneService {
|
... | ... | @@ -27,6 +31,8 @@ |
| 27 | 31 |
@Resource(name = "CertPhoneDAO") |
| 28 | 32 |
private CertPhoneDAO certPhoneDAO; |
| 29 | 33 |
|
| 34 |
+ @Resource(name = "secondAuthMethodLogService") |
|
| 35 |
+ private SecondAuthMethodLogService secondAuthMethodLogService; |
|
| 30 | 36 |
|
| 31 | 37 |
@Override |
| 32 | 38 |
public StatusResponse selectMberCertPhoneList(MberCertPhoneVO mberCertPhoneVO) {
|
... | ... | @@ -36,30 +42,41 @@ |
| 36 | 42 |
|
| 37 | 43 |
|
| 38 | 44 |
@Override |
| 39 |
- public StatusResponse insertCertPhone(MberCertPhoneVO mberCertPhoneVO, String moblphonNo) {
|
|
| 40 |
- System.out.println("findByCertPhoneInfo : :::: ");
|
|
| 41 |
- try {
|
|
| 42 |
- |
|
| 43 |
- MberCertPhoneVO mberCertPhoneListVO = certPhoneDAO.findByCertPhoneInfo(mberCertPhoneVO); |
|
| 44 |
- if(mberCertPhoneListVO != null) {
|
|
| 45 |
- if(mberCertPhoneListVO.getMbtlnum().equals(moblphonNo)) {
|
|
| 46 |
- return new StatusResponse(HttpStatus.CONFLICT, "중복 번호입니다.", LocalDateTime.now()); |
|
| 47 |
- } |
|
| 48 |
- } |
|
| 49 |
- |
|
| 50 |
- certPhoneDAO.insertCertPhone(mberCertPhoneVO); |
|
| 51 |
- |
|
| 52 |
- } catch (Exception e) {
|
|
| 53 |
- e.printStackTrace(); // TODO: handle exception |
|
| 54 |
- return new StatusResponse(HttpStatus.OK, "오류가 발생하였습니다.", LocalDateTime.now()); |
|
| 45 |
+ @Transactional(rollbackFor = Exception.class) |
|
| 46 |
+ public StatusResponse insertCertPhone(MberCertPhoneVO mberCertPhoneVO, String moblphonNo, String dept, String accessIp) throws Exception {
|
|
| 47 |
+ int maxCount = "c".equalsIgnoreCase(dept) ? 4 : 3; |
|
| 48 |
+ if (certPhoneDAO.countAdditionalCertPhone(mberCertPhoneVO.getMberId()) >= maxCount - 1) {
|
|
| 49 |
+ return new StatusResponse(HttpStatus.CONFLICT, |
|
| 50 |
+ "인증 휴대폰번호는 최대 " + maxCount + "개까지 등록할 수 있습니다.", LocalDateTime.now()); |
|
| 55 | 51 |
} |
| 52 |
+ if (!isEligibleCertPhone(mberCertPhoneVO.getMberId(), mberCertPhoneVO.getMbtlnum())) {
|
|
| 53 |
+ return new StatusResponse(HttpStatus.BAD_REQUEST, |
|
| 54 |
+ "승인 완료된 발신번호가 아닙니다.", LocalDateTime.now()); |
|
| 55 |
+ } |
|
| 56 |
+ MberCertPhoneVO mberCertPhoneListVO = certPhoneDAO.findByCertPhoneInfo(mberCertPhoneVO); |
|
| 57 |
+ if(mberCertPhoneListVO != null) {
|
|
| 58 |
+ return new StatusResponse(HttpStatus.CONFLICT, "중복 번호입니다.", LocalDateTime.now()); |
|
| 59 |
+ } |
|
| 60 |
+ if (mberCertPhoneVO.getMbtlnum() != null && mberCertPhoneVO.getMbtlnum().equals(moblphonNo)) {
|
|
| 61 |
+ return new StatusResponse(HttpStatus.CONFLICT, "가입 휴대폰번호와 동일한 번호입니다.", LocalDateTime.now()); |
|
| 62 |
+ } |
|
| 63 |
+ |
|
| 64 |
+ certPhoneDAO.insertCertPhone(mberCertPhoneVO); |
|
| 65 |
+ insertMethodChangeLog(mberCertPhoneVO.getMberId(), mberCertPhoneVO.getMbtlnum(), |
|
| 66 |
+ SecondAuthMethodLogConstants.ACTION_REGISTER, SecondAuthMethodLogConstants.VERIFY_SMS, accessIp); |
|
| 56 | 67 |
return new StatusResponse(HttpStatus.OK, "등록 하였습니다.", LocalDateTime.now()); |
| 57 | 68 |
} |
| 58 | 69 |
|
| 59 | 70 |
|
| 60 | 71 |
@Override |
| 61 |
- public StatusResponse deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
|
| 62 |
- certPhoneDAO.deleteCertPhone(mberCertPhoneVO); |
|
| 72 |
+ @Transactional(rollbackFor = Exception.class) |
|
| 73 |
+ public StatusResponse deleteCertPhone(MberCertPhoneVO mberCertPhoneVO, String accessIp) throws Exception {
|
|
| 74 |
+ int updatedCount = certPhoneDAO.deleteCertPhone(mberCertPhoneVO); |
|
| 75 |
+ if (updatedCount < 1) {
|
|
| 76 |
+ return new StatusResponse(HttpStatus.NOT_FOUND, "삭제할 휴대폰번호를 찾을 수 없습니다.", LocalDateTime.now()); |
|
| 77 |
+ } |
|
| 78 |
+ insertMethodChangeLog(mberCertPhoneVO.getMberId(), mberCertPhoneVO.getMbtlnum(), |
|
| 79 |
+ SecondAuthMethodLogConstants.ACTION_DELETE, SecondAuthMethodLogConstants.VERIFY_SMS, accessIp); |
|
| 63 | 80 |
return new StatusResponse(HttpStatus.OK, "삭제 하였습니다.", LocalDateTime.now()); |
| 64 | 81 |
} |
| 65 | 82 |
|
... | ... | @@ -77,6 +94,26 @@ |
| 77 | 94 |
|
| 78 | 95 |
} |
| 79 | 96 |
|
| 97 |
+ @Override |
|
| 98 |
+ public List<MberCertPhoneVO> selectEligibleCertPhoneList(String userId) {
|
|
| 99 |
+ return certPhoneDAO.selectEligibleCertPhoneList(userId); |
|
| 100 |
+ } |
|
| 101 |
+ |
|
| 102 |
+ @Override |
|
| 103 |
+ public boolean isRegisteredAuthPhone(String userId, String phoneNo) {
|
|
| 104 |
+ MberCertPhoneVO vo = new MberCertPhoneVO(); |
|
| 105 |
+ vo.setMberId(userId); |
|
| 106 |
+ vo.setMbtlnum(phoneNo); |
|
| 107 |
+ return certPhoneDAO.countRegisteredAuthPhone(vo) > 0; |
|
| 108 |
+ } |
|
| 109 |
+ |
|
| 110 |
+ @Override |
|
| 111 |
+ public boolean isEligibleCertPhone(String userId, String phoneNo) {
|
|
| 112 |
+ MberCertPhoneVO vo = new MberCertPhoneVO(); |
|
| 113 |
+ vo.setMberId(userId); |
|
| 114 |
+ vo.setMbtlnum(phoneNo); |
|
| 115 |
+ return certPhoneDAO.countEligibleCertPhone(vo) > 0; |
|
| 116 |
+ } |
|
| 80 | 117 |
|
| 81 | 118 |
@Override |
| 82 | 119 |
public StatusResponse selectMberCertPhoneListWhereUserId(String userId) {
|
... | ... | @@ -88,7 +125,10 @@ |
| 88 | 125 |
|
| 89 | 126 |
@Override |
| 90 | 127 |
public StatusResponse updateMberCertPhone(MberCertPhoneVO mberCertPhoneVO) {
|
| 91 |
- certPhoneDAO.updateMberCertPhone(mberCertPhoneVO); |
|
| 128 |
+ int updatedCount = certPhoneDAO.updateMberCertPhone(mberCertPhoneVO); |
|
| 129 |
+ if (updatedCount < 1) {
|
|
| 130 |
+ return new StatusResponse(HttpStatus.NOT_FOUND, "수정할 휴대폰번호를 찾을 수 없습니다.", LocalDateTime.now()); |
|
| 131 |
+ } |
|
| 92 | 132 |
return new StatusResponse(HttpStatus.OK, "수정 하였습니다.", LocalDateTime.now()); |
| 93 | 133 |
} |
| 94 | 134 |
|
... | ... | @@ -135,6 +175,28 @@ |
| 135 | 175 |
|
| 136 | 176 |
return new StatusResponse(HttpStatus.OK, "", LocalDateTime.now()); |
| 137 | 177 |
} |
| 178 |
+ |
|
| 179 |
+ @Override |
|
| 180 |
+ @Transactional(rollbackFor = Exception.class) |
|
| 181 |
+ public void resetMemberPhone(String mberId, String phoneNo, String accessIp) throws Exception {
|
|
| 182 |
+ MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
|
| 183 |
+ mberCertPhoneVO.setMberId(mberId); |
|
| 184 |
+ mberCertPhoneVO.setMbtlnum(phoneNo); |
|
| 185 |
+ certPhoneDAO.resetMemberPhone(mberCertPhoneVO); |
|
| 186 |
+ insertMethodChangeLog(mberId, phoneNo, SecondAuthMethodLogConstants.ACTION_UPDATE, |
|
| 187 |
+ SecondAuthMethodLogConstants.VERIFY_KMC, accessIp); |
|
| 188 |
+ } |
|
| 189 |
+ |
|
| 190 |
+ private void insertMethodChangeLog(String mberId, String phoneNo, String actionType, |
|
| 191 |
+ String verifyType, String accessIp) throws Exception {
|
|
| 192 |
+ SecondAuthMethodLogVO logVO = new SecondAuthMethodLogVO(); |
|
| 193 |
+ logVO.setMberId(mberId); |
|
| 194 |
+ logVO.setPhoneNo(phoneNo); |
|
| 195 |
+ logVO.setActionType(actionType); |
|
| 196 |
+ logVO.setVerifyType(verifyType); |
|
| 197 |
+ logVO.setAccessIp(accessIp); |
|
| 198 |
+ secondAuthMethodLogService.insertSecondAuthMethodLog(logVO); |
|
| 199 |
+ } |
|
| 138 | 200 |
|
| 139 | 201 |
|
| 140 | 202 |
|
+++ src/main/java/itn/let/cert/phone/support/CertPhoneAuthConstants.java
... | ... | @@ -0,0 +1,21 @@ |
| 1 | +package itn.let.cert.phone.support; | |
| 2 | + | |
| 3 | +public final class CertPhoneAuthConstants { | |
| 4 | + | |
| 5 | + public static final String PURPOSE_ADD_EXISTING = "ADD_EXISTING"; | |
| 6 | + public static final String PURPOSE_ADD_NEW = "ADD_NEW"; | |
| 7 | + public static final String PURPOSE_DELETE_EXISTING = "DELETE_EXISTING"; | |
| 8 | + | |
| 9 | + public static final String PENDING_PHONE_PREFIX = "certPhonePendingPhone."; | |
| 10 | + public static final String SEND_COUNT_PREFIX = "certPhoneSendCount."; | |
| 11 | + public static final String LAST_SENT_AT_PREFIX = "certPhoneLastSentAt."; | |
| 12 | + public static final String VERIFIED_PHONE_PREFIX = "certPhoneVerifiedPhone."; | |
| 13 | + public static final String VERIFIED_AT_PREFIX = "certPhoneVerifiedAt."; | |
| 14 | + | |
| 15 | + public static final int MAX_SEND_COUNT = 4; | |
| 16 | + public static final long RESEND_INTERVAL_MILLIS = 30 * 1000L; | |
| 17 | + public static final long VERIFIED_TIMEOUT_MILLIS = 5 * 60 * 1000L; | |
| 18 | + | |
| 19 | + private CertPhoneAuthConstants() { | |
| 20 | + } | |
| 21 | +} |
+++ src/main/java/itn/let/cert/phone/support/PhoneResetSessionConstants.java
... | ... | @@ -0,0 +1,11 @@ |
| 1 | +package itn.let.cert.phone.support; | |
| 2 | + | |
| 3 | +public final class PhoneResetSessionConstants { | |
| 4 | + | |
| 5 | + public static final String PENDING_USER_ID = "phoneResetPendingUserId"; | |
| 6 | + public static final String PENDING_AT = "phoneResetPendingAt"; | |
| 7 | + public static final long TIMEOUT_MILLIS = 10 * 60 * 1000L; | |
| 8 | + | |
| 9 | + private PhoneResetSessionConstants() { | |
| 10 | + } | |
| 11 | +} |
--- src/main/java/itn/let/cert/phone/web/CertPhoneController.java
+++ src/main/java/itn/let/cert/phone/web/CertPhoneController.java
... | ... | @@ -6,19 +6,23 @@ |
| 6 | 6 |
|
| 7 | 7 |
import javax.annotation.Resource; |
| 8 | 8 |
import javax.servlet.http.HttpServletRequest; |
| 9 |
+import javax.servlet.http.HttpSession; |
|
| 9 | 10 |
|
| 10 | 11 |
import org.apache.commons.lang3.StringUtils; |
| 11 | 12 |
import org.springframework.http.HttpStatus; |
| 12 | 13 |
import org.springframework.http.ResponseEntity; |
| 13 | 14 |
import org.springframework.stereotype.Controller; |
| 14 | 15 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 16 |
+import org.springframework.web.bind.annotation.RequestParam; |
|
| 15 | 17 |
import org.springframework.web.servlet.ModelAndView; |
| 16 | 18 |
|
| 17 | 19 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
| 18 | 20 |
import itn.com.cmm.LoginVO; |
| 21 |
+import itn.com.cmm.util.IpUtil; |
|
| 19 | 22 |
import itn.com.utl.fcc.service.EgovStringUtil; |
| 20 | 23 |
import itn.let.cert.phone.service.CertPhoneService; |
| 21 | 24 |
import itn.let.cert.phone.service.MberCertPhoneVO; |
| 25 |
+import itn.let.cert.phone.support.CertPhoneAuthConstants; |
|
| 22 | 26 |
import itn.let.mail.service.StatusResponse; |
| 23 | 27 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 24 | 28 |
import itn.let.mjo.msgdata.service.MjonMsgDataService; |
... | ... | @@ -26,214 +30,284 @@ |
| 26 | 30 |
import itn.let.uat.uia.web.SendLogVO; |
| 27 | 31 |
|
| 28 | 32 |
/** |
| 29 |
- * |
|
| 30 |
- * @author : 이호영 |
|
| 31 |
- * @fileName : CertIpController.java |
|
| 32 |
- * @date : 2024.11.19 |
|
| 33 |
+ * |
|
| 34 |
+ * @author : 이호영 |
|
| 35 |
+ * @fileName : CertIpController.java |
|
| 36 |
+ * @date : 2024.11.19 |
|
| 33 | 37 |
* @description : 허용 IP 관련 컨트롤러 |
| 34 |
- * =========================================================== |
|
| 35 |
- * DATE AUTHOR NOTE |
|
| 38 |
+ * =========================================================== |
|
| 39 |
+ * DATE AUTHOR NOTE |
|
| 36 | 40 |
* ----------------------------------------------------------- * |
| 37 | 41 |
* 2024.11.19 이호영 최초 생성 |
| 38 |
- * |
|
| 39 |
- * |
|
| 40 |
- * |
|
| 42 |
+ * |
|
| 43 |
+ * |
|
| 44 |
+ * |
|
| 41 | 45 |
*/ |
| 42 | 46 |
@Controller |
| 43 | 47 |
public class CertPhoneController {
|
| 44 |
- |
|
| 45 |
- |
|
| 46 |
- /* certPhoneService */ |
|
| 47 |
- @Resource(name = "CertPhoneService") |
|
| 48 |
- private CertPhoneService certPhoneService; |
|
| 49 |
- |
|
| 50 |
- @Resource(name = "MjonMsgDataService") |
|
| 51 |
- private MjonMsgDataService mjonMsgDataService; |
|
| 52 |
- |
|
| 53 |
- |
|
| 54 |
- |
|
| 55 |
- @RequestMapping(value = {"/cert/phone/selectMberCertPhoneList"})
|
|
| 56 |
- public ResponseEntity<StatusResponse> selectMberCertPhoneList(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 57 |
- |
|
| 58 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 59 |
- modelAndView.setViewName("jsonView");
|
|
| 60 |
- |
|
| 61 |
- //로그인 권한정보 불러오기 |
|
| 62 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 63 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 64 |
- |
|
| 65 |
- if(userId == null) {
|
|
| 66 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 67 |
- } |
|
| 68 |
- mberCertPhoneVO.setMberId(userId); |
|
| 69 | 48 |
|
| 70 |
- return ResponseEntity.ok().body(certPhoneService.selectMberCertPhoneListWhereUserId(userId)); |
|
| 71 |
- } |
|
| 72 | 49 |
|
| 73 |
- @RequestMapping(value = {"/cert/phone/findByCertPhoneInfo.do"})
|
|
| 74 |
- public ResponseEntity<StatusResponse> findByCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 75 |
- |
|
| 76 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 77 |
- modelAndView.setViewName("jsonView");
|
|
| 78 |
- |
|
| 79 |
- //로그인 권한정보 불러오기 |
|
| 80 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 81 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 82 |
- |
|
| 83 |
- if(userId == null) {
|
|
| 84 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 85 |
- } |
|
| 86 |
- return ResponseEntity.ok().body(certPhoneService.findByCertPhoneInfo(mberCertPhoneVO)); |
|
| 87 |
- } |
|
| 88 |
- |
|
| 89 |
- @RequestMapping(value = {"/cert/phone/insertCertPhone.do"})
|
|
| 90 |
- public ResponseEntity<StatusResponse> insertCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 91 |
- |
|
| 92 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 93 |
- modelAndView.setViewName("jsonView");
|
|
| 94 |
- |
|
| 95 |
- |
|
| 96 |
- System.out.println(" :: insertCertPhone :: ");
|
|
| 97 |
- |
|
| 98 |
- //로그인 권한정보 불러오기 |
|
| 99 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 100 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 101 |
- |
|
| 102 |
- if(userId == null) {
|
|
| 103 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 104 |
- } |
|
| 105 |
- mberCertPhoneVO.setFrstRegisterId(userId); |
|
| 106 |
- mberCertPhoneVO.setMberId(userId); |
|
| 50 |
+ /* certPhoneService */ |
|
| 51 |
+ @Resource(name = "CertPhoneService") |
|
| 52 |
+ private CertPhoneService certPhoneService; |
|
| 107 | 53 |
|
| 108 |
- |
|
| 109 |
- return ResponseEntity.ok().body(certPhoneService.insertCertPhone(mberCertPhoneVO, loginVO.getMoblphonNo())); |
|
| 110 |
- } |
|
| 111 |
- |
|
| 112 |
- @RequestMapping(value = {"/cert/phone/updateCertPhone.do"})
|
|
| 113 |
- public ResponseEntity<StatusResponse> updateCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 114 |
- |
|
| 115 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 116 |
- modelAndView.setViewName("jsonView");
|
|
| 117 |
- |
|
| 118 |
- //로그인 권한정보 불러오기 |
|
| 119 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 120 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 121 |
- |
|
| 122 |
- if(userId == null) {
|
|
| 123 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 124 |
- } |
|
| 125 |
- mberCertPhoneVO.setFrstRegisterId(userId); |
|
| 126 |
- if(StringUtils.isEmpty(mberCertPhoneVO.getMberId()) ) {
|
|
| 127 |
- mberCertPhoneVO.setMberId(userId); |
|
| 128 |
- } |
|
| 129 |
- |
|
| 130 |
- |
|
| 131 |
- return ResponseEntity.ok().body(certPhoneService.updateMberCertPhone(mberCertPhoneVO)); |
|
| 132 |
- } |
|
| 133 |
- |
|
| 134 |
- @RequestMapping(value = {"/cert/phone/deleteCertPhone.do"})
|
|
| 135 |
- public ResponseEntity<StatusResponse> deleteCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 136 |
- |
|
| 137 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 138 |
- modelAndView.setViewName("jsonView");
|
|
| 139 |
- |
|
| 140 |
- //로그인 권한정보 불러오기 |
|
| 141 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 142 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 143 |
- |
|
| 144 |
- if(userId == null) {
|
|
| 145 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 146 |
- } |
|
| 147 |
- mberCertPhoneVO.setLastUpdusrId(userId); |
|
| 54 |
+ @Resource(name = "MjonMsgDataService") |
|
| 55 |
+ private MjonMsgDataService mjonMsgDataService; |
|
| 148 | 56 |
|
| 149 |
- if(StringUtils.isEmpty(mberCertPhoneVO.getMberId()) ) {
|
|
| 150 |
- mberCertPhoneVO.setMberId(userId); |
|
| 151 |
- } |
|
| 152 |
- |
|
| 153 |
- |
|
| 154 |
- return ResponseEntity.ok().body(certPhoneService.deleteCertPhone(mberCertPhoneVO)); |
|
| 155 |
- } |
|
| 156 |
- |
|
| 157 |
- |
|
| 158 |
- |
|
| 159 |
- |
|
| 160 |
- |
|
| 161 |
- @RequestMapping(value = {"/cert/phone/sendSysMsgDataAjax.do"})
|
|
| 162 |
- public ResponseEntity<StatusResponse> sendSysMsgDataAjax(MberCertPhoneVO mberCertPhoneVO, |
|
| 163 |
- HttpServletRequest request) throws Exception {
|
|
| 164 |
- |
|
| 165 |
- |
|
| 166 |
- //로그인 권한정보 불러오기 |
|
| 167 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 168 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 169 |
- |
|
| 170 |
- if(userId == null) {
|
|
| 171 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 172 |
- } |
|
| 173 |
- mberCertPhoneVO.setMberId(userId); |
|
| 174 | 57 |
|
| 175 |
- // 번호 중복 확인 |
|
| 176 |
- MberCertPhoneVO mberCertIpListVO = (MberCertPhoneVO) certPhoneService.findByCertPhoneInfo(mberCertPhoneVO).getObject(); |
|
| 177 |
- if(mberCertIpListVO != null || loginVO.getMoblphonNo().equals(mberCertPhoneVO.getMbtlnum()) ) {
|
|
| 178 |
- return ResponseEntity.ok().body(new StatusResponse(HttpStatus.CONFLICT, "등록된 번호입니다.", LocalDateTime.now())); |
|
| 179 |
- } |
|
| 58 |
+ @RequestMapping(value = {"/cert/phone/selectMberCertPhoneList", "/cert/phone/selectMberCertPhoneList.do"})
|
|
| 59 |
+ public ResponseEntity<StatusResponse> selectMberCertPhoneList(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 180 | 60 |
|
| 181 |
- MjonMsgVO mjonMsgVO = new MjonMsgVO(); |
|
| 182 |
- mjonMsgVO.setCallTo(mberCertPhoneVO.getMbtlnum()); |
|
| 183 |
- MjonMsgReturnVO returnVO = mjonMsgDataService.sendSysMsgData(mjonMsgVO, request); |
|
| 61 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 62 |
+ modelAndView.setViewName("jsonView");
|
|
| 184 | 63 |
|
| 185 |
- String resultSts = returnVO.getSendMsgCnt(); |
|
| 186 |
- String resultBlockSts = returnVO.getSendMsgBlockCnt(); |
|
| 64 |
+ //로그인 권한정보 불러오기 |
|
| 65 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 66 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 187 | 67 |
|
| 188 |
- String msg= ""; |
|
| 189 |
- Map<String, String> returnMap = new HashMap<>(); |
|
| 190 |
- HttpStatus httpStatus = null; |
|
| 191 |
- if (!resultSts.equals("0")) {
|
|
| 192 |
- |
|
| 193 |
- httpStatus = HttpStatus.OK; |
|
| 194 |
- returnMap.put("msg", "문자 전송이 완료되었습니다.");
|
|
| 195 |
- returnMap.put("resultSts", resultSts);
|
|
| 196 |
- returnMap.put("resultBlockSts", resultBlockSts);
|
|
| 68 |
+ if (StringUtils.isEmpty(userId)) |
|
| 69 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 70 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 197 | 71 |
|
| 198 |
- } else {
|
|
| 72 |
+ return ResponseEntity.ok().body(certPhoneService.selectMberCertPhoneListWhereUserId(userId)); |
|
| 73 |
+ } |
|
| 199 | 74 |
|
| 200 |
- httpStatus = HttpStatus.BAD_REQUEST; |
|
| 201 |
- returnMap.put("msg", "문자 전송에 오류가 발생하였습니다.");
|
|
| 202 |
- returnMap.put("resultSts", "0");
|
|
| 203 |
- returnMap.put("resultBlockSts", "0");
|
|
| 75 |
+ @RequestMapping(value = {"/cert/phone/findByCertPhoneInfo.do"})
|
|
| 76 |
+ public ResponseEntity<StatusResponse> findByCertPhoneInfo(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 204 | 77 |
|
| 205 |
- } |
|
| 206 |
- return ResponseEntity.ok().body(new StatusResponse(httpStatus, returnMap, LocalDateTime.now())); |
|
| 78 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 79 |
+ modelAndView.setViewName("jsonView");
|
|
| 207 | 80 |
|
| 208 |
- } |
|
| 209 |
- |
|
| 210 |
- |
|
| 81 |
+ //로그인 권한정보 불러오기 |
|
| 82 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 83 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 211 | 84 |
|
| 212 |
- @RequestMapping(value = {"/cert/phone/selectSysMsgLogCheck.do"})
|
|
| 213 |
- public ResponseEntity<StatusResponse> selectSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 85 |
+ if (StringUtils.isEmpty(userId)) |
|
| 86 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 87 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 88 |
+ return ResponseEntity.ok().body(certPhoneService.findByCertPhoneInfo(mberCertPhoneVO)); |
|
| 89 |
+ } |
|
| 214 | 90 |
|
| 215 |
- //로그인 권한정보 불러오기 |
|
| 216 |
- LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 217 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 91 |
+ @RequestMapping(value = {"/cert/phone/insertCertPhone.do"})
|
|
| 92 |
+ public ResponseEntity<StatusResponse> insertCertPhone(MberCertPhoneVO mberCertPhoneVO, |
|
| 93 |
+ HttpServletRequest request, HttpSession session) throws Exception {
|
|
| 218 | 94 |
|
| 219 |
- if(userId == null) {
|
|
| 220 |
- if(StringUtils.isEmpty(userId)) return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 221 |
- } |
|
| 222 |
- mberCertPhoneVO.setMberId(userId); |
|
| 223 |
-// |
|
| 224 |
- return ResponseEntity.ok().body(certPhoneService.selectSysMsgLogCheck(mberCertPhoneVO)); |
|
| 95 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 96 |
+ modelAndView.setViewName("jsonView");
|
|
| 225 | 97 |
|
| 226 |
- } |
|
| 227 |
- |
|
| 228 |
- |
|
| 229 |
- |
|
| 230 |
- |
|
| 231 |
- |
|
| 232 |
- |
|
| 233 |
- |
|
| 234 |
- |
|
| 235 |
- |
|
| 236 |
- |
|
| 237 |
- |
|
| 238 |
- |
|
| 239 |
-}(No newline at end of file) |
|
| 98 |
+ |
|
| 99 |
+ System.out.println(" :: insertCertPhone :: ");
|
|
| 100 |
+ |
|
| 101 |
+ //로그인 권한정보 불러오기 |
|
| 102 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 103 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 104 |
+ |
|
| 105 |
+ if (StringUtils.isEmpty(userId)) |
|
| 106 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 107 |
+ String phoneNo = normalizePhone(mberCertPhoneVO.getMbtlnum()); |
|
| 108 |
+ if (!isVerified(session, CertPhoneAuthConstants.PURPOSE_ADD_EXISTING, null) |
|
| 109 |
+ || !isVerified(session, CertPhoneAuthConstants.PURPOSE_ADD_NEW, phoneNo)) {
|
|
| 110 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, |
|
| 111 |
+ "휴대폰 인증을 다시 진행해 주세요.", LocalDateTime.now())); |
|
| 112 |
+ } |
|
| 113 |
+ mberCertPhoneVO.setMbtlnum(phoneNo); |
|
| 114 |
+ mberCertPhoneVO.setFrstRegisterId(userId); |
|
| 115 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 116 |
+ |
|
| 117 |
+ StatusResponse response = certPhoneService.insertCertPhone( |
|
| 118 |
+ mberCertPhoneVO, normalizePhone(loginVO.getMoblphonNo()), loginVO.getDept(), IpUtil.getClientIP(request)); |
|
| 119 |
+ if (HttpStatus.OK.equals(response.getStatus())) {
|
|
| 120 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_ADD_EXISTING); |
|
| 121 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_ADD_NEW); |
|
| 122 |
+ } |
|
| 123 |
+ return ResponseEntity.ok().body(response); |
|
| 124 |
+ } |
|
| 125 |
+ |
|
| 126 |
+ @RequestMapping(value = {"/cert/phone/updateCertPhone.do"})
|
|
| 127 |
+ public ResponseEntity<StatusResponse> updateCertPhone(MberCertPhoneVO mberCertPhoneVO) throws Exception {
|
|
| 128 |
+ |
|
| 129 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 130 |
+ modelAndView.setViewName("jsonView");
|
|
| 131 |
+ |
|
| 132 |
+ //로그인 권한정보 불러오기 |
|
| 133 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 134 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 135 |
+ if (StringUtils.isEmpty(userId)) |
|
| 136 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 137 |
+ mberCertPhoneVO.setLastUpdusrId(userId); |
|
| 138 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 139 |
+ return ResponseEntity.ok().body(certPhoneService.updateMberCertPhone(mberCertPhoneVO)); |
|
| 140 |
+ } |
|
| 141 |
+ |
|
| 142 |
+ @RequestMapping(value = {"/cert/phone/deleteCertPhone.do"})
|
|
| 143 |
+ public ResponseEntity<StatusResponse> deleteCertPhone(MberCertPhoneVO mberCertPhoneVO, |
|
| 144 |
+ HttpServletRequest request, HttpSession session) throws Exception {
|
|
| 145 |
+ |
|
| 146 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 147 |
+ modelAndView.setViewName("jsonView");
|
|
| 148 |
+ |
|
| 149 |
+ //로그인 권한정보 불러오기 |
|
| 150 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 151 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 152 |
+ |
|
| 153 |
+ if (StringUtils.isEmpty(userId)) |
|
| 154 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 155 |
+ String phoneNo = normalizePhone(mberCertPhoneVO.getMbtlnum()); |
|
| 156 |
+ if (!isVerified(session, CertPhoneAuthConstants.PURPOSE_DELETE_EXISTING, null)) {
|
|
| 157 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, |
|
| 158 |
+ "휴대폰 인증을 다시 진행해 주세요.", LocalDateTime.now())); |
|
| 159 |
+ } |
|
| 160 |
+ mberCertPhoneVO.setMbtlnum(phoneNo); |
|
| 161 |
+ mberCertPhoneVO.setLastUpdusrId(userId); |
|
| 162 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 163 |
+ |
|
| 164 |
+ |
|
| 165 |
+ StatusResponse response = certPhoneService.deleteCertPhone( |
|
| 166 |
+ mberCertPhoneVO, IpUtil.getClientIP(request)); |
|
| 167 |
+ if (HttpStatus.OK.equals(response.getStatus())) {
|
|
| 168 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_DELETE_EXISTING); |
|
| 169 |
+ } |
|
| 170 |
+ return ResponseEntity.ok().body(response); |
|
| 171 |
+ } |
|
| 172 |
+ |
|
| 173 |
+ @RequestMapping(value = {"/cert/phone/sendSysMsgDataAjax.do"})
|
|
| 174 |
+ public ResponseEntity<StatusResponse> sendSysMsgDataAjax(MberCertPhoneVO mberCertPhoneVO, |
|
| 175 |
+ @RequestParam("purpose") String purpose,
|
|
| 176 |
+ HttpServletRequest request, HttpSession session) throws Exception {
|
|
| 177 |
+ |
|
| 178 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 179 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 180 |
+ if (StringUtils.isEmpty(userId)) {
|
|
| 181 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 182 |
+ } |
|
| 183 |
+ |
|
| 184 |
+ String phoneNo = normalizePhone(mberCertPhoneVO.getMbtlnum()); |
|
| 185 |
+ if (!isValidPurpose(purpose) || !phoneNo.matches("^01[0-9]{8,9}$")) {
|
|
| 186 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "요청 정보를 확인해 주세요.", LocalDateTime.now())); |
|
| 187 |
+ } |
|
| 188 |
+ if (CertPhoneAuthConstants.PURPOSE_ADD_NEW.equals(purpose)) {
|
|
| 189 |
+ if (!isVerified(session, CertPhoneAuthConstants.PURPOSE_ADD_EXISTING, null)) {
|
|
| 190 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "기존 번호 본인확인을 먼저 완료해 주세요.", LocalDateTime.now())); |
|
| 191 |
+ } |
|
| 192 |
+ if (certPhoneService.isRegisteredAuthPhone(userId, phoneNo)) {
|
|
| 193 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.CONFLICT, |
|
| 194 |
+ "이미 등록된 인증 휴대폰번호입니다.", LocalDateTime.now())); |
|
| 195 |
+ } |
|
| 196 |
+ if (!certPhoneService.isEligibleCertPhone(userId, phoneNo)) {
|
|
| 197 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, |
|
| 198 |
+ "승인 완료된 발신번호가 아닙니다.", LocalDateTime.now())); |
|
| 199 |
+ } |
|
| 200 |
+ } else if (!certPhoneService.isRegisteredAuthPhone(userId, phoneNo)) {
|
|
| 201 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "등록된 인증 휴대폰번호가 아닙니다.", LocalDateTime.now())); |
|
| 202 |
+ } |
|
| 203 |
+ |
|
| 204 |
+ long now = System.currentTimeMillis(); |
|
| 205 |
+ Integer sendCount = (Integer) session.getAttribute(CertPhoneAuthConstants.SEND_COUNT_PREFIX + purpose); |
|
| 206 |
+ Long lastSentAt = (Long) session.getAttribute(CertPhoneAuthConstants.LAST_SENT_AT_PREFIX + purpose); |
|
| 207 |
+ int currentCount = sendCount == null ? 0 : sendCount; |
|
| 208 |
+ if (currentCount >= CertPhoneAuthConstants.MAX_SEND_COUNT) {
|
|
| 209 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.TOO_MANY_REQUESTS, "인증번호 발송 가능 횟수를 초과했습니다.", LocalDateTime.now())); |
|
| 210 |
+ } |
|
| 211 |
+ if (lastSentAt != null && now - lastSentAt < CertPhoneAuthConstants.RESEND_INTERVAL_MILLIS) {
|
|
| 212 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.TOO_MANY_REQUESTS, "30초 후 다시 요청해 주세요.", LocalDateTime.now())); |
|
| 213 |
+ } |
|
| 214 |
+ |
|
| 215 |
+ MjonMsgVO mjonMsgVO = new MjonMsgVO(); |
|
| 216 |
+ mjonMsgVO.setCallTo(phoneNo); |
|
| 217 |
+ MjonMsgReturnVO returnVO = mjonMsgDataService.sendSysMsgData(mjonMsgVO, request); |
|
| 218 |
+ |
|
| 219 |
+ String resultSts = returnVO.getSendMsgCnt(); |
|
| 220 |
+ String resultBlockSts = returnVO.getSendMsgBlockCnt(); |
|
| 221 |
+ |
|
| 222 |
+ Map<String, String> returnMap = new HashMap<>(); |
|
| 223 |
+ HttpStatus httpStatus; |
|
| 224 |
+ if (!resultSts.equals("0")) {
|
|
| 225 |
+ httpStatus = HttpStatus.OK; |
|
| 226 |
+ returnMap.put("msg", "문자 전송이 완료되었습니다.");
|
|
| 227 |
+ returnMap.put("resultSts", resultSts);
|
|
| 228 |
+ returnMap.put("resultBlockSts", resultBlockSts);
|
|
| 229 |
+ returnMap.put("remainingSends", String.valueOf(CertPhoneAuthConstants.MAX_SEND_COUNT - currentCount - 1));
|
|
| 230 |
+ session.setAttribute(CertPhoneAuthConstants.PENDING_PHONE_PREFIX + purpose, phoneNo); |
|
| 231 |
+ session.setAttribute(CertPhoneAuthConstants.SEND_COUNT_PREFIX + purpose, currentCount + 1); |
|
| 232 |
+ session.setAttribute(CertPhoneAuthConstants.LAST_SENT_AT_PREFIX + purpose, now); |
|
| 233 |
+ session.removeAttribute(CertPhoneAuthConstants.VERIFIED_PHONE_PREFIX + purpose); |
|
| 234 |
+ session.removeAttribute(CertPhoneAuthConstants.VERIFIED_AT_PREFIX + purpose); |
|
| 235 |
+ } else {
|
|
| 236 |
+ httpStatus = HttpStatus.BAD_REQUEST; |
|
| 237 |
+ returnMap.put("msg", "문자 전송에 오류가 발생하였습니다.");
|
|
| 238 |
+ returnMap.put("resultSts", "0");
|
|
| 239 |
+ returnMap.put("resultBlockSts", "0");
|
|
| 240 |
+ |
|
| 241 |
+ } |
|
| 242 |
+ return ResponseEntity.ok().body(new StatusResponse(httpStatus, returnMap, LocalDateTime.now())); |
|
| 243 |
+ } |
|
| 244 |
+ |
|
| 245 |
+ @RequestMapping(value = {"/cert/phone/selectSysMsgLogCheck.do"})
|
|
| 246 |
+ public ResponseEntity<StatusResponse> selectSysMsgLogCheck(MberCertPhoneVO mberCertPhoneVO, |
|
| 247 |
+ @RequestParam("purpose") String purpose, HttpSession session) throws Exception {
|
|
| 248 |
+ |
|
| 249 |
+ //로그인 권한정보 불러오기 |
|
| 250 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 251 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 252 |
+ |
|
| 253 |
+ if (StringUtils.isEmpty(userId)) {
|
|
| 254 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "로그인 후 이용해 주세요", LocalDateTime.now())); |
|
| 255 |
+ } |
|
| 256 |
+ String phoneNo = normalizePhone(mberCertPhoneVO.getMbtlnum()); |
|
| 257 |
+ Object pendingPhone = session.getAttribute(CertPhoneAuthConstants.PENDING_PHONE_PREFIX + purpose); |
|
| 258 |
+ if (!isValidPurpose(purpose) || !phoneNo.equals(pendingPhone)) {
|
|
| 259 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, "인증번호를 다시 요청해 주세요.", LocalDateTime.now())); |
|
| 260 |
+ } |
|
| 261 |
+ mberCertPhoneVO.setMbtlnum(phoneNo); |
|
| 262 |
+ mberCertPhoneVO.setMberId(userId); |
|
| 263 |
+ StatusResponse response = certPhoneService.selectSysMsgLogCheck(mberCertPhoneVO); |
|
| 264 |
+ if (HttpStatus.OK.equals(response.getStatus())) {
|
|
| 265 |
+ session.setAttribute(CertPhoneAuthConstants.VERIFIED_PHONE_PREFIX + purpose, phoneNo); |
|
| 266 |
+ session.setAttribute(CertPhoneAuthConstants.VERIFIED_AT_PREFIX + purpose, System.currentTimeMillis()); |
|
| 267 |
+ if (CertPhoneAuthConstants.PURPOSE_ADD_EXISTING.equals(purpose)) {
|
|
| 268 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_ADD_NEW); |
|
| 269 |
+ } |
|
| 270 |
+ } |
|
| 271 |
+ return ResponseEntity.ok().body(response); |
|
| 272 |
+ |
|
| 273 |
+ } |
|
| 274 |
+ |
|
| 275 |
+ @RequestMapping(value = {"/cert/phone/resetAuthFlow.do"})
|
|
| 276 |
+ public ResponseEntity<StatusResponse> resetAuthFlow(HttpSession session) {
|
|
| 277 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_ADD_EXISTING); |
|
| 278 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_ADD_NEW); |
|
| 279 |
+ clearPurpose(session, CertPhoneAuthConstants.PURPOSE_DELETE_EXISTING); |
|
| 280 |
+ return ResponseEntity.ok().body(new StatusResponse(HttpStatus.OK, "", LocalDateTime.now())); |
|
| 281 |
+ } |
|
| 282 |
+ |
|
| 283 |
+ private boolean isValidPurpose(String purpose) {
|
|
| 284 |
+ return CertPhoneAuthConstants.PURPOSE_ADD_EXISTING.equals(purpose) |
|
| 285 |
+ || CertPhoneAuthConstants.PURPOSE_ADD_NEW.equals(purpose) |
|
| 286 |
+ || CertPhoneAuthConstants.PURPOSE_DELETE_EXISTING.equals(purpose); |
|
| 287 |
+ } |
|
| 288 |
+ |
|
| 289 |
+ private boolean isVerified(HttpSession session, String purpose, String expectedPhone) {
|
|
| 290 |
+ Object verifiedPhone = session.getAttribute(CertPhoneAuthConstants.VERIFIED_PHONE_PREFIX + purpose); |
|
| 291 |
+ Object verifiedAt = session.getAttribute(CertPhoneAuthConstants.VERIFIED_AT_PREFIX + purpose); |
|
| 292 |
+ if (!(verifiedPhone instanceof String) || !(verifiedAt instanceof Long)) {
|
|
| 293 |
+ return false; |
|
| 294 |
+ } |
|
| 295 |
+ if (System.currentTimeMillis() - (Long) verifiedAt > CertPhoneAuthConstants.VERIFIED_TIMEOUT_MILLIS) {
|
|
| 296 |
+ clearPurpose(session, purpose); |
|
| 297 |
+ return false; |
|
| 298 |
+ } |
|
| 299 |
+ return expectedPhone == null || expectedPhone.equals(verifiedPhone); |
|
| 300 |
+ } |
|
| 301 |
+ |
|
| 302 |
+ private void clearPurpose(HttpSession session, String purpose) {
|
|
| 303 |
+ session.removeAttribute(CertPhoneAuthConstants.PENDING_PHONE_PREFIX + purpose); |
|
| 304 |
+ session.removeAttribute(CertPhoneAuthConstants.SEND_COUNT_PREFIX + purpose); |
|
| 305 |
+ session.removeAttribute(CertPhoneAuthConstants.LAST_SENT_AT_PREFIX + purpose); |
|
| 306 |
+ session.removeAttribute(CertPhoneAuthConstants.VERIFIED_PHONE_PREFIX + purpose); |
|
| 307 |
+ session.removeAttribute(CertPhoneAuthConstants.VERIFIED_AT_PREFIX + purpose); |
|
| 308 |
+ } |
|
| 309 |
+ |
|
| 310 |
+ private String normalizePhone(String phoneNo) {
|
|
| 311 |
+ return phoneNo == null ? "" : phoneNo.replaceAll("[^0-9]", "");
|
|
| 312 |
+ } |
|
| 313 |
+} |
--- src/main/java/itn/let/cert/phone/web/CertPhoneWebController.java
+++ src/main/java/itn/let/cert/phone/web/CertPhoneWebController.java
... | ... | @@ -1,36 +1,46 @@ |
| 1 | 1 |
package itn.let.cert.phone.web; |
| 2 | 2 |
|
| 3 | 3 |
import java.time.LocalDateTime; |
| 4 |
-import java.util.HashMap; |
|
| 5 |
-import java.util.Map; |
|
| 4 |
+import java.util.List; |
|
| 6 | 5 |
|
| 7 | 6 |
import javax.annotation.Resource; |
| 8 | 7 |
import javax.servlet.http.HttpServletRequest; |
| 8 |
+import javax.servlet.http.HttpServletResponse; |
|
| 9 |
+import javax.servlet.http.HttpSession; |
|
| 9 | 10 |
|
| 10 | 11 |
import org.apache.commons.lang3.StringUtils; |
| 12 |
+import org.slf4j.Logger; |
|
| 13 |
+import org.slf4j.LoggerFactory; |
|
| 11 | 14 |
import org.springframework.http.HttpStatus; |
| 12 | 15 |
import org.springframework.http.ResponseEntity; |
| 13 | 16 |
import org.springframework.stereotype.Controller; |
| 17 |
+import org.springframework.ui.ModelMap; |
|
| 18 |
+import org.springframework.web.bind.annotation.RequestMethod; |
|
| 19 |
+import org.springframework.web.bind.annotation.RequestParam; |
|
| 14 | 20 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 15 |
-import org.springframework.web.servlet.ModelAndView; |
|
| 16 |
- |
|
| 17 |
-import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
|
| 18 |
-import itn.com.cmm.LoginVO; |
|
| 19 |
-import itn.com.utl.fcc.service.EgovStringUtil; |
|
| 21 |
+import itn.com.cmm.util.IpUtil; |
|
| 20 | 22 |
import itn.let.cert.phone.service.CertPhoneService; |
| 21 | 23 |
import itn.let.cert.phone.service.MberCertPhoneVO; |
| 24 |
+import itn.let.cert.phone.support.PhoneResetSessionConstants; |
|
| 22 | 25 |
import itn.let.mail.service.StatusResponse; |
| 23 |
-import itn.let.mjo.msg.service.MjonMsgVO; |
|
| 24 |
-import itn.let.mjo.msgdata.service.MjonMsgDataService; |
|
| 25 |
-import itn.let.mjo.msgdata.service.MjonMsgReturnVO; |
|
| 26 |
+import itn.let.mjo.pay.service.KmcVO; |
|
| 26 | 27 |
import itn.let.uat.uia.service.AuthCertVO; |
| 27 |
-import itn.let.uat.uia.web.SendLogVO; |
|
| 28 |
+import itn.let.uat.uia.support.SecondAuthSessionConstants; |
|
| 29 |
+import itn.let.uat.uia.web.KmcCertChecker; |
|
| 30 |
+import itn.let.uss.umt.service.EgovUserManageService; |
|
| 28 | 31 |
|
| 29 | 32 |
@Controller |
| 30 | 33 |
public class CertPhoneWebController {
|
| 34 |
+ private static final Logger LOGGER = LoggerFactory.getLogger(CertPhoneWebController.class); |
|
| 31 | 35 |
|
| 32 | 36 |
@Resource(name = "CertPhoneService") |
| 33 | 37 |
private CertPhoneService certPhoneService; |
| 38 |
+ |
|
| 39 |
+ @Resource(name = "KmcCertChecker") |
|
| 40 |
+ private KmcCertChecker kmcCertChecker; |
|
| 41 |
+ |
|
| 42 |
+ @Resource(name = "userManageService") |
|
| 43 |
+ private EgovUserManageService userManageService; |
|
| 34 | 44 |
|
| 35 | 45 |
@RequestMapping(value = {"/web/cert/log/insertCertLog.do"})
|
| 36 | 46 |
public ResponseEntity<StatusResponse> insertCertLog(HttpServletRequest request) throws Exception {
|
... | ... | @@ -41,4 +51,106 @@ |
| 41 | 51 |
public String kmcErrorPage() throws Exception {
|
| 42 | 52 |
return "web/cop/kmc/certResultError"; |
| 43 | 53 |
} |
| 44 |
-}(No newline at end of file) |
|
| 54 |
+ |
|
| 55 |
+ @RequestMapping(value = {"/web/cert/phoneList.do"})
|
|
| 56 |
+ public ResponseEntity<List<MberCertPhoneVO>> selectPhoneList( |
|
| 57 |
+ @RequestParam("userId") String userId,
|
|
| 58 |
+ HttpSession session){
|
|
| 59 |
+ try {
|
|
| 60 |
+ if (!userId.equals(session.getAttribute(PhoneResetSessionConstants.PENDING_USER_ID))) {
|
|
| 61 |
+ return ResponseEntity.status(HttpStatus.FORBIDDEN).build(); |
|
| 62 |
+ } |
|
| 63 |
+ List<MberCertPhoneVO> phoneList = certPhoneService.selectMberCertPhoneList(userId); |
|
| 64 |
+ return ResponseEntity.ok(phoneList); |
|
| 65 |
+ } catch (Exception e) {
|
|
| 66 |
+ return ResponseEntity.notFound().build(); |
|
| 67 |
+ } |
|
| 68 |
+ } |
|
| 69 |
+ |
|
| 70 |
+ @RequestMapping(value = "/web/cert/resetPhoneRequest.do", method = RequestMethod.POST) |
|
| 71 |
+ public ResponseEntity<?> resetPhoneRequest(HttpServletRequest request, HttpSession session) {
|
|
| 72 |
+ String userId = getPendingUserId(session); |
|
| 73 |
+ if (StringUtils.isBlank(userId)) {
|
|
| 74 |
+ return ResponseEntity.status(HttpStatus.UNAUTHORIZED) |
|
| 75 |
+ .body(new StatusResponse(HttpStatus.UNAUTHORIZED, |
|
| 76 |
+ "로그인 정보를 다시 확인해주세요.", LocalDateTime.now())); |
|
| 77 |
+ } |
|
| 78 |
+ |
|
| 79 |
+ MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
|
| 80 |
+ mberCertPhoneVO.setTrUrl("/web/cert/resetPhone.do");
|
|
| 81 |
+ mberCertPhoneVO.setPlusInfo(userId); |
|
| 82 |
+ |
|
| 83 |
+ AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
|
| 84 |
+ if (StringUtils.isBlank(certVO.getTr_cert()) || StringUtils.isBlank(certVO.getTr_url())) {
|
|
| 85 |
+ return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) |
|
| 86 |
+ .body(new StatusResponse(HttpStatus.INTERNAL_SERVER_ERROR, |
|
| 87 |
+ "KMC 인증 설정을 확인해주세요.", LocalDateTime.now())); |
|
| 88 |
+ } |
|
| 89 |
+ |
|
| 90 |
+ return ResponseEntity.ok(certVO); |
|
| 91 |
+ } |
|
| 92 |
+ |
|
| 93 |
+ @RequestMapping(value = "/web/cert/resetPhone.do", method = RequestMethod.POST) |
|
| 94 |
+ public String resetPhone( |
|
| 95 |
+ HttpServletRequest request, |
|
| 96 |
+ HttpServletResponse response, |
|
| 97 |
+ HttpSession session, |
|
| 98 |
+ ModelMap model) throws Exception {
|
|
| 99 |
+ boolean success = false; |
|
| 100 |
+ String message = "본인인증 처리에 실패했습니다."; |
|
| 101 |
+ |
|
| 102 |
+ KmcVO kmcVO = kmcCertChecker.authCertResult(request, response, model); |
|
| 103 |
+ if (response.isCommitted()) {
|
|
| 104 |
+ return null; |
|
| 105 |
+ } |
|
| 106 |
+ |
|
| 107 |
+ String userId = getPendingUserId(session); |
|
| 108 |
+ if (StringUtils.isBlank(userId)) {
|
|
| 109 |
+ message = "인증 유효시간이 만료되었습니다. 다시 로그인해주세요."; |
|
| 110 |
+ } else if (!"Y".equals(kmcVO.getResult())) {
|
|
| 111 |
+ message = "KMC 본인인증이 완료되지 않았습니다."; |
|
| 112 |
+ } else if (!userId.equals(kmcVO.getPlusInfo())) {
|
|
| 113 |
+ message = "본인인증 요청 정보가 일치하지 않습니다."; |
|
| 114 |
+ } else if (!kmcVO.getPhoneNo().matches("^01[0-9]{8,9}$")) {
|
|
| 115 |
+ message = "인증된 휴대폰번호가 올바르지 않습니다."; |
|
| 116 |
+ } else {
|
|
| 117 |
+ String memberDi = userManageService.selectUserMblDnById(userId); |
|
| 118 |
+ if (StringUtils.isBlank(memberDi) || !memberDi.equals(kmcVO.getDI())) {
|
|
| 119 |
+ message = "가입 당시 본인 명의와 일치하지 않습니다."; |
|
| 120 |
+ } else {
|
|
| 121 |
+ certPhoneService.resetMemberPhone(userId, kmcVO.getPhoneNo(), IpUtil.getClientIP(request)); |
|
| 122 |
+ session.removeAttribute(SecondAuthSessionConstants.SEND_COUNT); |
|
| 123 |
+ session.removeAttribute(SecondAuthSessionConstants.LAST_SENT_AT); |
|
| 124 |
+ try {
|
|
| 125 |
+ kmcCertChecker.insertCertLog(kmcVO, "KMC_2차 로그인 휴대폰번호 변경"); |
|
| 126 |
+ } catch (Exception e) {
|
|
| 127 |
+ LOGGER.warn("KMC phone reset certification log failed. userId={}", userId, e);
|
|
| 128 |
+ } |
|
| 129 |
+ success = true; |
|
| 130 |
+ message = "휴대폰번호 변경 및 본인인증이 완료되었습니다."; |
|
| 131 |
+ } |
|
| 132 |
+ } |
|
| 133 |
+ |
|
| 134 |
+ model.addAttribute("success", success ? "Y" : "N");
|
|
| 135 |
+ model.addAttribute("message", message);
|
|
| 136 |
+ model.addAttribute("phoneNo", success ? kmcVO.getPhoneNo() : "");
|
|
| 137 |
+ return "web/login/resetPhoneKmcResult"; |
|
| 138 |
+ } |
|
| 139 |
+ |
|
| 140 |
+ private String getPendingUserId(HttpSession session) {
|
|
| 141 |
+ Object pendingUserId = session.getAttribute(PhoneResetSessionConstants.PENDING_USER_ID); |
|
| 142 |
+ Object pendingAt = session.getAttribute(PhoneResetSessionConstants.PENDING_AT); |
|
| 143 |
+ |
|
| 144 |
+ if (!(pendingUserId instanceof String) || !(pendingAt instanceof Long)) {
|
|
| 145 |
+ return null; |
|
| 146 |
+ } |
|
| 147 |
+ |
|
| 148 |
+ if (System.currentTimeMillis() - (Long) pendingAt > PhoneResetSessionConstants.TIMEOUT_MILLIS) {
|
|
| 149 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_USER_ID); |
|
| 150 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_AT); |
|
| 151 |
+ return null; |
|
| 152 |
+ } |
|
| 153 |
+ |
|
| 154 |
+ return (String) pendingUserId; |
|
| 155 |
+ } |
|
| 156 |
+} |
--- src/main/java/itn/let/mjo/apikey/service/ApiKeyMngService.java
+++ src/main/java/itn/let/mjo/apikey/service/ApiKeyMngService.java
... | ... | @@ -1,6 +1,10 @@ |
| 1 | 1 |
package itn.let.mjo.apikey.service; |
| 2 | 2 |
|
| 3 |
+import itn.let.mjo.conf.service.MjonConfVO; |
|
| 4 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 5 |
+ |
|
| 3 | 6 |
import java.util.List; |
| 7 |
+import java.util.Map; |
|
| 4 | 8 |
|
| 5 | 9 |
/** |
| 6 | 10 |
* api key 관리 |
... | ... | @@ -39,5 +43,11 @@ |
| 39 | 43 |
public List<ApiKeyVO> selectApiKeyApplyStatus(ApiKeyVO apiKeyVO) throws Exception; |
| 40 | 44 |
|
| 41 | 45 |
public int selectMberApiKeyChk(ApiKeyVO apiKeyVO) throws Exception; |
| 46 |
+ |
|
| 47 |
+ public Map<String, Object> selectApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
|
| 48 |
+ |
|
| 49 |
+ public int selectCountApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
|
| 50 |
+ |
|
| 51 |
+ public int updateApproveApiMsg(MjonMsgSentVO mjonMsgSentVO) throws Exception; |
|
| 42 | 52 |
|
| 43 | 53 |
}(No newline at end of file) |
--- src/main/java/itn/let/mjo/apikey/service/impl/ApiKeyMngDAO.java
+++ src/main/java/itn/let/mjo/apikey/service/impl/ApiKeyMngDAO.java
... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 |
|
| 3 | 3 |
import java.util.List; |
| 4 | 4 |
|
| 5 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 5 | 6 |
import org.springframework.stereotype.Repository; |
| 6 | 7 |
|
| 7 | 8 |
import itn.com.cmm.service.impl.EgovComAbstractDAO; |
... | ... | @@ -59,5 +60,19 @@ |
| 59 | 60 |
public void deleteApiKeyReal(ApiKeyVO apiKeyVO) throws Exception{
|
| 60 | 61 |
update("ApiKeyMngDAO.deleteApiKeyReal", apiKeyVO);
|
| 61 | 62 |
} |
| 62 |
- |
|
| 63 |
+ |
|
| 64 |
+ //API 발송내역 리스트 |
|
| 65 |
+ public List<MjonMsgSentVO> selectApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 66 |
+ return (List<MjonMsgSentVO>) list("ApiKeyMngDAO.selectApiMsgSentList",mjonMsgSentVO);
|
|
| 67 |
+ } |
|
| 68 |
+ |
|
| 69 |
+ public int selectCountApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) {
|
|
| 70 |
+ return (Integer)select("ApiKeyMngDAO.selectCountApiMsgSentList", mjonMsgSentVO);
|
|
| 71 |
+ } |
|
| 72 |
+ |
|
| 73 |
+ public int updateApproveApiMsg(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 74 |
+ return update("ApiKeyMngDAO.updateApproveApiMsg", mjonMsgSentVO);
|
|
| 75 |
+ } |
|
| 76 |
+ |
|
| 77 |
+ |
|
| 63 | 78 |
}(No newline at end of file) |
--- src/main/java/itn/let/mjo/apikey/service/impl/ApiKeyMngServiceImpl.java
+++ src/main/java/itn/let/mjo/apikey/service/impl/ApiKeyMngServiceImpl.java
... | ... | @@ -1,9 +1,14 @@ |
| 1 | 1 |
package itn.let.mjo.apikey.service.impl; |
| 2 | 2 |
|
| 3 |
+import java.util.HashMap; |
|
| 3 | 4 |
import java.util.List; |
| 5 |
+import java.util.Map; |
|
| 4 | 6 |
|
| 5 | 7 |
import javax.annotation.Resource; |
| 6 | 8 |
|
| 9 |
+import itn.let.fax.addr.service.FaxAddrVO; |
|
| 10 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 11 |
+import org.apache.commons.lang3.StringUtils; |
|
| 7 | 12 |
import org.springframework.stereotype.Service; |
| 8 | 13 |
|
| 9 | 14 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
... | ... | @@ -78,5 +83,32 @@ |
| 78 | 83 |
public List<ApiKeyVO> selectApiKeyApplyStatus(ApiKeyVO apiKeyVO) throws Exception {
|
| 79 | 84 |
return apiKeyMngDAO.selectApiKeyApplyStatus(apiKeyVO); |
| 80 | 85 |
} |
| 81 |
- |
|
| 86 |
+ |
|
| 87 |
+ public Map<String, Object> selectApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 88 |
+ |
|
| 89 |
+ Map<String, Object> resultMap = new HashMap<String, Object>(); |
|
| 90 |
+ // 목록 |
|
| 91 |
+ List<MjonMsgSentVO> resultList = apiKeyMngDAO.selectApiMsgSentList(mjonMsgSentVO); |
|
| 92 |
+ |
|
| 93 |
+ resultList.stream().forEach(t->{
|
|
| 94 |
+ if("6".equals(t.getMsgType())
|
|
| 95 |
+ && StringUtils.isEmpty(t.getSmsTxt()) |
|
| 96 |
+ && !"0".equals(t.getFileCnt()) |
|
| 97 |
+ ) {
|
|
| 98 |
+ t.setSmsTxt("이미지");
|
|
| 99 |
+ } |
|
| 100 |
+ }); |
|
| 101 |
+ |
|
| 102 |
+ resultMap.put("resultList", resultList);
|
|
| 103 |
+ return resultMap; |
|
| 104 |
+ } |
|
| 105 |
+ |
|
| 106 |
+ public int selectCountApiMsgSentList(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 107 |
+ return apiKeyMngDAO.selectCountApiMsgSentList(mjonMsgSentVO); |
|
| 108 |
+ } |
|
| 109 |
+ |
|
| 110 |
+ public int updateApproveApiMsg(MjonMsgSentVO mjonMsgSentVO) throws Exception{
|
|
| 111 |
+ return apiKeyMngDAO.updateApproveApiMsg(mjonMsgSentVO); |
|
| 112 |
+ } |
|
| 113 |
+ |
|
| 82 | 114 |
}(No newline at end of file) |
+++ src/main/java/itn/let/mjo/block/service/GeoIpBlockLogVO.java
... | ... | @@ -0,0 +1,38 @@ |
| 1 | +package itn.let.mjo.block.service; | |
| 2 | + | |
| 3 | +import itn.com.cmm.ComDefaultVO; | |
| 4 | + | |
| 5 | +import java.time.LocalDateTime; | |
| 6 | + | |
| 7 | +public class GeoIpBlockLogVO extends ComDefaultVO { | |
| 8 | + | |
| 9 | + private long blockLogId; | |
| 10 | + private LocalDateTime blockDt; | |
| 11 | + private String accessIp; | |
| 12 | + private String requestUri; | |
| 13 | + private String countryCode; | |
| 14 | + private String countryName; | |
| 15 | + private String blockYn; | |
| 16 | + | |
| 17 | + public Long getBlockLogId() { return blockLogId; } | |
| 18 | + public void setBlockLogId(Long blockLogId) { this.blockLogId = blockLogId; } | |
| 19 | + | |
| 20 | + public LocalDateTime getBlockDt() { return blockDt; } | |
| 21 | + public void setBlockDt(LocalDateTime blockDt) { this.blockDt = blockDt; } | |
| 22 | + | |
| 23 | + public String getAccessIp() { return accessIp; } | |
| 24 | + public void setAccessIp(String accessIp) { this.accessIp = accessIp; } | |
| 25 | + | |
| 26 | + public String getRequestUri() { return requestUri; } | |
| 27 | + public void setRequestUri(String requestUri) { this.requestUri = requestUri; } | |
| 28 | + | |
| 29 | + public String getCountryCode() { return countryCode; } | |
| 30 | + public void setCountryCode(String countryCode) { this.countryCode = countryCode; } | |
| 31 | + | |
| 32 | + public String getCountryName() { return countryName; } | |
| 33 | + public void setCountryName(String countryName) { this.countryName = countryName; } | |
| 34 | + | |
| 35 | + public String getBlockYn() { return blockYn; } | |
| 36 | + public void setBlockYn(String blockYn) { this.blockYn = blockYn; } | |
| 37 | + | |
| 38 | +} |
--- src/main/java/itn/let/mjo/block/service/MjonBlockService.java
+++ src/main/java/itn/let/mjo/block/service/MjonBlockService.java
... | ... | @@ -29,5 +29,11 @@ |
| 29 | 29 |
|
| 30 | 30 |
// 주소록 삭제 |
| 31 | 31 |
void deleteBlockAddr(MjonBlockVO blockVO) throws Exception; |
| 32 |
+ |
|
| 33 |
+ // 해외접근 IP 차단 로그 |
|
| 34 |
+ boolean checkAndLogGeoIpBlock(String clientIp, String requestUri) throws Exception; |
|
| 35 |
+ |
|
| 36 |
+ String selectGeoIpBlockYn() throws Exception; |
|
| 37 |
+ |
|
| 32 | 38 |
|
| 33 | 39 |
} |
--- src/main/java/itn/let/mjo/block/service/impl/MjonBlockDAO.java
+++ src/main/java/itn/let/mjo/block/service/impl/MjonBlockDAO.java
... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 |
|
| 3 | 3 |
import java.util.List; |
| 4 | 4 |
|
| 5 |
+import itn.let.mjo.block.service.GeoIpBlockLogVO; |
|
| 5 | 6 |
import org.springframework.stereotype.Repository; |
| 6 | 7 |
|
| 7 | 8 |
import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
... | ... | @@ -56,7 +57,16 @@ |
| 56 | 57 |
// 주소록 삭제 |
| 57 | 58 |
public void deleteBlockAddr(MjonBlockVO blockVO) throws Exception {
|
| 58 | 59 |
delete("MjonBlockDAO.deleteBlockAddr", blockVO);
|
| 59 |
- } |
|
| 60 |
+ } |
|
| 61 |
+ |
|
| 62 |
+ // 해외접근 IP 차단 로그 |
|
| 63 |
+ public void insertGeoIpBlockLog(GeoIpBlockLogVO geoIpBlockLogVO) throws Exception {
|
|
| 64 |
+ insert("MjonBlockDAO.insertGeoIpBlockLog", geoIpBlockLogVO);
|
|
| 65 |
+ } |
|
| 66 |
+ |
|
| 67 |
+ public String selectGeoIpBlockYn() throws Exception{
|
|
| 68 |
+ return (String) select("MjonBlockDAO.selectGeoIpBlockYn");
|
|
| 69 |
+ } |
|
| 60 | 70 |
|
| 61 | 71 |
|
| 62 | 72 |
} |
--- src/main/java/itn/let/mjo/block/service/impl/MjonBlockServiceImpl.java
+++ src/main/java/itn/let/mjo/block/service/impl/MjonBlockServiceImpl.java
... | ... | @@ -1,9 +1,23 @@ |
| 1 | 1 |
package itn.let.mjo.block.service.impl; |
| 2 | 2 |
|
| 3 |
+import java.io.File; |
|
| 4 |
+import java.io.FileOutputStream; |
|
| 5 |
+import java.io.InputStream; |
|
| 6 |
+import java.net.InetAddress; |
|
| 3 | 7 |
import java.util.List; |
| 4 | 8 |
|
| 9 |
+import javax.annotation.PostConstruct; |
|
| 10 |
+import javax.annotation.PreDestroy; |
|
| 5 | 11 |
import javax.annotation.Resource; |
| 6 | 12 |
|
| 13 |
+import com.maxmind.db.CHMCache; |
|
| 14 |
+import com.maxmind.geoip2.DatabaseReader; |
|
| 15 |
+import com.maxmind.geoip2.model.CountryResponse; |
|
| 16 |
+import itn.let.mjo.block.service.GeoIpBlockLogVO; |
|
| 17 |
+import org.slf4j.Logger; |
|
| 18 |
+import org.slf4j.LoggerFactory; |
|
| 19 |
+import org.springframework.beans.factory.annotation.Value; |
|
| 20 |
+import org.springframework.core.io.ClassPathResource; |
|
| 7 | 21 |
import org.springframework.stereotype.Service; |
| 8 | 22 |
|
| 9 | 23 |
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; |
... | ... | @@ -16,6 +30,8 @@ |
| 16 | 30 |
|
| 17 | 31 |
@Service("mjonBlockService")
|
| 18 | 32 |
public class MjonBlockServiceImpl extends EgovAbstractServiceImpl implements MjonBlockService {
|
| 33 |
+ |
|
| 34 |
+ private static final Logger LOGGER = LoggerFactory.getLogger(MjonBlockServiceImpl.class); |
|
| 19 | 35 |
|
| 20 | 36 |
@Resource(name = "egovMjonBlockIdGnrService") |
| 21 | 37 |
private EgovIdGnrService idgenBlockId; |
... | ... | @@ -32,7 +48,164 @@ |
| 32 | 48 |
/** 메모 idgen */ |
| 33 | 49 |
@Resource(name="egovGnrlUserSelectMemoIdGnrService") |
| 34 | 50 |
private EgovIdGnrService memoidgenService; |
| 35 |
- |
|
| 51 |
+ |
|
| 52 |
+ /* 해외접근 IP */ |
|
| 53 |
+ @Value("#{globalSettings['Globals.geoip.database.path']}")
|
|
| 54 |
+ private String globalGeoIpDbPath; |
|
| 55 |
+ |
|
| 56 |
+ private DatabaseReader databaseReader; |
|
| 57 |
+ |
|
| 58 |
+ private volatile boolean isGeoIpBlockEnabled = false; |
|
| 59 |
+ private volatile long lastCheckTime = 0L; |
|
| 60 |
+ |
|
| 61 |
+ private static final long CACHE_TTL_MS = 30 * 1000L; // 60 * 1000L;, 2 * 60 * 1000L; |
|
| 62 |
+ |
|
| 63 |
+ |
|
| 64 |
+ @PostConstruct |
|
| 65 |
+ public void initGeoIpDatabase() {
|
|
| 66 |
+ reloadGeoIpBlockStatusFromDb(); |
|
| 67 |
+ |
|
| 68 |
+ if (this.databaseReader != null) {
|
|
| 69 |
+ return; |
|
| 70 |
+ } |
|
| 71 |
+ |
|
| 72 |
+ try {
|
|
| 73 |
+ if (globalGeoIpDbPath == null || globalGeoIpDbPath.trim().isEmpty()) {
|
|
| 74 |
+ globalGeoIpDbPath = "egovframework/geoip/GeoLite2-Country.mmdb"; |
|
| 75 |
+ } |
|
| 76 |
+ |
|
| 77 |
+ ClassPathResource resource = new ClassPathResource(globalGeoIpDbPath); |
|
| 78 |
+ |
|
| 79 |
+ if (resource.exists()) {
|
|
| 80 |
+ File tempFile = File.createTempFile("GeoLite2-Country", ".mmdb");
|
|
| 81 |
+ tempFile.deleteOnExit(); |
|
| 82 |
+ |
|
| 83 |
+ try (InputStream is = resource.getInputStream(); |
|
| 84 |
+ FileOutputStream fos = new FileOutputStream(tempFile)) {
|
|
| 85 |
+ |
|
| 86 |
+ byte[] buffer = new byte[8192]; |
|
| 87 |
+ int bytesRead; |
|
| 88 |
+ while ((bytesRead = is.read(buffer)) != -1) {
|
|
| 89 |
+ fos.write(buffer, 0, bytesRead); |
|
| 90 |
+ } |
|
| 91 |
+ fos.flush(); |
|
| 92 |
+ } |
|
| 93 |
+ |
|
| 94 |
+ this.databaseReader = new DatabaseReader.Builder(tempFile) |
|
| 95 |
+ .withCache(new CHMCache()) |
|
| 96 |
+ .build(); |
|
| 97 |
+ } else {
|
|
| 98 |
+ LOGGER.error("file error classpath at: {}", globalGeoIpDbPath);
|
|
| 99 |
+ } |
|
| 100 |
+ |
|
| 101 |
+ } catch (Exception e) {
|
|
| 102 |
+ LOGGER.error("fail geoIp databaseReader", e);
|
|
| 103 |
+ } |
|
| 104 |
+ } |
|
| 105 |
+ |
|
| 106 |
+ @Override |
|
| 107 |
+ public boolean checkAndLogGeoIpBlock(String clientIp, String requestUri) throws Exception {
|
|
| 108 |
+ LOGGER.warn( |
|
| 109 |
+ "[GEOIP CHECK] enabled={}, clientIp={}, uri={}",
|
|
| 110 |
+ isGeoIpBlockEnabled(), |
|
| 111 |
+ clientIp, |
|
| 112 |
+ requestUri |
|
| 113 |
+ ); |
|
| 114 |
+ |
|
| 115 |
+ if (!isGeoIpBlockEnabled()) {
|
|
| 116 |
+ return false; |
|
| 117 |
+ } |
|
| 118 |
+ |
|
| 119 |
+ if (databaseReader == null) {
|
|
| 120 |
+ initGeoIpDatabase(); |
|
| 121 |
+ } |
|
| 122 |
+ |
|
| 123 |
+ if (databaseReader == null) {
|
|
| 124 |
+ return false; |
|
| 125 |
+ } |
|
| 126 |
+ |
|
| 127 |
+ try {
|
|
| 128 |
+ InetAddress ipAddress = InetAddress.getByName(clientIp); |
|
| 129 |
+ CountryResponse response = databaseReader.country(ipAddress); |
|
| 130 |
+ String countryCode = response.getCountry().getIsoCode(); |
|
| 131 |
+ String countryName = response.getCountry().getName(); |
|
| 132 |
+ |
|
| 133 |
+ LOGGER.warn( |
|
| 134 |
+ "[GEOIP RESULT] ip={}, countryCode={}, countryName={}",
|
|
| 135 |
+ clientIp, |
|
| 136 |
+ countryCode, |
|
| 137 |
+ countryName |
|
| 138 |
+ ); |
|
| 139 |
+ |
|
| 140 |
+ |
|
| 141 |
+ // 한국(KR)이 아닌 해외 IP 차단 |
|
| 142 |
+ if (!"KR".equalsIgnoreCase(countryCode)) {
|
|
| 143 |
+ GeoIpBlockLogVO logVo = new GeoIpBlockLogVO(); |
|
| 144 |
+ logVo.setAccessIp(clientIp); |
|
| 145 |
+ logVo.setRequestUri(requestUri); |
|
| 146 |
+ logVo.setCountryCode(countryCode); |
|
| 147 |
+ logVo.setCountryName(countryName); |
|
| 148 |
+ logVo.setBlockYn("Y");
|
|
| 149 |
+ |
|
| 150 |
+ try {
|
|
| 151 |
+ blockDAO.insertGeoIpBlockLog(logVo); |
|
| 152 |
+ } catch (Exception e) {
|
|
| 153 |
+ LOGGER.error("fail insert DB", e);
|
|
| 154 |
+ } |
|
| 155 |
+ return true; |
|
| 156 |
+ } |
|
| 157 |
+ |
|
| 158 |
+ LOGGER.warn( |
|
| 159 |
+ "[GEOIP ALLOW] ip={}, countryCode={}",
|
|
| 160 |
+ clientIp, |
|
| 161 |
+ countryCode |
|
| 162 |
+ ); |
|
| 163 |
+ } catch (Exception e) {
|
|
| 164 |
+ LOGGER.debug("geoIp check failed IP {}: {}", clientIp, e.getMessage());
|
|
| 165 |
+ } |
|
| 166 |
+ |
|
| 167 |
+ return false; |
|
| 168 |
+ } |
|
| 169 |
+ |
|
| 170 |
+ public void reloadGeoIpBlockStatusFromDb() {
|
|
| 171 |
+ try {
|
|
| 172 |
+ String useYn = blockDAO.selectGeoIpBlockYn(); |
|
| 173 |
+ this.isGeoIpBlockEnabled = "Y".equalsIgnoreCase(useYn); |
|
| 174 |
+ this.lastCheckTime = System.currentTimeMillis(); |
|
| 175 |
+ } catch (Exception e) {
|
|
| 176 |
+ LOGGER.error("load fail DB", e);
|
|
| 177 |
+ } |
|
| 178 |
+ } |
|
| 179 |
+ |
|
| 180 |
+ public boolean isGeoIpBlockEnabled() {
|
|
| 181 |
+ long now = System.currentTimeMillis(); |
|
| 182 |
+ |
|
| 183 |
+ if (now - lastCheckTime > CACHE_TTL_MS) {
|
|
| 184 |
+ synchronized (this) {
|
|
| 185 |
+ if (now - lastCheckTime > CACHE_TTL_MS) {
|
|
| 186 |
+ reloadGeoIpBlockStatusFromDb(); |
|
| 187 |
+ } |
|
| 188 |
+ } |
|
| 189 |
+ } |
|
| 190 |
+ return this.isGeoIpBlockEnabled; |
|
| 191 |
+ } |
|
| 192 |
+ |
|
| 193 |
+ public void setGeoIpBlockEnabled(boolean enabled) {
|
|
| 194 |
+ this.isGeoIpBlockEnabled = enabled; |
|
| 195 |
+ this.lastCheckTime = System.currentTimeMillis(); |
|
| 196 |
+ } |
|
| 197 |
+ |
|
| 198 |
+ @PreDestroy |
|
| 199 |
+ public void closeGeoIpDatabase() {
|
|
| 200 |
+ if (this.databaseReader != null) {
|
|
| 201 |
+ try {
|
|
| 202 |
+ this.databaseReader.close(); |
|
| 203 |
+ } catch (Exception e) {
|
|
| 204 |
+ LOGGER.error("Error close DB", e);
|
|
| 205 |
+ } |
|
| 206 |
+ } |
|
| 207 |
+ } |
|
| 208 |
+ |
|
| 36 | 209 |
public void insertBlock(MjonBlockVO blockVO) throws Exception {
|
| 37 | 210 |
blockVO.setBlockId(idgenBlockId.getNextStringId()); |
| 38 | 211 |
blockDAO.insertBlock(blockVO); |
... | ... | @@ -137,7 +310,12 @@ |
| 137 | 310 |
// 주소록 삭제 |
| 138 | 311 |
public void deleteBlockAddr(MjonBlockVO blockVO) throws Exception {
|
| 139 | 312 |
blockDAO.deleteBlockAddr(blockVO); |
| 140 |
- } |
|
| 141 |
- |
|
| 142 |
- |
|
| 313 |
+ } |
|
| 314 |
+ |
|
| 315 |
+ @Override |
|
| 316 |
+ public String selectGeoIpBlockYn() throws Exception {
|
|
| 317 |
+ return blockDAO.selectGeoIpBlockYn(); |
|
| 318 |
+ } |
|
| 319 |
+ |
|
| 320 |
+ |
|
| 143 | 321 |
} |
+++ src/main/java/itn/let/mjo/msg/service/MjEmployeeCertVO.java
... | ... | @@ -0,0 +1,27 @@ |
| 1 | +package itn.let.mjo.msg.service; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import lombok.Getter; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +@Getter | |
| 9 | +@Setter | |
| 10 | +public class MjEmployeeCertVO implements Serializable { | |
| 11 | + | |
| 12 | + private static final long serialVersionUID = 1L; | |
| 13 | + | |
| 14 | + private String mberId; | |
| 15 | + private Integer certCnt; | |
| 16 | + private String lastHstrySeq; | |
| 17 | + private String authHstrySeq; | |
| 18 | + private String employeeCertHstrySeq; | |
| 19 | + private Integer applyCnt; | |
| 20 | + private String authYn; | |
| 21 | + private String rejectCode; | |
| 22 | + private String rejectReason; | |
| 23 | + private String atchFileId; | |
| 24 | + private String agreeYn; | |
| 25 | + private String frstRegisterId; | |
| 26 | + private String lastUpdusrId; | |
| 27 | +} |
--- src/main/java/itn/let/mjo/msg/service/MjPhoneMemberVO.java
+++ src/main/java/itn/let/mjo/msg/service/MjPhoneMemberVO.java
... | ... | @@ -1,7 +1,11 @@ |
| 1 | 1 |
package itn.let.mjo.msg.service; |
| 2 | 2 |
|
| 3 | 3 |
import itn.com.cmm.ComDefaultVO; |
| 4 |
+import lombok.Getter; |
|
| 5 |
+import lombok.Setter; |
|
| 4 | 6 |
|
| 7 |
+@Setter |
|
| 8 |
+@Getter |
|
| 5 | 9 |
public class MjPhoneMemberVO extends ComDefaultVO{
|
| 6 | 10 |
|
| 7 | 11 |
private static final long serialVersionUID = 1L; |
... | ... | @@ -63,470 +67,14 @@ |
| 63 | 67 |
|
| 64 | 68 |
private String CI; |
| 65 | 69 |
private String birthDay; |
| 66 |
- |
|
| 67 |
- public String getAuthYnOrigin() {
|
|
| 68 |
- return authYnOrigin; |
|
| 69 |
- } |
|
| 70 | 70 |
|
| 71 |
- public void setAuthYnOrigin(String authYnOrigin) {
|
|
| 72 |
- this.authYnOrigin = authYnOrigin; |
|
| 73 |
- } |
|
| 74 |
- |
|
| 75 |
- public String getMemo() {
|
|
| 76 |
- return memo; |
|
| 77 |
- } |
|
| 78 |
- |
|
| 79 |
- public void setMemo(String memo) {
|
|
| 80 |
- this.memo = memo; |
|
| 81 |
- } |
|
| 82 |
- |
|
| 83 |
- public String getManagerNm() {
|
|
| 84 |
- return managerNm; |
|
| 85 |
- } |
|
| 86 |
- |
|
| 87 |
- public void setManagerNm(String managerNm) {
|
|
| 88 |
- this.managerNm = managerNm; |
|
| 89 |
- } |
|
| 90 |
- |
|
| 91 |
- private int sumTotCnt; //통계 총합 변수 |
|
| 71 |
+ private int sumTotCnt; //통계 총합 변수 |
|
| 92 | 72 |
private String mbtlNum; |
| 93 |
- |
|
| 94 |
- public String getMbtlNum() {
|
|
| 95 |
- return mbtlNum; |
|
| 96 |
- } |
|
| 73 |
+ private String phmLineType; |
|
| 97 | 74 |
|
| 98 |
- public void setMbtlNum(String mbtlNum) {
|
|
| 99 |
- this.mbtlNum = mbtlNum; |
|
| 100 |
- } |
|
| 101 |
- |
|
| 102 |
- public String getPhmId() {
|
|
| 103 |
- return phmId; |
|
| 104 |
- } |
|
| 105 |
- |
|
| 106 |
- public void setPhmId(String phmId) {
|
|
| 107 |
- this.phmId = phmId; |
|
| 108 |
- } |
|
| 109 |
- |
|
| 110 |
- public String getUserId() {
|
|
| 111 |
- return userId; |
|
| 112 |
- } |
|
| 113 |
- |
|
| 114 |
- public void setUserId(String userId) {
|
|
| 115 |
- this.userId = userId; |
|
| 116 |
- } |
|
| 117 |
- |
|
| 118 |
- public String getCertId() {
|
|
| 119 |
- return certId; |
|
| 120 |
- } |
|
| 121 |
- |
|
| 122 |
- public void setCertId(String certId) {
|
|
| 123 |
- this.certId = certId; |
|
| 124 |
- } |
|
| 125 |
- |
|
| 126 |
- public String getPhmType() {
|
|
| 127 |
- return phmType; |
|
| 128 |
- } |
|
| 129 |
- |
|
| 130 |
- public void setPhmType(String phmType) {
|
|
| 131 |
- this.phmType = phmType; |
|
| 132 |
- } |
|
| 133 |
- |
|
| 134 |
- public String getPhmAuthType() {
|
|
| 135 |
- return phmAuthType; |
|
| 136 |
- } |
|
| 137 |
- |
|
| 138 |
- public void setPhmAuthType(String phmAuthType) {
|
|
| 139 |
- this.phmAuthType = phmAuthType; |
|
| 140 |
- } |
|
| 141 |
- |
|
| 142 |
- public String getFrstRegistPnttm() {
|
|
| 143 |
- return frstRegistPnttm; |
|
| 144 |
- } |
|
| 145 |
- |
|
| 146 |
- public void setFrstRegistPnttm(String frstRegistPnttm) {
|
|
| 147 |
- this.frstRegistPnttm = frstRegistPnttm; |
|
| 148 |
- } |
|
| 149 |
- |
|
| 150 |
- public String getFrstRegisterId() {
|
|
| 151 |
- return frstRegisterId; |
|
| 152 |
- } |
|
| 153 |
- |
|
| 154 |
- public void setFrstRegisterId(String frstRegisterId) {
|
|
| 155 |
- this.frstRegisterId = frstRegisterId; |
|
| 156 |
- } |
|
| 157 |
- |
|
| 158 |
- public String getLastUpdtPnttm() {
|
|
| 159 |
- return lastUpdtPnttm; |
|
| 160 |
- } |
|
| 161 |
- |
|
| 162 |
- public void setLastUpdtPnttm(String lastUpdtPnttm) {
|
|
| 163 |
- this.lastUpdtPnttm = lastUpdtPnttm; |
|
| 164 |
- } |
|
| 165 |
- |
|
| 166 |
- public String getLastUpdusrId() {
|
|
| 167 |
- return lastUpdusrId; |
|
| 168 |
- } |
|
| 169 |
- |
|
| 170 |
- public void setLastUpdusrId(String lastUpdusrId) {
|
|
| 171 |
- this.lastUpdusrId = lastUpdusrId; |
|
| 172 |
- } |
|
| 173 |
- |
|
| 174 |
- public String getDelFlag() {
|
|
| 175 |
- return delFlag; |
|
| 176 |
- } |
|
| 177 |
- |
|
| 178 |
- public void setDelFlag(String delFlag) {
|
|
| 179 |
- this.delFlag = delFlag; |
|
| 180 |
- } |
|
| 181 |
- |
|
| 182 |
- public static long getSerialversionuid() {
|
|
| 75 |
+ public static long getSerialversionuid() {
|
|
| 183 | 76 |
return serialVersionUID; |
| 184 | 77 |
} |
| 185 | 78 |
|
| 186 |
- public String getPhoneNumber() {
|
|
| 187 |
- return phoneNumber; |
|
| 188 |
- } |
|
| 189 |
- |
|
| 190 |
- public void setPhoneNumber(String phoneNumber) {
|
|
| 191 |
- this.phoneNumber = phoneNumber; |
|
| 192 |
- } |
|
| 193 |
- |
|
| 194 |
- public String getPhmTypeTxt() {
|
|
| 195 |
- return phmTypeTxt; |
|
| 196 |
- } |
|
| 197 |
- |
|
| 198 |
- public void setPhmTypeTxt(String phmTypeTxt) {
|
|
| 199 |
- this.phmTypeTxt = phmTypeTxt; |
|
| 200 |
- } |
|
| 201 |
- |
|
| 202 |
- public String getPhmAuthTypeTxt() {
|
|
| 203 |
- return phmAuthTypeTxt; |
|
| 204 |
- } |
|
| 205 |
- |
|
| 206 |
- public void setPhmAuthTypeTxt(String phmAuthTypeTxt) {
|
|
| 207 |
- this.phmAuthTypeTxt = phmAuthTypeTxt; |
|
| 208 |
- } |
|
| 209 |
- |
|
| 210 |
- public String getDelFlagTxt() {
|
|
| 211 |
- return delFlagTxt; |
|
| 212 |
- } |
|
| 213 |
- |
|
| 214 |
- public void setDelFlagTxt(String delFlagTxt) {
|
|
| 215 |
- this.delFlagTxt = delFlagTxt; |
|
| 216 |
- } |
|
| 217 |
- |
|
| 218 |
- public String getAuthYn() {
|
|
| 219 |
- return authYn; |
|
| 220 |
- } |
|
| 221 |
- |
|
| 222 |
- public void setAuthYn(String authYn) {
|
|
| 223 |
- this.authYn = authYn; |
|
| 224 |
- } |
|
| 225 |
- |
|
| 226 |
- public String getAuthYnTxt() {
|
|
| 227 |
- return authYnTxt; |
|
| 228 |
- } |
|
| 229 |
- |
|
| 230 |
- public void setAuthYnTxt(String authYnTxt) {
|
|
| 231 |
- this.authYnTxt = authYnTxt; |
|
| 232 |
- } |
|
| 233 |
- |
|
| 234 |
- public String getUserName() {
|
|
| 235 |
- return userName; |
|
| 236 |
- } |
|
| 237 |
- |
|
| 238 |
- public void setUserName(String userName) {
|
|
| 239 |
- this.userName = userName; |
|
| 240 |
- } |
|
| 241 |
- |
|
| 242 |
- public String getSearchCondition2() {
|
|
| 243 |
- return searchCondition2; |
|
| 244 |
- } |
|
| 245 |
- |
|
| 246 |
- public void setSearchCondition2(String searchCondition2) {
|
|
| 247 |
- this.searchCondition2 = searchCondition2; |
|
| 248 |
- } |
|
| 249 |
- |
|
| 250 |
- public String getSearchCondition3() {
|
|
| 251 |
- return searchCondition3; |
|
| 252 |
- } |
|
| 253 |
- |
|
| 254 |
- public void setSearchCondition3(String searchCondition3) {
|
|
| 255 |
- this.searchCondition3 = searchCondition3; |
|
| 256 |
- } |
|
| 257 |
- |
|
| 258 |
- public String getRank() {
|
|
| 259 |
- return rank; |
|
| 260 |
- } |
|
| 261 |
- |
|
| 262 |
- public void setRank(String rank) {
|
|
| 263 |
- this.rank = rank; |
|
| 264 |
- } |
|
| 265 |
- |
|
| 266 |
- public String getMsgGroupCnt() {
|
|
| 267 |
- return msgGroupCnt; |
|
| 268 |
- } |
|
| 269 |
- |
|
| 270 |
- public void setMsgGroupCnt(String msgGroupCnt) {
|
|
| 271 |
- this.msgGroupCnt = msgGroupCnt; |
|
| 272 |
- } |
|
| 273 |
- |
|
| 274 |
- public String getCallFrom() {
|
|
| 275 |
- return callFrom; |
|
| 276 |
- } |
|
| 277 |
- |
|
| 278 |
- public void setCallFrom(String callFrom) {
|
|
| 279 |
- this.callFrom = callFrom; |
|
| 280 |
- } |
|
| 281 |
- |
|
| 282 |
- public String getMsgType() {
|
|
| 283 |
- return msgType; |
|
| 284 |
- } |
|
| 285 |
- |
|
| 286 |
- public void setMsgType(String msgType) {
|
|
| 287 |
- this.msgType = msgType; |
|
| 288 |
- } |
|
| 289 |
- |
|
| 290 |
- public String getMsgTypeTxt() {
|
|
| 291 |
- return msgTypeTxt; |
|
| 292 |
- } |
|
| 293 |
- |
|
| 294 |
- public void setMsgTypeTxt(String msgTypeTxt) {
|
|
| 295 |
- this.msgTypeTxt = msgTypeTxt; |
|
| 296 |
- } |
|
| 297 |
- |
|
| 298 |
- public String getAgentCode() {
|
|
| 299 |
- return agentCode; |
|
| 300 |
- } |
|
| 301 |
- |
|
| 302 |
- public void setAgentCode(String agentCode) {
|
|
| 303 |
- this.agentCode = agentCode; |
|
| 304 |
- } |
|
| 305 |
- |
|
| 306 |
- public String getAgentCodeTxt() {
|
|
| 307 |
- return agentCodeTxt; |
|
| 308 |
- } |
|
| 309 |
- |
|
| 310 |
- public void setAgentCodeTxt(String agentCodeTxt) {
|
|
| 311 |
- this.agentCodeTxt = agentCodeTxt; |
|
| 312 |
- } |
|
| 313 |
- |
|
| 314 |
- public String getNtceBgnde() {
|
|
| 315 |
- return ntceBgnde; |
|
| 316 |
- } |
|
| 317 |
- |
|
| 318 |
- public void setNtceBgnde(String ntceBgnde) {
|
|
| 319 |
- this.ntceBgnde = ntceBgnde; |
|
| 320 |
- } |
|
| 321 |
- |
|
| 322 |
- public String getNtceEndde() {
|
|
| 323 |
- return ntceEndde; |
|
| 324 |
- } |
|
| 325 |
- |
|
| 326 |
- public void setNtceEndde(String ntceEndde) {
|
|
| 327 |
- this.ntceEndde = ntceEndde; |
|
| 328 |
- } |
|
| 329 |
- |
|
| 330 |
- public String getSbscrbDe() {
|
|
| 331 |
- return sbscrbDe; |
|
| 332 |
- } |
|
| 333 |
- |
|
| 334 |
- public void setSbscrbDe(String sbscrbDe) {
|
|
| 335 |
- this.sbscrbDe = sbscrbDe; |
|
| 336 |
- } |
|
| 337 |
- |
|
| 338 |
- public String getEachPrice() {
|
|
| 339 |
- return eachPrice; |
|
| 340 |
- } |
|
| 341 |
- |
|
| 342 |
- public void setEachPrice(String eachPrice) {
|
|
| 343 |
- this.eachPrice = eachPrice; |
|
| 344 |
- } |
|
| 345 |
- |
|
| 346 |
- public String getTotPrice() {
|
|
| 347 |
- return totPrice; |
|
| 348 |
- } |
|
| 349 |
- |
|
| 350 |
- public void setTotPrice(String totPrice) {
|
|
| 351 |
- this.totPrice = totPrice; |
|
| 352 |
- } |
|
| 353 |
- |
|
| 354 |
- public String getPhmDenyType() {
|
|
| 355 |
- return phmDenyType; |
|
| 356 |
- } |
|
| 357 |
- |
|
| 358 |
- public void setPhmDenyType(String phmDenyType) {
|
|
| 359 |
- this.phmDenyType = phmDenyType; |
|
| 360 |
- } |
|
| 361 |
- |
|
| 362 |
- public String getPhmDenyTypeTxt() {
|
|
| 363 |
- return phmDenyTypeTxt; |
|
| 364 |
- } |
|
| 365 |
- |
|
| 366 |
- public void setPhmDenyTypeTxt(String phmDenyTypeTxt) {
|
|
| 367 |
- this.phmDenyTypeTxt = phmDenyTypeTxt; |
|
| 368 |
- } |
|
| 369 |
- |
|
| 370 |
- public String getSearchCondition4() {
|
|
| 371 |
- return searchCondition4; |
|
| 372 |
- } |
|
| 373 |
- |
|
| 374 |
- public void setSearchCondition4(String searchCondition4) {
|
|
| 375 |
- this.searchCondition4 = searchCondition4; |
|
| 376 |
- } |
|
| 377 |
- |
|
| 378 |
- |
|
| 379 |
- public String getSearchCondition5() {
|
|
| 380 |
- return searchCondition5; |
|
| 381 |
- } |
|
| 382 |
- |
|
| 383 |
- public void setSearchCondition5(String searchCondition5) {
|
|
| 384 |
- this.searchCondition5 = searchCondition5; |
|
| 385 |
- } |
|
| 386 |
- |
|
| 387 |
- public String getSearchCondition6() {
|
|
| 388 |
- return searchCondition6; |
|
| 389 |
- } |
|
| 390 |
- |
|
| 391 |
- public void setSearchCondition6(String searchCondition6) {
|
|
| 392 |
- this.searchCondition6 = searchCondition6; |
|
| 393 |
- } |
|
| 394 |
- |
|
| 395 |
- public String getPhmValue() {
|
|
| 396 |
- return phmValue; |
|
| 397 |
- } |
|
| 398 |
- |
|
| 399 |
- public void setPhmValue(String phmValue) {
|
|
| 400 |
- this.phmValue = phmValue; |
|
| 401 |
- } |
|
| 402 |
- |
|
| 403 |
- public String getSendPhoneNumber() {
|
|
| 404 |
- return sendPhoneNumber; |
|
| 405 |
- } |
|
| 406 |
- |
|
| 407 |
- public void setSendPhoneNumber(String sendPhoneNumber) {
|
|
| 408 |
- this.sendPhoneNumber = sendPhoneNumber; |
|
| 409 |
- } |
|
| 410 |
- |
|
| 411 |
- public String getBaseYn() {
|
|
| 412 |
- return baseYn; |
|
| 413 |
- } |
|
| 414 |
- |
|
| 415 |
- public void setBaseYn(String baseYn) {
|
|
| 416 |
- this.baseYn = baseYn; |
|
| 417 |
- } |
|
| 418 |
- |
|
| 419 |
- public String getRejectReason() {
|
|
| 420 |
- return rejectReason; |
|
| 421 |
- } |
|
| 422 |
- |
|
| 423 |
- public void setRejectReason(String rejectReason) {
|
|
| 424 |
- this.rejectReason = rejectReason; |
|
| 425 |
- } |
|
| 426 |
- |
|
| 427 |
- public String getNameType() {
|
|
| 428 |
- return nameType; |
|
| 429 |
- } |
|
| 430 |
- |
|
| 431 |
- public void setNameType(String nameType) {
|
|
| 432 |
- this.nameType = nameType; |
|
| 433 |
- } |
|
| 434 |
- |
|
| 435 |
- public String getDept() {
|
|
| 436 |
- return dept; |
|
| 437 |
- } |
|
| 438 |
- |
|
| 439 |
- public void setDept(String dept) {
|
|
| 440 |
- this.dept = dept; |
|
| 441 |
- } |
|
| 442 |
- |
|
| 443 |
- public String getUserMoney() {
|
|
| 444 |
- return userMoney; |
|
| 445 |
- } |
|
| 446 |
- |
|
| 447 |
- public void setUserMoney(String userMoney) {
|
|
| 448 |
- this.userMoney = userMoney; |
|
| 449 |
- } |
|
| 450 |
- |
|
| 451 |
- public String getAtchFileId() {
|
|
| 452 |
- return atchFileId; |
|
| 453 |
- } |
|
| 454 |
- |
|
| 455 |
- public void setAtchFileId(String atchFileId) {
|
|
| 456 |
- this.atchFileId = atchFileId; |
|
| 457 |
- } |
|
| 458 |
- |
|
| 459 |
- public String getFileSn() {
|
|
| 460 |
- return fileSn; |
|
| 461 |
- } |
|
| 462 |
- |
|
| 463 |
- public void setFileSn(String fileSn) {
|
|
| 464 |
- this.fileSn = fileSn; |
|
| 465 |
- } |
|
| 466 |
- |
|
| 467 |
- public String getOrignlFileNm() {
|
|
| 468 |
- return orignlFileNm; |
|
| 469 |
- } |
|
| 470 |
- |
|
| 471 |
- public void setOrignlFileNm(String orignlFileNm) {
|
|
| 472 |
- this.orignlFileNm = orignlFileNm; |
|
| 473 |
- } |
|
| 474 |
- |
|
| 475 |
- public String getFileExtsn() {
|
|
| 476 |
- return fileExtsn; |
|
| 477 |
- } |
|
| 478 |
- |
|
| 479 |
- public void setFileExtsn(String fileExtsn) {
|
|
| 480 |
- this.fileExtsn = fileExtsn; |
|
| 481 |
- } |
|
| 482 |
- |
|
| 483 |
- public int getSumTotCnt() {
|
|
| 484 |
- return sumTotCnt; |
|
| 485 |
- } |
|
| 486 |
- |
|
| 487 |
- public void setSumTotCnt(int sumTotCnt) {
|
|
| 488 |
- this.sumTotCnt = sumTotCnt; |
|
| 489 |
- } |
|
| 490 |
- |
|
| 491 |
- public String getAdmNm() {
|
|
| 492 |
- return admNm; |
|
| 493 |
- } |
|
| 494 |
- |
|
| 495 |
- public void setAdmNm(String admNm) {
|
|
| 496 |
- this.admNm = admNm; |
|
| 497 |
- } |
|
| 498 |
- |
|
| 499 |
- public String getOwnerName() {
|
|
| 500 |
- return ownerName; |
|
| 501 |
- } |
|
| 502 |
- |
|
| 503 |
- public void setOwnerName(String ownerName) {
|
|
| 504 |
- this.ownerName = ownerName; |
|
| 505 |
- } |
|
| 506 |
- |
|
| 507 |
- public String getSearchSortAuthYN() {
|
|
| 508 |
- return searchSortAuthYN; |
|
| 509 |
- } |
|
| 510 |
- |
|
| 511 |
- public void setSearchSortAuthYN(String searchSortAuthYN) {
|
|
| 512 |
- this.searchSortAuthYN = searchSortAuthYN; |
|
| 513 |
- } |
|
| 514 |
- |
|
| 515 |
- public String getCI() {
|
|
| 516 |
- return CI; |
|
| 517 |
- } |
|
| 518 |
- |
|
| 519 |
- public void setCI(String cI) {
|
|
| 520 |
- CI = cI; |
|
| 521 |
- } |
|
| 522 |
- |
|
| 523 |
- public String getBirthDay() {
|
|
| 524 |
- return birthDay; |
|
| 525 |
- } |
|
| 526 |
- |
|
| 527 |
- public void setBirthDay(String birthDay) {
|
|
| 528 |
- this.birthDay = birthDay; |
|
| 529 |
- } |
|
| 530 | 79 |
|
| 531 |
- |
|
| 532 | 80 |
} |
--- src/main/java/itn/let/mjo/msg/service/MjonMsgService.java
+++ src/main/java/itn/let/mjo/msg/service/MjonMsgService.java
... | ... | @@ -21,6 +21,10 @@ |
| 21 | 21 |
void deleteSendMsg(MjonMsgVO mjonMsgVO) throws Exception; |
| 22 | 22 |
|
| 23 | 23 |
List<MjPhoneMemberVO> selectSendNumberList(MjPhoneMemberVO mjPhoneMemberVO) throws Exception; |
| 24 |
+ |
|
| 25 |
+ SendNumberStatusVO selectSendNumberStatus(String userId) throws Exception; |
|
| 26 |
+ |
|
| 27 |
+ SendNumberStatusVO applyEmployeeCert(MjEmployeeCertVO employeeCertVO) throws Exception; |
|
| 24 | 28 |
|
| 25 | 29 |
MjPhoneMemberVO selectSendPhoneNumberByPhmId(String phmId) throws Exception; |
| 26 | 30 |
|
... | ... | @@ -30,6 +34,10 @@ |
| 30 | 34 |
|
| 31 | 35 |
void insertSendNumber(MjPhoneMemberVO mjPhoneMemberVO) throws Exception; |
| 32 | 36 |
|
| 37 |
+ void insertUserSendNumber(MjPhoneMemberVO mjPhoneMemberVO) throws Exception; |
|
| 38 |
+ |
|
| 39 |
+ void validateUserSendNumberAvailability(MjPhoneMemberVO mjPhoneMemberVO) throws Exception; |
|
| 40 |
+ |
|
| 33 | 41 |
List<MjonMsgVO> selectMjonMsgGroupList(MjonMsgVO searchVO) throws Exception; |
| 34 | 42 |
|
| 35 | 43 |
List<MjonMsgVO> selectMjonMsgGroupCompleteList(MjonMsgVO searchVO) throws Exception; |
+++ src/main/java/itn/let/mjo/msg/service/SendNumberStatusVO.java
... | ... | @@ -0,0 +1,34 @@ |
| 1 | +package itn.let.mjo.msg.service; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import lombok.Getter; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +@Getter | |
| 9 | +@Setter | |
| 10 | +public class SendNumberStatusVO implements Serializable { | |
| 11 | + | |
| 12 | + private static final long serialVersionUID = 1L; | |
| 13 | + | |
| 14 | + private String userId; | |
| 15 | + private String dept; | |
| 16 | + private String nationality; | |
| 17 | + private int mobileCnt; | |
| 18 | + private int mobileMaxCnt; | |
| 19 | + private int wiredCnt; | |
| 20 | + private Integer wiredMaxCnt; | |
| 21 | + private String mobileAddYn; | |
| 22 | + private String wiredAddYn; | |
| 23 | + private String mobileExceedYn; | |
| 24 | + private String wiredExceedYn; | |
| 25 | + | |
| 26 | + private Integer certCnt; | |
| 27 | + private String employeeCertHstrySeq; | |
| 28 | + private Integer applyCnt; | |
| 29 | + private String authYn; | |
| 30 | + private String authYnTxt; | |
| 31 | + private String rejectCode; | |
| 32 | + private String rejectReason; | |
| 33 | + private String applyPnttm; | |
| 34 | +} |
--- src/main/java/itn/let/mjo/msg/service/impl/MjonMsgDAO.java
+++ src/main/java/itn/let/mjo/msg/service/impl/MjonMsgDAO.java
... | ... | @@ -6,10 +6,12 @@ |
| 6 | 6 |
|
| 7 | 7 |
import egovframework.rte.psl.dataaccess.EgovAbstractDAO; |
| 8 | 8 |
import itn.let.mjo.msg.service.MjPhoneMemberVO; |
| 9 |
+import itn.let.mjo.msg.service.MjEmployeeCertVO; |
|
| 9 | 10 |
import itn.let.mjo.msg.service.MjonMapAddressVO; |
| 10 | 11 |
import itn.let.mjo.msg.service.MjonMsgResultCodeVO; |
| 11 | 12 |
import itn.let.mjo.msg.service.MjonMsgStatVO; |
| 12 | 13 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 14 |
+import itn.let.mjo.msg.service.SendNumberStatusVO; |
|
| 13 | 15 |
import itn.let.mjo.msg.service.MjonSwearWordVO; |
| 14 | 16 |
import itn.let.mjo.reservmsg.service.MjonResvMsgVO; |
| 15 | 17 |
@Repository("mjonMsgDAO")
|
... | ... | @@ -46,6 +48,26 @@ |
| 46 | 48 |
public List<MjPhoneMemberVO> selectSendNumberList(MjPhoneMemberVO mjPhoneMemberVO) throws Exception{
|
| 47 | 49 |
return (List<MjPhoneMemberVO>)list("mjonMsgDAO.selectSendNumberList", mjPhoneMemberVO);
|
| 48 | 50 |
} |
| 51 |
+ |
|
| 52 |
+ public SendNumberStatusVO selectSendNumberStatus(SendNumberStatusVO searchVO) throws Exception {
|
|
| 53 |
+ return (SendNumberStatusVO) select("mjonMsgDAO.selectSendNumberStatus", searchVO);
|
|
| 54 |
+ } |
|
| 55 |
+ |
|
| 56 |
+ public void insertEmployeeCertBase(MjEmployeeCertVO employeeCertVO) {
|
|
| 57 |
+ insert("mjonMsgDAO.insertEmployeeCertBase", employeeCertVO);
|
|
| 58 |
+ } |
|
| 59 |
+ |
|
| 60 |
+ public MjEmployeeCertVO selectEmployeeCertForUpdate(MjEmployeeCertVO employeeCertVO) {
|
|
| 61 |
+ return (MjEmployeeCertVO) select("mjonMsgDAO.selectEmployeeCertForUpdate", employeeCertVO);
|
|
| 62 |
+ } |
|
| 63 |
+ |
|
| 64 |
+ public void insertEmployeeCertHstry(MjEmployeeCertVO employeeCertVO) {
|
|
| 65 |
+ insert("mjonMsgDAO.insertEmployeeCertHstry", employeeCertVO);
|
|
| 66 |
+ } |
|
| 67 |
+ |
|
| 68 |
+ public int updateEmployeeCertLastHstry(MjEmployeeCertVO employeeCertVO) {
|
|
| 69 |
+ return update("mjonMsgDAO.updateEmployeeCertLastHstry", employeeCertVO);
|
|
| 70 |
+ } |
|
| 49 | 71 |
|
| 50 | 72 |
public MjPhoneMemberVO selectSendPhoneNumberByPhmId(String phmId) throws Exception{
|
| 51 | 73 |
return (MjPhoneMemberVO) select("mjonMsgDAO.selectSendPhoneNumberByPhmId", phmId);
|
--- src/main/java/itn/let/mjo/msg/service/impl/MjonMsgServiceImpl.java
+++ src/main/java/itn/let/mjo/msg/service/impl/MjonMsgServiceImpl.java
... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 |
import javax.servlet.http.HttpServletRequest; |
| 10 | 10 |
|
| 11 | 11 |
import org.springframework.stereotype.Service; |
| 12 |
+import org.springframework.transaction.annotation.Transactional; |
|
| 12 | 13 |
import org.springframework.web.context.request.RequestContextHolder; |
| 13 | 14 |
import org.springframework.web.context.request.ServletRequestAttributes; |
| 14 | 15 |
|
... | ... | @@ -19,12 +20,14 @@ |
| 19 | 20 |
import itn.com.cmm.LoginVO; |
| 20 | 21 |
import itn.com.utl.fcc.service.EgovDateUtil; |
| 21 | 22 |
import itn.let.mjo.msg.service.MjPhoneMemberVO; |
| 23 |
+import itn.let.mjo.msg.service.MjEmployeeCertVO; |
|
| 22 | 24 |
import itn.let.mjo.msg.service.MjonMapAddressVO; |
| 23 | 25 |
import itn.let.mjo.msg.service.MjonMsgResultCodeVO; |
| 24 | 26 |
import itn.let.mjo.msg.service.MjonMsgService; |
| 25 | 27 |
import itn.let.mjo.msg.service.MjonMsgStatVO; |
| 26 | 28 |
import itn.let.mjo.msg.service.MjonMsgVO; |
| 27 | 29 |
import itn.let.mjo.msg.service.MjonSwearWordVO; |
| 30 |
+import itn.let.mjo.msg.service.SendNumberStatusVO; |
|
| 28 | 31 |
import itn.let.mjo.msgdata.service.MjonMsgDataService; |
| 29 | 32 |
import itn.let.mjo.pay.service.MjonPayVO; |
| 30 | 33 |
import itn.let.mjo.pay.service.impl.MjonPayDAO; |
... | ... | @@ -50,6 +53,9 @@ |
| 50 | 53 |
|
| 51 | 54 |
@Resource(name = "egovPhoneMemberIdGnrService") |
| 52 | 55 |
private EgovIdGnrService idgenPhoneMemberId; |
| 56 |
+ |
|
| 57 |
+ @Resource(name = "egovEmployeeCertHstryIdGnrService") |
|
| 58 |
+ private EgovIdGnrService idgenEmployeeCertHstryId; |
|
| 53 | 59 |
|
| 54 | 60 |
@Resource(name = "egovMjonMsgGroupIdGnrService") |
| 55 | 61 |
private EgovIdGnrService idgenMjonMsgGroupId; |
... | ... | @@ -174,6 +180,66 @@ |
| 174 | 180 |
public List<MjPhoneMemberVO> selectSendNumberList(MjPhoneMemberVO mjPhoneMemberVO) throws Exception {
|
| 175 | 181 |
return mjonMsgDAO.selectSendNumberList(mjPhoneMemberVO); |
| 176 | 182 |
} |
| 183 |
+ |
|
| 184 |
+ @Override |
|
| 185 |
+ public SendNumberStatusVO selectSendNumberStatus(String userId) throws Exception {
|
|
| 186 |
+ if (userId == null || userId.trim().isEmpty()) {
|
|
| 187 |
+ throw new IllegalArgumentException("회원 아이디가 없습니다.");
|
|
| 188 |
+ } |
|
| 189 |
+ |
|
| 190 |
+ SendNumberStatusVO searchVO = new SendNumberStatusVO(); |
|
| 191 |
+ searchVO.setUserId(userId); |
|
| 192 |
+ SendNumberStatusVO status = mjonMsgDAO.selectSendNumberStatus(searchVO); |
|
| 193 |
+ status.setMobileAddYn(status.getMobileCnt() < status.getMobileMaxCnt() ? "Y" : "N"); |
|
| 194 |
+ status.setWiredAddYn(status.getWiredMaxCnt() != null |
|
| 195 |
+ && status.getWiredCnt() < status.getWiredMaxCnt() ? "Y" : "N"); |
|
| 196 |
+ status.setMobileExceedYn(status.getMobileCnt() > status.getMobileMaxCnt() ? "Y" : "N"); |
|
| 197 |
+ status.setWiredExceedYn(status.getWiredMaxCnt() != null |
|
| 198 |
+ && status.getWiredCnt() > status.getWiredMaxCnt() ? "Y" : "N"); |
|
| 199 |
+ return status; |
|
| 200 |
+ } |
|
| 201 |
+ |
|
| 202 |
+ @Override |
|
| 203 |
+ @Transactional(rollbackFor = Exception.class) |
|
| 204 |
+ public SendNumberStatusVO applyEmployeeCert(MjEmployeeCertVO employeeCertVO) throws Exception {
|
|
| 205 |
+ if (employeeCertVO == null || employeeCertVO.getMberId() == null |
|
| 206 |
+ || employeeCertVO.getMberId().trim().isEmpty()) {
|
|
| 207 |
+ throw new IllegalArgumentException("회원 아이디가 없습니다.");
|
|
| 208 |
+ } |
|
| 209 |
+ if (employeeCertVO.getApplyCnt() == null || employeeCertVO.getApplyCnt() < 1) {
|
|
| 210 |
+ throw new IllegalArgumentException("종사자 수를 1명 이상 입력해 주세요.");
|
|
| 211 |
+ } |
|
| 212 |
+ if (!"Y".equals(employeeCertVO.getAgreeYn())) {
|
|
| 213 |
+ throw new IllegalArgumentException("증빙서류 수집·이용 동의가 필요합니다.");
|
|
| 214 |
+ } |
|
| 215 |
+ if (employeeCertVO.getAtchFileId() == null || employeeCertVO.getAtchFileId().trim().isEmpty()) {
|
|
| 216 |
+ throw new IllegalArgumentException("종사자 수 증빙서류를 첨부해 주세요.");
|
|
| 217 |
+ } |
|
| 218 |
+ |
|
| 219 |
+ SendNumberStatusVO status = selectSendNumberStatus(employeeCertVO.getMberId()); |
|
| 220 |
+ if (!"c".equalsIgnoreCase(status.getDept())) {
|
|
| 221 |
+ throw new IllegalStateException("법인회원만 종사자 수 인증을 신청할 수 있습니다.");
|
|
| 222 |
+ } |
|
| 223 |
+ |
|
| 224 |
+ employeeCertVO.setAuthYn("N");
|
|
| 225 |
+ employeeCertVO.setFrstRegisterId(employeeCertVO.getMberId()); |
|
| 226 |
+ employeeCertVO.setLastUpdusrId(employeeCertVO.getMberId()); |
|
| 227 |
+ |
|
| 228 |
+ mjonMsgDAO.insertEmployeeCertBase(employeeCertVO); |
|
| 229 |
+ MjEmployeeCertVO current = mjonMsgDAO.selectEmployeeCertForUpdate(employeeCertVO); |
|
| 230 |
+ if (current != null && "N".equals(current.getAuthYn())) {
|
|
| 231 |
+ throw new IllegalStateException("이미 종사자 수 인증 심사가 진행 중입니다.");
|
|
| 232 |
+ } |
|
| 233 |
+ |
|
| 234 |
+ employeeCertVO.setEmployeeCertHstrySeq(idgenEmployeeCertHstryId.getNextStringId()); |
|
| 235 |
+ mjonMsgDAO.insertEmployeeCertHstry(employeeCertVO); |
|
| 236 |
+ if (employeeCertVO.getEmployeeCertHstrySeq() == null |
|
| 237 |
+ || mjonMsgDAO.updateEmployeeCertLastHstry(employeeCertVO) != 1) {
|
|
| 238 |
+ throw new IllegalStateException("종사자 수 인증 신청 이력 저장에 실패했습니다.");
|
|
| 239 |
+ } |
|
| 240 |
+ |
|
| 241 |
+ return selectSendNumberStatus(employeeCertVO.getMberId()); |
|
| 242 |
+ } |
|
| 177 | 243 |
|
| 178 | 244 |
@Override |
| 179 | 245 |
public MjPhoneMemberVO selectSendPhoneNumberByPhmId(String phmId) throws Exception{
|
... | ... | @@ -192,11 +258,68 @@ |
| 192 | 258 |
|
| 193 | 259 |
@Override |
| 194 | 260 |
public void insertSendNumber(MjPhoneMemberVO mjPhoneMemberVO) throws Exception {
|
| 261 |
+ setPhoneLineType(mjPhoneMemberVO); |
|
| 195 | 262 |
mjPhoneMemberVO.setPhmId(idgenPhoneMemberId.getNextStringId()); |
| 196 | 263 |
mjonMsgDAO.insertSendNumber(mjPhoneMemberVO); |
| 197 | 264 |
} |
| 198 | 265 |
|
| 199 | 266 |
@Override |
| 267 |
+ public void insertUserSendNumber(MjPhoneMemberVO mjPhoneMemberVO) throws Exception {
|
|
| 268 |
+ validateUserSendNumberAvailability(mjPhoneMemberVO); |
|
| 269 |
+ mjPhoneMemberVO.setPhmId(idgenPhoneMemberId.getNextStringId()); |
|
| 270 |
+ mjonMsgDAO.insertSendNumber(mjPhoneMemberVO); |
|
| 271 |
+ } |
|
| 272 |
+ |
|
| 273 |
+ @Override |
|
| 274 |
+ public void validateUserSendNumberAvailability(MjPhoneMemberVO mjPhoneMemberVO) throws Exception {
|
|
| 275 |
+ if (mjPhoneMemberVO == null || mjPhoneMemberVO.getUserId() == null |
|
| 276 |
+ || mjPhoneMemberVO.getUserId().trim().isEmpty()) {
|
|
| 277 |
+ throw new IllegalArgumentException("로그인 정보를 확인할 수 없습니다.");
|
|
| 278 |
+ } |
|
| 279 |
+ if (!isValidSendNumber(mjPhoneMemberVO.getPhoneNumber())) {
|
|
| 280 |
+ throw new IllegalArgumentException("등록할 수 없는 발신번호입니다.");
|
|
| 281 |
+ } |
|
| 282 |
+ |
|
| 283 |
+ setPhoneLineType(mjPhoneMemberVO); |
|
| 284 |
+ SendNumberStatusVO status = selectSendNumberStatus(mjPhoneMemberVO.getUserId()); |
|
| 285 |
+ |
|
| 286 |
+ if ("M".equals(mjPhoneMemberVO.getPhmLineType()) && "N".equals(status.getMobileAddYn())) {
|
|
| 287 |
+ throw new IllegalStateException("무선 발신번호는 최대 " + status.getMobileMaxCnt() + "개까지 등록할 수 있습니다.");
|
|
| 288 |
+ } |
|
| 289 |
+ if (!"M".equals(mjPhoneMemberVO.getPhmLineType()) && "N".equals(status.getWiredAddYn())) {
|
|
| 290 |
+ if ("c".equalsIgnoreCase(status.getDept()) && status.getWiredMaxCnt() == null) {
|
|
| 291 |
+ throw new IllegalStateException("법인 유선 발신번호는 종사자 수 인증 완료 후 등록할 수 있습니다.");
|
|
| 292 |
+ } |
|
| 293 |
+ throw new IllegalStateException("유선 발신번호 등록 가능 개수를 초과했습니다.");
|
|
| 294 |
+ } |
|
| 295 |
+ } |
|
| 296 |
+ |
|
| 297 |
+ private boolean isValidSendNumber(String phoneNumber) {
|
|
| 298 |
+ String normalized = phoneNumber == null ? "" : phoneNumber.replaceAll("[^0-9]", "");
|
|
| 299 |
+ if (normalized.matches("^010[0-9]{8}$")) {
|
|
| 300 |
+ return true; |
|
| 301 |
+ } |
|
| 302 |
+ if (normalized.matches("^(15|16|18)[0-9]{6}$")) {
|
|
| 303 |
+ return true; |
|
| 304 |
+ } |
|
| 305 |
+ return !normalized.startsWith("050")
|
|
| 306 |
+ && normalized.matches("^(02[0-9]{7,8}|0[3-9][0-9][0-9]{7,8})$");
|
|
| 307 |
+ } |
|
| 308 |
+ |
|
| 309 |
+ private void setPhoneLineType(MjPhoneMemberVO mjPhoneMemberVO) {
|
|
| 310 |
+ String phoneNumber = mjPhoneMemberVO.getPhoneNumber(); |
|
| 311 |
+ String normalized = phoneNumber == null ? "" : phoneNumber.replaceAll("[^0-9]", "");
|
|
| 312 |
+ |
|
| 313 |
+ if (normalized.startsWith("010")) {
|
|
| 314 |
+ mjPhoneMemberVO.setPhmLineType("M");
|
|
| 315 |
+ } else if (normalized.matches("^(15|16|18)[0-9]{6}$")) {
|
|
| 316 |
+ mjPhoneMemberVO.setPhmLineType("R");
|
|
| 317 |
+ } else {
|
|
| 318 |
+ mjPhoneMemberVO.setPhmLineType("L");
|
|
| 319 |
+ } |
|
| 320 |
+ } |
|
| 321 |
+ |
|
| 322 |
+ @Override |
|
| 200 | 323 |
public List<MjonMsgVO> selectMjonMsgGroupList(MjonMsgVO mjonMsgVO) throws Exception {
|
| 201 | 324 |
return mjonMsgDAO.selectMjonMsgGroupList(mjonMsgVO); |
| 202 | 325 |
} |
--- src/main/java/itn/let/mjo/msgdata/service/MjonMsgDataService.java
+++ src/main/java/itn/let/mjo/msgdata/service/MjonMsgDataService.java
... | ... | @@ -54,7 +54,9 @@ |
| 54 | 54 |
|
| 55 | 55 |
//내 문자 보관함 리스트 불러오기 |
| 56 | 56 |
public List<?> selectMyMsgDataListAjax(MjonMsgDataVO mjonMsgDataVO) throws Exception; |
| 57 |
- |
|
| 57 |
+ |
|
| 58 |
+ public List<MberManageVO> selectSendPhonNumAndPhmLineTypeList(String userId) throws Exception; |
|
| 59 |
+ |
|
| 58 | 60 |
//발신번호 리스트 불러오기 |
| 59 | 61 |
public List<String> selectSendPhonNumList(String userId) throws Exception; |
| 60 | 62 |
|
... | ... | @@ -191,6 +193,8 @@ |
| 191 | 193 |
|
| 192 | 194 |
public MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO, HttpServletRequest request) throws Exception; |
| 193 | 195 |
|
| 196 |
+ public MjonMsgReturnVO sendSenderAuthCode(String phoneNo, String code, HttpServletRequest request) throws Exception; |
|
| 197 |
+ |
|
| 194 | 198 |
public Boolean selectSysMsgTodaySendYn(SendLogVO sendLogVO) throws Exception; |
| 195 | 199 |
|
| 196 | 200 |
|
+++ src/main/java/itn/let/mjo/msgdata/service/MsgSenderAuthService.java
... | ... | @@ -0,0 +1,17 @@ |
| 1 | +package itn.let.mjo.msgdata.service; | |
| 2 | + | |
| 3 | +import javax.servlet.http.HttpServletRequest; | |
| 4 | +import javax.servlet.http.HttpSession; | |
| 5 | + | |
| 6 | +public interface MsgSenderAuthService { | |
| 7 | + | |
| 8 | + SenderAuthResult getStatus(String userId, String callFrom, HttpSession session) throws Exception; | |
| 9 | + | |
| 10 | + SenderAuthResult sendCode(String userId, String callFrom, HttpSession session, | |
| 11 | + HttpServletRequest request) throws Exception; | |
| 12 | + | |
| 13 | + SenderAuthResult verifyCode(String userId, String callFrom, String code, | |
| 14 | + HttpSession session) throws Exception; | |
| 15 | + | |
| 16 | + boolean isVerified(String userId, String callFrom, HttpSession session) throws Exception; | |
| 17 | +} |
+++ src/main/java/itn/let/mjo/msgdata/service/SenderAuthRequest.java
... | ... | @@ -0,0 +1,13 @@ |
| 1 | +package itn.let.mjo.msgdata.service; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | +import lombok.Setter; | |
| 5 | + | |
| 6 | +@Setter | |
| 7 | +@Getter | |
| 8 | +public class SenderAuthRequest { | |
| 9 | + | |
| 10 | + private String callFrom; | |
| 11 | + private String code; | |
| 12 | + | |
| 13 | +} |
+++ src/main/java/itn/let/mjo/msgdata/service/SenderAuthResult.java
... | ... | @@ -0,0 +1,28 @@ |
| 1 | +package itn.let.mjo.msgdata.service; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | +import lombok.Setter; | |
| 5 | + | |
| 6 | +@Setter | |
| 7 | +@Getter | |
| 8 | +public class SenderAuthResult { | |
| 9 | + | |
| 10 | + private boolean verified; | |
| 11 | + private String channel; | |
| 12 | + private String maskedDestination; | |
| 13 | + private int expiresIn; | |
| 14 | + private int resendAfter; | |
| 15 | + | |
| 16 | + public SenderAuthResult() { | |
| 17 | + } | |
| 18 | + | |
| 19 | + public SenderAuthResult(boolean verified, String channel, String maskedDestination, | |
| 20 | + int expiresIn, int resendAfter) { | |
| 21 | + this.verified = verified; | |
| 22 | + this.channel = channel; | |
| 23 | + this.maskedDestination = maskedDestination; | |
| 24 | + this.expiresIn = expiresIn; | |
| 25 | + this.resendAfter = resendAfter; | |
| 26 | + } | |
| 27 | + | |
| 28 | +} |
--- src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataDAO.java
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataDAO.java
... | ... | @@ -107,7 +107,12 @@ |
| 107 | 107 |
|
| 108 | 108 |
return list("mjonMsgDAO.selectMyMsgDataListAjax", mjonMsgDataVO);
|
| 109 | 109 |
} |
| 110 |
- |
|
| 110 |
+ |
|
| 111 |
+ @SuppressWarnings("unchecked")
|
|
| 112 |
+ public List<MberManageVO> selectSendPhonNumAndPhmLineTypeList(String userId) throws Exception{
|
|
| 113 |
+ return (List<MberManageVO>) list("mjonMsgDAO.selectSendPhonNumAndPhmLineTypeList", userId);
|
|
| 114 |
+ } |
|
| 115 |
+ |
|
| 111 | 116 |
@SuppressWarnings("unchecked")
|
| 112 | 117 |
public List<String> selectSendPhonNumList(String userId) throws Exception{
|
| 113 | 118 |
|
--- src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MjonMsgDataServiceImpl.java
... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 |
import java.util.HashMap; |
| 13 | 13 |
import java.util.List; |
| 14 | 14 |
import java.util.Map; |
| 15 |
-import java.util.Random; |
|
| 15 |
+import java.security.SecureRandom; |
|
| 16 | 16 |
import java.util.stream.Collectors; |
| 17 | 17 |
|
| 18 | 18 |
import javax.annotation.Resource; |
... | ... | @@ -64,6 +64,7 @@ |
| 64 | 64 |
import itn.let.mjo.spammsg.service.MjonSpamMsgService; |
| 65 | 65 |
import itn.let.module.base.PriceAndPoint; |
| 66 | 66 |
import itn.let.sym.site.service.EgovSiteManagerService; |
| 67 |
+import itn.let.sym.site.service.SiteManagerVO; |
|
| 67 | 68 |
import itn.let.sym.site.service.JoinSettingVO; |
| 68 | 69 |
import itn.let.sym.site.service.impl.SiteManagerDAO; |
| 69 | 70 |
import itn.let.uat.uia.web.SendLogVO; |
... | ... | @@ -2525,6 +2526,10 @@ |
| 2525 | 2526 |
return mjonMsgDataDAO.selectMyMsgDataListAjax(mjonMsgDataVO); |
| 2526 | 2527 |
} |
| 2527 | 2528 |
|
| 2529 |
+ public List<MberManageVO> selectSendPhonNumAndPhmLineTypeList(String userId) throws Exception {
|
|
| 2530 |
+ return mjonMsgDataDAO.selectSendPhonNumAndPhmLineTypeList(userId); |
|
| 2531 |
+ } |
|
| 2532 |
+ |
|
| 2528 | 2533 |
public List<String> selectSendPhonNumList(String userId) throws Exception {
|
| 2529 | 2534 |
|
| 2530 | 2535 |
return mjonMsgDataDAO.selectSendPhonNumList(userId); |
... | ... | @@ -4297,6 +4302,11 @@ |
| 4297 | 4302 |
|
| 4298 | 4303 |
boolean isNotified = mjonCommon.processUserAndCheckSms(mjonMsgVO, userId); |
| 4299 | 4304 |
|
| 4305 |
+ // 업무시간(평일 09:30~13:00, 14:00~18:30 - 점심시간 제외) 중 스팸 키워드가 감지된 경우, |
|
| 4306 |
+ // 금칙어 팝업 띄움 msgDataView.jsp -> businessHourSpam : true |
|
| 4307 |
+ // 금칙어/URL 탐지 여부만 담는 spamKeyword로 판단 |
|
| 4308 |
+ boolean businessHourSpam = isBusinessHour() && StringUtils.isNotEmpty(mjonMsgVO.getSpamKeyword()); |
|
| 4309 |
+ |
|
| 4300 | 4310 |
if (isNotified) {
|
| 4301 | 4311 |
System.out.println("스미싱 알림이 처리되었습니다.");
|
| 4302 | 4312 |
mjonCommon.getAdminMsgSandSlack(mjonMsgVO); |
... | ... | @@ -4306,6 +4316,8 @@ |
| 4306 | 4316 |
}else {
|
| 4307 | 4317 |
System.out.println("알림 조건을 충족하지 않았습니다.");
|
| 4308 | 4318 |
} |
| 4319 |
+ |
|
| 4320 |
+ returnMap.put("businessHourSpam", businessHourSpam);
|
|
| 4309 | 4321 |
|
| 4310 | 4322 |
statusResponse.setStatus(HttpStatus.OK); |
| 4311 | 4323 |
statusResponse.setObject(returnMap); |
... | ... | @@ -4606,6 +4618,59 @@ |
| 4606 | 4618 |
|
| 4607 | 4619 |
return returnMap; |
| 4608 | 4620 |
}*/ |
| 4621 |
+ |
|
| 4622 |
+ /** |
|
| 4623 |
+ * @methodName : isBusinessHour |
|
| 4624 |
+ * @author : 염성찬 |
|
| 4625 |
+ * @description : 업무시간(평일, 점심시간 제외) 여부 판단, |
|
| 4626 |
+ * 테이블 (SITEMANAGER 시간, MJ_HOLIDAY 공휴일) |
|
| 4627 |
+ * @return : boolean |
|
| 4628 |
+ */ |
|
| 4629 |
+ private boolean isBusinessHour() {
|
|
| 4630 |
+ try {
|
|
| 4631 |
+ Calendar cal = Calendar.getInstance(); |
|
| 4632 |
+ |
|
| 4633 |
+ int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 주말(토, 일) 체크 |
|
| 4634 |
+ if (dayOfWeek == Calendar.SATURDAY || dayOfWeek == Calendar.SUNDAY) {
|
|
| 4635 |
+ return false; |
|
| 4636 |
+ } |
|
| 4637 |
+ |
|
| 4638 |
+ // 공휴일 여부 확인 (MJ_HOLIDAY 테이블) |
|
| 4639 |
+ String today = new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime());
|
|
| 4640 |
+ |
|
| 4641 |
+ MsgHolidayVO holidaySearchVO = new MsgHolidayVO(); |
|
| 4642 |
+ holidaySearchVO.setSearchHoliYear(Integer.toString(cal.get(Calendar.YEAR))); |
|
| 4643 |
+ holidaySearchVO.setFirstIndex(0); |
|
| 4644 |
+ holidaySearchVO.setRecordCountPerPage(10000); |
|
| 4645 |
+ List<MsgHolidayVO> holidayList = msgHolidayService.selectMsgHolidayList(holidaySearchVO); |
|
| 4646 |
+ |
|
| 4647 |
+ boolean isHoliday = holidayList.stream() |
|
| 4648 |
+ .anyMatch(holiday -> today.equals(holiday.getHolidayDate())); |
|
| 4649 |
+ if (isHoliday) {
|
|
| 4650 |
+ return false; |
|
| 4651 |
+ } |
|
| 4652 |
+ |
|
| 4653 |
+ // 운영시간 설정 조회 (SITEMANAGER 테이블) |
|
| 4654 |
+ SiteManagerVO siteManagerVO = egovSiteManagerService.selectSiteManagerVO(new SiteManagerVO()); |
|
| 4655 |
+ |
|
| 4656 |
+ SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
| 4657 |
+ String todayPrefix = today + " "; |
|
| 4658 |
+ |
|
| 4659 |
+ Date now = cal.getTime(); |
|
| 4660 |
+ Date operStart = dateTimeFormat.parse(todayPrefix + siteManagerVO.getOperationStartTime()); |
|
| 4661 |
+ Date lunchStart = dateTimeFormat.parse(todayPrefix + siteManagerVO.getLunchStartTime()); |
|
| 4662 |
+ Date lunchEnd = dateTimeFormat.parse(todayPrefix + siteManagerVO.getLunchEndTime()); |
|
| 4663 |
+ Date operEnd = dateTimeFormat.parse(todayPrefix + siteManagerVO.getOperationEndTime()); |
|
| 4664 |
+ |
|
| 4665 |
+ return (!now.before(operStart) && now.before(lunchStart)) |
|
| 4666 |
+ || (!now.before(lunchEnd) && now.before(operEnd)); |
|
| 4667 |
+ |
|
| 4668 |
+ } catch (Exception e) {
|
|
| 4669 |
+ // isBusinessHour 오류 발생하더라도 비지니스 로직은 정상작동 (문자 발송 정상) |
|
| 4670 |
+ log.error("isBusinessHour 업무시간 판단 중 오류 발생 : {}", e.getMessage());
|
|
| 4671 |
+ return false; |
|
| 4672 |
+ } |
|
| 4673 |
+ } |
|
| 4609 | 4674 |
|
| 4610 | 4675 |
private void handleSpamMsg(MjonMsgVO mjonMsgVO) {
|
| 4611 | 4676 |
try {
|
... | ... | @@ -5163,25 +5228,21 @@ |
| 5163 | 5228 |
|
| 5164 | 5229 |
@Override |
| 5165 | 5230 |
public MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO,HttpServletRequest request) throws Exception {
|
| 5231 |
+ String code = String.format("%06d", new SecureRandom().nextInt(1000000));
|
|
| 5232 |
+ return sendSysMsgData(mjonMsgVO, request, code); |
|
| 5233 |
+ } |
|
| 5166 | 5234 |
|
| 5167 |
- |
|
| 5235 |
+ @Override |
|
| 5236 |
+ public MjonMsgReturnVO sendSenderAuthCode(String phoneNo, String code, |
|
| 5237 |
+ HttpServletRequest request) throws Exception {
|
|
| 5238 |
+ MjonMsgVO mjonMsgVO = new MjonMsgVO(); |
|
| 5239 |
+ mjonMsgVO.setCallTo(phoneNo); |
|
| 5240 |
+ return sendSysMsgData(mjonMsgVO, request, code); |
|
| 5241 |
+ } |
|
| 5168 | 5242 |
|
| 5169 |
- // 비밀번호 찾기 문자내용 |
|
| 5170 |
- String contents = "[문자고] 인증번호 : %code%"; |
|
| 5171 |
- String code = ""; |
|
| 5172 |
- long seed = System.currentTimeMillis(); |
|
| 5173 |
- Random random = new Random(seed); |
|
| 5174 |
- // code = Integer.toString(random.nextInt(4)); |
|
| 5175 |
- StringBuffer randomCode = new StringBuffer(); |
|
| 5176 |
- for (int i = 0; i < 6; i++) {
|
|
| 5177 |
- code = randomCode.append(Integer.toString(random.nextInt(10))).toString(); |
|
| 5178 |
- } |
|
| 5179 |
- contents = contents.replace("%code%", code);
|
|
| 5180 |
- System.out.println("contents : "+ contents);
|
|
| 5181 |
- System.out.println("contents : "+ contents);
|
|
| 5182 |
- System.out.println("contents : "+ contents);
|
|
| 5183 |
- System.out.println("contents : "+ contents);
|
|
| 5184 |
- System.out.println("contents : "+ contents);
|
|
| 5243 |
+ private MjonMsgReturnVO sendSysMsgData(MjonMsgVO mjonMsgVO, HttpServletRequest request, |
|
| 5244 |
+ String code) throws Exception {
|
|
| 5245 |
+ String contents = "[문자고] 인증번호 : " + code; |
|
| 5185 | 5246 |
|
| 5186 | 5247 |
mjonMsgVO.setSmsTxt(contents); |
| 5187 | 5248 |
mjonMsgVO.setReserveYn("N");
|
... | ... | @@ -5251,10 +5312,6 @@ |
| 5251 | 5312 |
|
| 5252 | 5313 |
} catch (Exception e) {
|
| 5253 | 5314 |
} |
| 5254 |
- |
|
| 5255 |
- |
|
| 5256 |
- |
|
| 5257 |
- |
|
| 5258 | 5315 |
return returnVO; |
| 5259 | 5316 |
} |
| 5260 | 5317 |
|
+++ src/main/java/itn/let/mjo/msgdata/service/impl/MsgSenderAuthServiceImpl.java
... | ... | @@ -0,0 +1,277 @@ |
| 1 | +package itn.let.mjo.msgdata.service.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.security.SecureRandom; | |
| 5 | +import java.util.List; | |
| 6 | +import java.util.Map; | |
| 7 | +import java.util.Set; | |
| 8 | +import java.util.concurrent.ConcurrentHashMap; | |
| 9 | + | |
| 10 | +import javax.annotation.Resource; | |
| 11 | +import javax.servlet.http.HttpServletRequest; | |
| 12 | +import javax.servlet.http.HttpSession; | |
| 13 | + | |
| 14 | +import org.apache.commons.lang3.StringUtils; | |
| 15 | +import org.springframework.stereotype.Service; | |
| 16 | + | |
| 17 | +import itn.let.mjo.msgdata.service.MjonMsgDataService; | |
| 18 | +import itn.let.mjo.msgdata.service.MjonMsgReturnVO; | |
| 19 | +import itn.let.mjo.msgdata.service.MsgSenderAuthService; | |
| 20 | +import itn.let.mjo.msgdata.service.SenderAuthResult; | |
| 21 | +import itn.let.uat.uia.web.EmailVO; | |
| 22 | +import itn.let.uat.uia.web.SendMail; | |
| 23 | +import itn.let.uss.umt.service.MberManageVO; | |
| 24 | + | |
| 25 | +@Service("MsgSenderAuthService") | |
| 26 | +public class MsgSenderAuthServiceImpl implements MsgSenderAuthService { | |
| 27 | + | |
| 28 | + private static final String PENDING_AUTHS = "msgSenderAuth.pendingAuths"; | |
| 29 | + private static final String VERIFIED_SENDERS = "msgSenderAuth.verifiedSenders"; | |
| 30 | + | |
| 31 | + private static final int EXPIRES_IN_SECONDS = 180; | |
| 32 | + private static final int RESEND_AFTER_SECONDS = 30; | |
| 33 | + | |
| 34 | + private final SecureRandom secureRandom = new SecureRandom(); | |
| 35 | + | |
| 36 | + @Resource(name = "MjonMsgDataService") | |
| 37 | + private MjonMsgDataService mjonMsgDataService; | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public SenderAuthResult getStatus(String userId, String callFrom, HttpSession session) throws Exception { | |
| 41 | + String sender = validateSender(userId, callFrom); | |
| 42 | + String channel = getChannel(sender); | |
| 43 | + String destination = getDestinationForStatus(userId, sender, channel); | |
| 44 | + return result(isVerifiedSender(userId, sender, session), channel, destination); | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Override | |
| 48 | + public SenderAuthResult sendCode(String userId, String callFrom, HttpSession session, HttpServletRequest request) throws Exception { | |
| 49 | + String sender = validateSender(userId, callFrom); | |
| 50 | + String channel = getChannel(sender); | |
| 51 | + String destination = getDestination(userId, sender, channel); | |
| 52 | + long now = System.currentTimeMillis(); | |
| 53 | + String senderKey = verifiedKey(userId, sender); | |
| 54 | + Map<String, PendingAuth> pendingAuths = getPendingAuths(session); | |
| 55 | + String code = String.format("%06d", secureRandom.nextInt(1000000)); | |
| 56 | + PendingAuth pendingAuth = new PendingAuth(code, now); | |
| 57 | + PendingAuth previousAuth; | |
| 58 | + | |
| 59 | + synchronized (pendingAuths) { | |
| 60 | + previousAuth = pendingAuths.get(senderKey); | |
| 61 | + if (previousAuth != null | |
| 62 | + && now - previousAuth.getIssuedAt() < RESEND_AFTER_SECONDS * 1000L) { | |
| 63 | + throw new IllegalStateException("30초 후 다시 요청해 주세요."); | |
| 64 | + } | |
| 65 | + pendingAuths.put(senderKey, pendingAuth); | |
| 66 | + } | |
| 67 | + | |
| 68 | + try { | |
| 69 | + if ("sms".equals(channel)) { | |
| 70 | + MjonMsgReturnVO sendResult = mjonMsgDataService.sendSenderAuthCode(destination, code, request); | |
| 71 | + if (sendResult == null || "0".equals(sendResult.getSendMsgCnt())) { | |
| 72 | + throw new IllegalStateException("인증번호 문자 발송에 실패했습니다."); | |
| 73 | + } | |
| 74 | + } else { | |
| 75 | + sendEmail(destination, sender, code); | |
| 76 | + } | |
| 77 | + } catch (Exception e) { | |
| 78 | + restorePendingAuth(pendingAuths, senderKey, pendingAuth, previousAuth); | |
| 79 | + session.setAttribute(PENDING_AUTHS, pendingAuths); | |
| 80 | + throw e; | |
| 81 | + } | |
| 82 | + | |
| 83 | + session.setAttribute(PENDING_AUTHS, pendingAuths); | |
| 84 | + return result(false, channel, destination); | |
| 85 | + } | |
| 86 | + | |
| 87 | + @Override | |
| 88 | + public SenderAuthResult verifyCode(String userId, String callFrom, String code, HttpSession session) throws Exception { | |
| 89 | + String sender = validateSender(userId, callFrom); | |
| 90 | + if (code == null || !code.matches("^[0-9]{6}$")) { | |
| 91 | + throw new IllegalArgumentException("인증번호 숫자 6자리를 입력해 주세요."); | |
| 92 | + } | |
| 93 | + | |
| 94 | + String senderKey = verifiedKey(userId, sender); | |
| 95 | + Map<String, PendingAuth> pendingAuths = getPendingAuths(session); | |
| 96 | + | |
| 97 | + synchronized (pendingAuths) { | |
| 98 | + PendingAuth pendingAuth = pendingAuths.get(senderKey); | |
| 99 | + if (pendingAuth == null) { | |
| 100 | + throw new IllegalStateException("인증번호를 먼저 요청해 주세요."); | |
| 101 | + } | |
| 102 | + if (System.currentTimeMillis() - pendingAuth.getIssuedAt() > EXPIRES_IN_SECONDS * 1000L) { | |
| 103 | + pendingAuths.remove(senderKey); | |
| 104 | + session.setAttribute(PENDING_AUTHS, pendingAuths); | |
| 105 | + throw new IllegalStateException("인증번호 입력 시간이 만료되었습니다. 다시 요청해 주세요."); | |
| 106 | + } | |
| 107 | + if (!code.equals(pendingAuth.getCode())) { | |
| 108 | + throw new IllegalArgumentException("인증번호가 일치하지 않습니다."); | |
| 109 | + } | |
| 110 | + pendingAuths.remove(senderKey); | |
| 111 | + } | |
| 112 | + | |
| 113 | + Set<String> verifiedSenders = getVerifiedSenders(session); | |
| 114 | + verifiedSenders.add(senderKey); | |
| 115 | + session.setAttribute(PENDING_AUTHS, pendingAuths); | |
| 116 | + session.setAttribute(VERIFIED_SENDERS, verifiedSenders); | |
| 117 | + | |
| 118 | + String channel = getChannel(sender); | |
| 119 | + return result(true, channel, getDestinationForStatus(userId, sender, channel)); | |
| 120 | + } | |
| 121 | + | |
| 122 | + @Override | |
| 123 | + public boolean isVerified(String userId, String callFrom, HttpSession session) throws Exception { | |
| 124 | + if (session == null || StringUtils.isBlank(userId)) { | |
| 125 | + return false; | |
| 126 | + } | |
| 127 | + String sender = validateSender(userId, callFrom); | |
| 128 | + return isVerifiedSender(userId, sender, session); | |
| 129 | + } | |
| 130 | + | |
| 131 | + private boolean isVerifiedSender(String userId, String sender, HttpSession session) { | |
| 132 | + return session != null && getVerifiedSenders(session).contains(verifiedKey(userId, sender)); | |
| 133 | + } | |
| 134 | + | |
| 135 | + private String validateSender(String userId, String callFrom) throws Exception { | |
| 136 | + if (StringUtils.isBlank(userId)) { | |
| 137 | + throw new IllegalStateException("로그인 후 이용해 주세요."); | |
| 138 | + } | |
| 139 | + | |
| 140 | + String sender = normalizePhone(callFrom); | |
| 141 | + if (!sender.matches("^[0-9]{8,12}$")) { | |
| 142 | + throw new IllegalArgumentException("발신번호를 확인해 주세요."); | |
| 143 | + } | |
| 144 | + | |
| 145 | + List<String> senders = mjonMsgDataService.selectSendPhonNumList(userId); | |
| 146 | + if (senders != null) { | |
| 147 | + for (String registeredSender : senders) { | |
| 148 | + if (sender.equals(normalizePhone(registeredSender))) { | |
| 149 | + return sender; | |
| 150 | + } | |
| 151 | + } | |
| 152 | + } | |
| 153 | + throw new IllegalArgumentException("승인 완료된 발신번호가 아닙니다."); | |
| 154 | + } | |
| 155 | + | |
| 156 | + private String getChannel(String sender) { | |
| 157 | + return sender.startsWith("010") ? "sms" : "email"; | |
| 158 | + } | |
| 159 | + | |
| 160 | + private String getDestinationForStatus(String userId, String sender, String channel) throws Exception { | |
| 161 | + try { | |
| 162 | + return getDestination(userId, sender, channel); | |
| 163 | + } catch (IllegalStateException e) { | |
| 164 | + return ""; | |
| 165 | + } | |
| 166 | + } | |
| 167 | + | |
| 168 | + private String getDestination(String userId, String sender, String channel) throws Exception { | |
| 169 | + if ("sms".equals(channel)) { | |
| 170 | + return sender; | |
| 171 | + } | |
| 172 | + | |
| 173 | + MberManageVO member = mjonMsgDataService.selectMberManageInfo(userId); | |
| 174 | + String email = member == null ? "" : StringUtils.trimToEmpty(member.getMberEmailAdres()); | |
| 175 | + if (!email.matches("^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$")) { | |
| 176 | + throw new IllegalStateException("회원가입 담당자 이메일을 확인해 주세요."); | |
| 177 | + } | |
| 178 | + return email; | |
| 179 | + } | |
| 180 | + | |
| 181 | + private void sendEmail(String email, String sender, String code) throws Exception { | |
| 182 | + EmailVO mail = new EmailVO(); | |
| 183 | + mail.setSend_from("noreply@munjaon.co.kr"); | |
| 184 | + mail.setSend_to(email); | |
| 185 | + mail.setTitle("[문자온] 발신번호 인증번호 안내"); | |
| 186 | + mail.setContents("문자 발송을 위한 발신번호 " + sender | |
| 187 | + + "의 인증번호는 <strong>" + code + "</strong> 입니다.<br>" | |
| 188 | + + "인증번호는 3분 동안 유효합니다."); | |
| 189 | + new SendMail().itnSendMail(mail); | |
| 190 | + } | |
| 191 | + | |
| 192 | + private SenderAuthResult result(boolean verified, String channel, String destination) { | |
| 193 | + return new SenderAuthResult(verified, channel, maskDestination(destination, channel), | |
| 194 | + EXPIRES_IN_SECONDS, RESEND_AFTER_SECONDS); | |
| 195 | + } | |
| 196 | + | |
| 197 | + private String maskDestination(String destination, String channel) { | |
| 198 | + if (StringUtils.isEmpty(destination)) { | |
| 199 | + return ""; | |
| 200 | + } | |
| 201 | + if ("sms".equals(channel)) { | |
| 202 | + return destination.substring(0, 3) + "****" + destination.substring(destination.length() - 4); | |
| 203 | + } | |
| 204 | + | |
| 205 | + int at = destination.indexOf('@'); | |
| 206 | + String local = destination.substring(0, at); | |
| 207 | + return local.substring(0, Math.min(2, local.length())) + "***" + destination.substring(at); | |
| 208 | + } | |
| 209 | + | |
| 210 | + @SuppressWarnings("unchecked") | |
| 211 | + private Map<String, PendingAuth> getPendingAuths(HttpSession session) { | |
| 212 | + synchronized (session) { | |
| 213 | + Map<String, PendingAuth> pendingAuths = | |
| 214 | + (Map<String, PendingAuth>) session.getAttribute(PENDING_AUTHS); | |
| 215 | + if (pendingAuths == null) { | |
| 216 | + pendingAuths = new ConcurrentHashMap<String, PendingAuth>(); | |
| 217 | + session.setAttribute(PENDING_AUTHS, pendingAuths); | |
| 218 | + } | |
| 219 | + return pendingAuths; | |
| 220 | + } | |
| 221 | + } | |
| 222 | + | |
| 223 | + @SuppressWarnings("unchecked") | |
| 224 | + private Set<String> getVerifiedSenders(HttpSession session) { | |
| 225 | + synchronized (session) { | |
| 226 | + Set<String> verifiedSenders = (Set<String>) session.getAttribute(VERIFIED_SENDERS); | |
| 227 | + if (verifiedSenders == null) { | |
| 228 | + verifiedSenders = ConcurrentHashMap.<String>newKeySet(); | |
| 229 | + session.setAttribute(VERIFIED_SENDERS, verifiedSenders); | |
| 230 | + } | |
| 231 | + return verifiedSenders; | |
| 232 | + } | |
| 233 | + } | |
| 234 | + | |
| 235 | + private void restorePendingAuth(Map<String, PendingAuth> pendingAuths, String senderKey, | |
| 236 | + PendingAuth failedAuth, PendingAuth previousAuth) { | |
| 237 | + synchronized (pendingAuths) { | |
| 238 | + if (pendingAuths.get(senderKey) != failedAuth) { | |
| 239 | + return; | |
| 240 | + } | |
| 241 | + if (previousAuth == null) { | |
| 242 | + pendingAuths.remove(senderKey); | |
| 243 | + } else { | |
| 244 | + pendingAuths.put(senderKey, previousAuth); | |
| 245 | + } | |
| 246 | + } | |
| 247 | + } | |
| 248 | + | |
| 249 | + private String normalizePhone(String phone) { | |
| 250 | + return phone == null ? "" : phone.replaceAll("[^0-9]", ""); | |
| 251 | + } | |
| 252 | + | |
| 253 | + private String verifiedKey(String userId, String sender) { | |
| 254 | + return userId + ":" + sender; | |
| 255 | + } | |
| 256 | + | |
| 257 | + private static final class PendingAuth implements Serializable { | |
| 258 | + | |
| 259 | + private static final long serialVersionUID = 1L; | |
| 260 | + | |
| 261 | + private final String code; | |
| 262 | + private final long issuedAt; | |
| 263 | + | |
| 264 | + private PendingAuth(String code, long issuedAt) { | |
| 265 | + this.code = code; | |
| 266 | + this.issuedAt = issuedAt; | |
| 267 | + } | |
| 268 | + | |
| 269 | + private String getCode() { | |
| 270 | + return code; | |
| 271 | + } | |
| 272 | + | |
| 273 | + private long getIssuedAt() { | |
| 274 | + return issuedAt; | |
| 275 | + } | |
| 276 | + } | |
| 277 | +} |
--- src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
+++ src/main/java/itn/let/mjo/msgdata/web/MjonMsgDataController.java
... | ... | @@ -637,16 +637,11 @@ |
| 637 | 637 |
if(!userId.equals("")) {//로그인 된 사용자만 발신번호를 불러오도록 수정
|
| 638 | 638 |
|
| 639 | 639 |
//아이디 발신번호 리스트 불러오기. |
| 640 |
- List<String> resultSendPhonList = mjonMsgDataService.selectSendPhonNumList(userId); |
|
| 641 |
- List<String> resultPhonList = new ArrayList<String>(); |
|
| 642 |
- MJUtil mjUtil = new MJUtil(); |
|
| 643 |
- |
|
| 644 |
- for(String phone : resultSendPhonList) {
|
|
| 645 |
- |
|
| 646 |
- resultPhonList.add(mjUtil.addDash(phone)); |
|
| 647 |
- |
|
| 640 |
+ List<MberManageVO> resultSendPhonList = mjonMsgDataService.selectSendPhonNumAndPhmLineTypeList(userId); |
|
| 641 |
+ for(MberManageVO vo : resultSendPhonList) {
|
|
| 642 |
+ vo.setPhoneNumber(MJUtil.addDash(vo.getPhoneNumber())); |
|
| 648 | 643 |
} |
| 649 |
- model.addAttribute("resultPhonList", resultPhonList);
|
|
| 644 |
+ model.addAttribute("resultPhonList", resultSendPhonList);
|
|
| 650 | 645 |
|
| 651 | 646 |
} |
| 652 | 647 |
|
... | ... | @@ -1331,16 +1326,11 @@ |
| 1331 | 1326 |
if(!userId.equals("")) {//로그인 된 사용자만 발신번호를 불러오도록 수정
|
| 1332 | 1327 |
|
| 1333 | 1328 |
//아이디 발신번호 리스트 불러오기. |
| 1334 |
- List<String> resultSendPhonList = mjonMsgDataService.selectSendPhonNumList(userId); |
|
| 1335 |
- List<String> resultPhonList = new ArrayList<String>(); |
|
| 1336 |
- MJUtil mjUtil = new MJUtil(); |
|
| 1337 |
- |
|
| 1338 |
- for(String phone : resultSendPhonList) {
|
|
| 1339 |
- |
|
| 1340 |
- resultPhonList.add(mjUtil.addDash(phone)); |
|
| 1341 |
- |
|
| 1329 |
+ List<MberManageVO> resultSendPhonList = mjonMsgDataService.selectSendPhonNumAndPhmLineTypeList(userId); |
|
| 1330 |
+ for(MberManageVO vo : resultSendPhonList) {
|
|
| 1331 |
+ vo.setPhoneNumber(MJUtil.addDash(vo.getPhoneNumber())); |
|
| 1342 | 1332 |
} |
| 1343 |
- model.addAttribute("resultPhonList", resultPhonList);
|
|
| 1333 |
+ model.addAttribute("resultPhonList", resultSendPhonList);
|
|
| 1344 | 1334 |
|
| 1345 | 1335 |
} |
| 1346 | 1336 |
|
+++ src/main/java/itn/let/mjo/msgdata/web/MsgAuthenticatedSendRestController.java
... | ... | @@ -0,0 +1,52 @@ |
| 1 | +package itn.let.mjo.msgdata.web; | |
| 2 | + | |
| 3 | +import java.time.LocalDateTime; | |
| 4 | + | |
| 5 | +import javax.annotation.Resource; | |
| 6 | +import javax.servlet.http.HttpServletRequest; | |
| 7 | + | |
| 8 | +import org.apache.commons.lang3.StringUtils; | |
| 9 | +import org.springframework.http.HttpStatus; | |
| 10 | +import org.springframework.http.ResponseEntity; | |
| 11 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 13 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 14 | +import org.springframework.web.bind.annotation.RestController; | |
| 15 | + | |
| 16 | +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; | |
| 17 | +import itn.com.cmm.LoginVO; | |
| 18 | +import itn.com.utl.fcc.service.EgovStringUtil; | |
| 19 | +import itn.let.mail.service.StatusResponse; | |
| 20 | +import itn.let.mjo.msg.service.MjonMsgVO; | |
| 21 | +import itn.let.mjo.msgdata.service.MjonMsgDataService; | |
| 22 | +import itn.let.mjo.msgdata.service.MsgSenderAuthService; | |
| 23 | + | |
| 24 | +/** 새 문자 발송 화면에서만 사용하는 발신번호 인증 필수 발송 API. */ | |
| 25 | +@RestController | |
| 26 | +public class MsgAuthenticatedSendRestController { | |
| 27 | + | |
| 28 | + @Resource(name = "MjonMsgDataService") | |
| 29 | + private MjonMsgDataService mjonMsgDataService; | |
| 30 | + | |
| 31 | + @Resource(name = "MsgSenderAuthService") | |
| 32 | + private MsgSenderAuthService msgSenderAuthService; | |
| 33 | + | |
| 34 | + @RequestMapping(value = "/web/mjon/msgdata/sendMsgDataAuthenticatedAjax_advc.do", method = RequestMethod.POST) | |
| 35 | + public ResponseEntity<StatusResponse> send(@RequestBody MjonMsgVO mjonMsgVO, HttpServletRequest request) throws Exception { | |
| 36 | + LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated() ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; | |
| 37 | + String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); | |
| 38 | + if (StringUtils.isBlank(userId)) { | |
| 39 | + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.UNAUTHORIZED, "로그인 후 이용해 주세요.", LocalDateTime.now())); | |
| 40 | + } | |
| 41 | + | |
| 42 | + try { | |
| 43 | + if (!msgSenderAuthService.isVerified(userId, mjonMsgVO.getCallFrom(), request.getSession(false))) { | |
| 44 | + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.PRECONDITION_FAILED, "발신번호 인증이 필요합니다.", "SENDER_AUTH_REQUIRED", LocalDateTime.now())); | |
| 45 | + } | |
| 46 | + } catch (IllegalArgumentException e) { | |
| 47 | + return ResponseEntity.ok().body(new StatusResponse(HttpStatus.BAD_REQUEST, e.getMessage(), LocalDateTime.now())); | |
| 48 | + } | |
| 49 | + | |
| 50 | + return ResponseEntity.ok().body(mjonMsgDataService.sendMsgData_advc(mjonMsgVO, request)); | |
| 51 | + } | |
| 52 | +} |
+++ src/main/java/itn/let/mjo/msgdata/web/MsgSenderAuthRestController.java
... | ... | @@ -0,0 +1,63 @@ |
| 1 | +package itn.let.mjo.msgdata.web; | |
| 2 | + | |
| 3 | +import javax.annotation.Resource; | |
| 4 | +import javax.servlet.http.HttpServletRequest; | |
| 5 | +import javax.servlet.http.HttpSession; | |
| 6 | + | |
| 7 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 10 | +import org.springframework.web.bind.annotation.RestController; | |
| 11 | + | |
| 12 | +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; | |
| 13 | +import itn.com.cmm.LoginVO; | |
| 14 | +import itn.com.utl.response.ApiResponse; | |
| 15 | +import itn.let.mjo.msgdata.service.MsgSenderAuthService; | |
| 16 | +import itn.let.mjo.msgdata.service.SenderAuthRequest; | |
| 17 | +import itn.let.mjo.msgdata.service.SenderAuthResult; | |
| 18 | + | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("/web/mjon/msgdata/sender-auth") | |
| 21 | +public class MsgSenderAuthRestController { | |
| 22 | + | |
| 23 | + @Resource(name = "MsgSenderAuthService") | |
| 24 | + private MsgSenderAuthService msgSenderAuthService; | |
| 25 | + | |
| 26 | + @RequestMapping(value = "/status.do", method = RequestMethod.POST) | |
| 27 | + public ApiResponse<SenderAuthResult> status(@RequestBody SenderAuthRequest authRequest, HttpSession session) { | |
| 28 | + try { | |
| 29 | + return ApiResponse.success(msgSenderAuthService.getStatus(getUserId(), authRequest.getCallFrom(), session)); | |
| 30 | + } catch (Exception e) { | |
| 31 | + return ApiResponse.fail(e.getMessage()); | |
| 32 | + } | |
| 33 | + } | |
| 34 | + | |
| 35 | + @RequestMapping(value = "/code.do", method = RequestMethod.POST) | |
| 36 | + public ApiResponse<SenderAuthResult> sendCode(@RequestBody SenderAuthRequest authRequest, HttpSession session, HttpServletRequest request) { | |
| 37 | + try { | |
| 38 | + return ApiResponse.success(msgSenderAuthService.sendCode(getUserId(), authRequest.getCallFrom(), session, request), "인증번호가 발송되었습니다."); | |
| 39 | + } catch (Exception e) { | |
| 40 | + return ApiResponse.fail(e.getMessage()); | |
| 41 | + } | |
| 42 | + } | |
| 43 | + | |
| 44 | + @RequestMapping(value = "/verify.do", method = RequestMethod.POST) | |
| 45 | + public ApiResponse<SenderAuthResult> verify(@RequestBody SenderAuthRequest authRequest, HttpSession session) { | |
| 46 | + try { | |
| 47 | + return ApiResponse.success(msgSenderAuthService.verifyCode(getUserId(), authRequest.getCallFrom(), authRequest.getCode(), session), "발신번호 인증이 완료되었습니다."); | |
| 48 | + } catch (Exception e) { | |
| 49 | + return ApiResponse.fail(e.getMessage()); | |
| 50 | + } | |
| 51 | + } | |
| 52 | + | |
| 53 | + private String getUserId() { | |
| 54 | + if (!EgovUserDetailsHelper.isAuthenticated()) { | |
| 55 | + throw new IllegalStateException("로그인 후 이용해 주세요."); | |
| 56 | + } | |
| 57 | + LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); | |
| 58 | + if (user == null || user.getId() == null || user.getId().isEmpty()) { | |
| 59 | + throw new IllegalStateException("로그인 정보를 확인할 수 없습니다."); | |
| 60 | + } | |
| 61 | + return user.getId(); | |
| 62 | + } | |
| 63 | +} |
--- src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
+++ src/main/java/itn/let/mjo/msgsent/service/MjonMsgSentVO.java
... | ... | @@ -108,5 +108,8 @@ |
| 108 | 108 |
// 결과 리스트 select 할 떄 |
| 109 | 109 |
// TIMESTAMPDIFF(minute, DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %T'), DATE_FORMAT(NOW(), '%Y-%m-%d %T')) as diffMin |
| 110 | 110 |
private int diffMin; |
| 111 |
- |
|
| 111 |
+ |
|
| 112 |
+ private String apiAprvYn; |
|
| 113 |
+ private String apiAprvDt; |
|
| 114 |
+ |
|
| 112 | 115 |
} |
--- src/main/java/itn/let/schdlr/service/SchedulerUtil.java
+++ src/main/java/itn/let/schdlr/service/SchedulerUtil.java
... | ... | @@ -38,6 +38,7 @@ |
| 38 | 38 |
import itn.let.mjo.pay.service.MjonPayVO; |
| 39 | 39 |
import itn.let.sts.com.StatsVO; |
| 40 | 40 |
import itn.let.sts.cst.service.EgovConectStatsService; |
| 41 |
+import itn.let.uat.uia.service.SecondAuthMethodLogService; |
|
| 41 | 42 |
import itn.let.uss.umt.service.EgovUserManageService; |
| 42 | 43 |
import itn.let.utl.user.service.MjonNoticeSendUtil; |
| 43 | 44 |
import net.javacrumbs.shedlock.core.LockProvider; |
... | ... | @@ -87,6 +88,9 @@ |
| 87 | 88 |
|
| 88 | 89 |
@Resource(name="MjonMsgDataDAO") |
| 89 | 90 |
private MjonMsgDataDAO mjonMsgDataDAO; |
| 91 |
+ |
|
| 92 |
+ @Resource(name = "secondAuthMethodLogService") |
|
| 93 |
+ private SecondAuthMethodLogService secondAuthMethodLogService; |
|
| 90 | 94 |
|
| 91 | 95 |
@Resource(name="kakaoAlimTalkService") |
| 92 | 96 |
private KakaoAlimTalkService kakaoAlimTalkService; |
+++ src/main/java/itn/let/sym/log/access/UserAccessLogService.java
... | ... | @@ -0,0 +1,5 @@ |
| 1 | +package itn.let.sym.log.access; | |
| 2 | + | |
| 3 | +public interface UserAccessLogService { | |
| 4 | + void insertUserAccessLog(UserAccessLogVO userAccessLogVO) throws Exception; | |
| 5 | +} |
+++ src/main/java/itn/let/sym/log/access/UserAccessLogVO.java
... | ... | @@ -0,0 +1,18 @@ |
| 1 | +package itn.let.sym.log.access; | |
| 2 | + | |
| 3 | +import lombok.Getter; | |
| 4 | +import lombok.NoArgsConstructor; | |
| 5 | +import lombok.Setter; | |
| 6 | + | |
| 7 | +@Getter | |
| 8 | +@Setter | |
| 9 | +@NoArgsConstructor | |
| 10 | +public class UserAccessLogVO { | |
| 11 | + private String logId; | |
| 12 | + private String userId; | |
| 13 | + private String accessIp; | |
| 14 | + private String menuNm; | |
| 15 | + private String uri; | |
| 16 | + private String result; | |
| 17 | + private String frstRegistPnttm; | |
| 18 | +} |
+++ src/main/java/itn/let/sym/log/access/service/UserAccessLogDAO.java
... | ... | @@ -0,0 +1,12 @@ |
| 1 | +package itn.let.sym.log.access.service; | |
| 2 | + | |
| 3 | +import itn.com.cmm.service.impl.EgovComAbstractDAO; | |
| 4 | +import itn.let.sym.log.access.UserAccessLogVO; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +@Repository("userAccessLogDAO") | |
| 8 | +public class UserAccessLogDAO extends EgovComAbstractDAO { | |
| 9 | + public void insertUserAccessLog(UserAccessLogVO userAccessLogVO) throws Exception{ | |
| 10 | + insert("userAccessLogDAO.insertUserAccessLog", userAccessLogVO); | |
| 11 | + } | |
| 12 | +} |
+++ src/main/java/itn/let/sym/log/access/service/UserAccessLogServiceImpl.java
... | ... | @@ -0,0 +1,24 @@ |
| 1 | +package itn.let.sym.log.access.service; | |
| 2 | + | |
| 3 | +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
| 4 | +import egovframework.rte.fdl.idgnr.EgovIdGnrService; | |
| 5 | +import itn.let.sym.log.access.UserAccessLogService; | |
| 6 | +import itn.let.sym.log.access.UserAccessLogVO; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +import javax.annotation.Resource; | |
| 10 | + | |
| 11 | +@Service(value = "userAccessLogService") | |
| 12 | +public class UserAccessLogServiceImpl extends EgovAbstractServiceImpl implements UserAccessLogService { | |
| 13 | + | |
| 14 | + @Resource(name = "userAccessLogDAO") | |
| 15 | + private UserAccessLogDAO userAccessLogDAO; | |
| 16 | + | |
| 17 | + @Resource(name = "egovUserAccessLogIdGnrService") | |
| 18 | + private EgovIdGnrService idGenService; | |
| 19 | + @Override | |
| 20 | + public void insertUserAccessLog(UserAccessLogVO userAccessLogVO) throws Exception { | |
| 21 | + userAccessLogVO.setLogId(idGenService.getNextStringId()); | |
| 22 | + userAccessLogDAO.insertUserAccessLog(userAccessLogVO); | |
| 23 | + } | |
| 24 | +} |
--- src/main/java/itn/let/sym/mnu/mpm/service/EgovMenuManageService.java
+++ src/main/java/itn/let/sym/mnu/mpm/service/EgovMenuManageService.java
... | ... | @@ -170,5 +170,5 @@ |
| 170 | 170 |
|
| 171 | 171 |
MenuManageVO selectMenuManageUrl(MenuManageVO tempMenuManageVO) throws Exception; |
| 172 | 172 |
|
| 173 |
- |
|
| 173 |
+ String selectAnonymousMenuNmByUrl(String requestUri) throws Exception; |
|
| 174 | 174 |
}(No newline at end of file) |
--- src/main/java/itn/let/sym/mnu/mpm/service/impl/EgovMenuManageServiceImpl.java
+++ src/main/java/itn/let/sym/mnu/mpm/service/impl/EgovMenuManageServiceImpl.java
... | ... | @@ -67,6 +67,10 @@ |
| 67 | 67 |
return menuManageDAO.selectMenuManage(vo); |
| 68 | 68 |
} |
| 69 | 69 |
|
| 70 |
+ public String selectAnonymousMenuNmByUrl(String uri) throws Exception {
|
|
| 71 |
+ return menuManageDAO.selectAnonymousMenuNmByUrl(uri); |
|
| 72 |
+ } |
|
| 73 |
+ |
|
| 70 | 74 |
/** |
| 71 | 75 |
* 만족도 관리 여부를 위한 메뉴 상세정보를 조회 |
| 72 | 76 |
* @param vo ComDefaultVO |
--- src/main/java/itn/let/sym/mnu/mpm/service/impl/MenuManageDAO.java
+++ src/main/java/itn/let/sym/mnu/mpm/service/impl/MenuManageDAO.java
... | ... | @@ -39,6 +39,9 @@ |
| 39 | 39 |
public List<?> selectMenuManageList(ComDefaultVO vo) throws Exception{
|
| 40 | 40 |
return list("menuManageDAO.selectMenuManageList_D", vo);
|
| 41 | 41 |
} |
| 42 |
+ public String selectAnonymousMenuNmByUrl(String uri) {
|
|
| 43 |
+ return (String) select("menuManageDAO.selectAnonymousMenuNmByUrl", uri);
|
|
| 44 |
+ } |
|
| 42 | 45 |
|
| 43 | 46 |
/** |
| 44 | 47 |
* 만족도 여부를 위한 메뉴목록을 조회 |
... | ... | @@ -248,4 +251,6 @@ |
| 248 | 251 |
public MenuManageVO selectMenuManageUrl(MenuManageVO menuManageVO) throws Exception{
|
| 249 | 252 |
return (MenuManageVO)select("menuManageDAO.selectMenuManageUrl", menuManageVO);
|
| 250 | 253 |
} |
| 254 |
+ |
|
| 255 |
+ |
|
| 251 | 256 |
}(No newline at end of file) |
--- src/main/java/itn/let/sym/site/service/SiteManagerVO.java
+++ src/main/java/itn/let/sym/site/service/SiteManagerVO.java
... | ... | @@ -64,10 +64,39 @@ |
| 64 | 64 |
private String sessionTimeUserCdTxt; //세션타임 사용자 코드 텍스트 |
| 65 | 65 |
private String sysMaintenance; //점검중페이지 노출여부 |
| 66 | 66 |
private String sysMaintenanceIp; //점검중페이지제외IP |
| 67 |
- |
|
| 67 |
+ private String operationStartTime; //운영시간 시작 (HH:mm, DB 기본값 : 09:30) |
|
| 68 |
+ private String operationEndTime; //운영시간 종료 (HH:mm, DB 기본값 : 18:30) |
|
| 69 |
+ private String lunchStartTime; //점심시간 시작 (HH:mm, DB 기본값 : 13:00) |
|
| 70 |
+ private String lunchEndTime; //점심시간 종료 (HH:mm, DB 기본값 : 14:00) |
|
| 71 |
+ |
|
| 68 | 72 |
public static long getSerialversionuid() {
|
| 69 | 73 |
return serialVersionUID; |
| 70 | 74 |
} |
| 75 |
+ |
|
| 76 |
+ public String getOperationStartTime() {
|
|
| 77 |
+ return operationStartTime; |
|
| 78 |
+ } |
|
| 79 |
+ public void setOperationStartTime(String operationStartTime) {
|
|
| 80 |
+ this.operationStartTime = operationStartTime; |
|
| 81 |
+ } |
|
| 82 |
+ public String getOperationEndTime() {
|
|
| 83 |
+ return operationEndTime; |
|
| 84 |
+ } |
|
| 85 |
+ public void setOperationEndTime(String operationEndTime) {
|
|
| 86 |
+ this.operationEndTime = operationEndTime; |
|
| 87 |
+ } |
|
| 88 |
+ public String getLunchStartTime() {
|
|
| 89 |
+ return lunchStartTime; |
|
| 90 |
+ } |
|
| 91 |
+ public void setLunchStartTime(String lunchStartTime) {
|
|
| 92 |
+ this.lunchStartTime = lunchStartTime; |
|
| 93 |
+ } |
|
| 94 |
+ public String getLunchEndTime() {
|
|
| 95 |
+ return lunchEndTime; |
|
| 96 |
+ } |
|
| 97 |
+ public void setLunchEndTime(String lunchEndTime) {
|
|
| 98 |
+ this.lunchEndTime = lunchEndTime; |
|
| 99 |
+ } |
|
| 71 | 100 |
|
| 72 | 101 |
public String getSiteId() {
|
| 73 | 102 |
return siteId; |
--- src/main/java/itn/let/uat/uia/service/EgovLoginService.java
+++ src/main/java/itn/let/uat/uia/service/EgovLoginService.java
... | ... | @@ -121,4 +121,7 @@ |
| 121 | 121 |
//비밀번호 실패 횟수 조회 |
| 122 | 122 |
public LoginVO selectPassMiss(LoginVO vo) throws Exception; |
| 123 | 123 |
|
| 124 |
+ LoginVO findMemberByStatus(String id, String password, String userIp, String statusCode) throws Exception; |
|
| 125 |
+ |
|
| 126 |
+ String validateLoginResult(LoginVO loginVO, LoginVO resultVO, String userIp) throws Exception ; |
|
| 124 | 127 |
} |
+++ src/main/java/itn/let/uat/uia/service/SecondAuthLogService.java
... | ... | @@ -0,0 +1,21 @@ |
| 1 | +package itn.let.uat.uia.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +public interface SecondAuthLogService { | |
| 6 | + public void insertSecondAuthsLog(SecondAuthLogVO logVO) throws Exception; | |
| 7 | + | |
| 8 | + public void deleteSecondAuthLog(SecondAuthLogVO logVO) throws Exception; | |
| 9 | + | |
| 10 | + public SecondAuthLogVO selectSecondAuthLog(SecondAuthLogVO logVO) throws Exception; | |
| 11 | + | |
| 12 | + public int selectSecondAuthLogCnt(SecondAuthLogVO logVO) throws Exception; | |
| 13 | + | |
| 14 | + public List<SecondAuthLogVO> selectSecondAuthLogList(SecondAuthLogVO logVO) throws Exception; | |
| 15 | + | |
| 16 | + public int selectFailureCountSinceReset(SecondAuthLogVO logVO) throws Exception; | |
| 17 | + | |
| 18 | + public boolean isSecondAuthLocked(SecondAuthLogVO logVO) throws Exception; | |
| 19 | + | |
| 20 | + public int selectSecondAuthLockRemainingSeconds(SecondAuthLogVO logVO) throws Exception; | |
| 21 | +} |
+++ src/main/java/itn/let/uat/uia/service/SecondAuthLogVO.java
... | ... | @@ -0,0 +1,33 @@ |
| 1 | +package itn.let.uat.uia.service; | |
| 2 | + | |
| 3 | +import itn.com.utl.page.BasePageableVO; | |
| 4 | +import lombok.Getter; | |
| 5 | +import lombok.NoArgsConstructor; | |
| 6 | +import lombok.Setter; | |
| 7 | + | |
| 8 | +@Getter | |
| 9 | +@Setter | |
| 10 | +@NoArgsConstructor | |
| 11 | +public class SecondAuthLogVO extends BasePageableVO { | |
| 12 | + // log PK | |
| 13 | + private String logId; | |
| 14 | + // SUCCESS, FAIL | |
| 15 | + private String loginResult; | |
| 16 | + // 1차, 2차 | |
| 17 | + private String authStep; | |
| 18 | + // TRY Login ID | |
| 19 | + private String tryLoginId; | |
| 20 | + private String reason; | |
| 21 | + // IP, UserAgent | |
| 22 | + private String accessIp; | |
| 23 | + private String userAgent; | |
| 24 | + | |
| 25 | + // 2차 인증 | |
| 26 | + private String msgId; | |
| 27 | + // 입력한 2차 인증번호 | |
| 28 | + private String resultCode; | |
| 29 | + // 전화번호 | |
| 30 | + private String receive; | |
| 31 | + | |
| 32 | + private String frstRegistPnttm; | |
| 33 | +} |
+++ src/main/java/itn/let/uat/uia/service/SecondAuthMethodLogConstants.java
... | ... | @@ -0,0 +1,15 @@ |
| 1 | +package itn.let.uat.uia.service; | |
| 2 | + | |
| 3 | +public final class SecondAuthMethodLogConstants { | |
| 4 | + | |
| 5 | + public static final String ACTION_REGISTER = "REGISTER"; | |
| 6 | + public static final String ACTION_UPDATE = "UPDATE"; | |
| 7 | + public static final String ACTION_DELETE = "DELETE"; | |
| 8 | + | |
| 9 | + public static final String VERIFY_SMS = "SMS"; | |
| 10 | + public static final String VERIFY_KMC = "KMC"; | |
| 11 | + public static final String VERIFY_INFO_CHANGE = "INFO_CHANGE"; | |
| 12 | + | |
| 13 | + private SecondAuthMethodLogConstants() { | |
| 14 | + } | |
| 15 | +} |
+++ src/main/java/itn/let/uat/uia/service/SecondAuthMethodLogService.java
... | ... | @@ -0,0 +1,13 @@ |
| 1 | +package itn.let.uat.uia.service; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +public interface SecondAuthMethodLogService { | |
| 6 | + void insertSecondAuthMethodLog(SecondAuthMethodLogVO logVO) throws Exception; | |
| 7 | + | |
| 8 | + int selectSecondAuthMethodLogCnt(SecondAuthMethodLogVO logVO) throws Exception; | |
| 9 | + | |
| 10 | + List<SecondAuthMethodLogVO> selectSecondAuthMethodLogList(SecondAuthMethodLogVO logVO) throws Exception; | |
| 11 | + | |
| 12 | + int deleteExpiredSecondAuthMethodLogs() throws Exception; | |
| 13 | +} |
+++ src/main/java/itn/let/uat/uia/service/SecondAuthMethodLogVO.java
... | ... | @@ -0,0 +1,20 @@ |
| 1 | +package itn.let.uat.uia.service; | |
| 2 | + | |
| 3 | + | |
| 4 | +import itn.com.utl.page.BasePageableVO; | |
| 5 | +import lombok.Getter; | |
| 6 | +import lombok.NoArgsConstructor; | |
| 7 | +import lombok.Setter; | |
| 8 | + | |
| 9 | +@Getter | |
| 10 | +@Setter | |
| 11 | +@NoArgsConstructor | |
| 12 | +public class SecondAuthMethodLogVO extends BasePageableVO { | |
| 13 | + private String logId; | |
| 14 | + private String mberId; | |
| 15 | + private String actionType; | |
| 16 | + private String phoneNo; | |
| 17 | + private String verifyType; | |
| 18 | + private String accessIp; | |
| 19 | + private String frstRegistPnttm; | |
| 20 | +} |
--- src/main/java/itn/let/uat/uia/service/impl/EgovLoginServiceImpl.java
+++ src/main/java/itn/let/uat/uia/service/impl/EgovLoginServiceImpl.java
... | ... | @@ -7,6 +7,8 @@ |
| 7 | 7 |
import javax.annotation.Resource; |
| 8 | 8 |
import javax.servlet.http.HttpServletRequest; |
| 9 | 9 |
|
| 10 |
+import itn.com.uss.olh.hpc.service.HackIpService; |
|
| 11 |
+import itn.com.uss.olh.hpc.service.HackIpVO; |
|
| 10 | 12 |
import org.springframework.stereotype.Service; |
| 11 | 13 |
import org.springframework.ui.ModelMap; |
| 12 | 14 |
|
... | ... | @@ -26,12 +28,10 @@ |
| 26 | 28 |
|
| 27 | 29 |
/** |
| 28 | 30 |
* 일반 로그인, 인증서 로그인을 처리하는 비즈니스 구현 클래스 |
| 29 |
- * @author 공통서비스 개발팀 박지욱 |
|
| 30 |
- * @since 2009.03.06 |
|
| 31 |
- * @version 1.0 |
|
| 32 |
- * @see |
|
| 33 | 31 |
* |
| 34 |
- * <pre> |
|
| 32 |
+ * @author 공통서비스 개발팀 박지욱 |
|
| 33 |
+ * @version 1.0 |
|
| 34 |
+ * @see <pre> |
|
| 35 | 35 |
* << 개정이력(Modification Information) >> |
| 36 | 36 |
* |
| 37 | 37 |
* 수정일 수정자 수정내용 |
... | ... | @@ -40,291 +40,345 @@ |
| 40 | 40 |
* 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성 |
| 41 | 41 |
* |
| 42 | 42 |
* </pre> |
| 43 |
+ * @since 2009.03.06 |
|
| 43 | 44 |
*/ |
| 44 | 45 |
@Service("loginService")
|
| 45 | 46 |
public class EgovLoginServiceImpl extends EgovAbstractServiceImpl implements |
| 46 | 47 |
EgovLoginService {
|
| 47 | 48 |
|
| 48 |
- @Resource(name="loginDAO") |
|
| 49 |
+ @Resource(name = "loginDAO") |
|
| 49 | 50 |
private LoginDAO loginDAO; |
| 50 | 51 |
|
| 51 | 52 |
@Resource(name = "egovMjonLoginLogIdGnrService") |
| 52 |
- private EgovIdGnrService loginLogIdService; |
|
| 53 |
- |
|
| 54 |
- ///** EgovSndngMailRegistService */ |
|
| 55 |
- //@Resource(name = "sndngMailRegistService") |
|
| 56 |
- //private EgovSndngMailRegistService sndngMailRegistService; |
|
| 53 |
+ private EgovIdGnrService loginLogIdService; |
|
| 57 | 54 |
|
| 58 |
- |
|
| 55 |
+ @Resource(name = "hackIpService") |
|
| 56 |
+ private HackIpService hackIpService; |
|
| 57 |
+ |
|
| 59 | 58 |
/** |
| 60 |
- * 일반 로그인을 처리한다 |
|
| 61 |
- * @param vo LoginVO |
|
| 62 |
- * @return LoginVO |
|
| 63 |
- * @exception Exception |
|
| 64 |
- */ |
|
| 59 |
+ * 일반 로그인을 처리한다 |
|
| 60 |
+ * |
|
| 61 |
+ * @param vo LoginVO |
|
| 62 |
+ * @return LoginVO |
|
| 63 |
+ * @throws Exception |
|
| 64 |
+ */ |
|
| 65 | 65 |
@Override |
| 66 |
- public LoginVO actionLogin(LoginVO vo) throws Exception {
|
|
| 66 |
+ public LoginVO actionLogin(LoginVO vo) throws Exception {
|
|
| 67 | 67 |
|
| 68 |
- // 1. 입력한 비밀번호를 암호화한다. |
|
| 69 |
- String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 70 |
- vo.setPassword(enpassword); |
|
| 68 |
+ // 1. 입력한 비밀번호를 암호화한다. |
|
| 69 |
+ String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 70 |
+ vo.setPassword(enpassword); |
|
| 71 | 71 |
|
| 72 |
- // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 73 |
- LoginVO loginVO = loginDAO.actionLogin(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 72 |
+ // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 73 |
+ LoginVO loginVO = loginDAO.actionLogin(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 74 | 74 |
|
| 75 |
- // 3. 결과를 리턴한다. |
|
| 76 |
- if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 77 |
- return loginVO; |
|
| 78 |
- } else {
|
|
| 79 |
- loginVO = new LoginVO(); |
|
| 80 |
- } |
|
| 75 |
+ // 3. 결과를 리턴한다. |
|
| 76 |
+ if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 77 |
+ return loginVO; |
|
| 78 |
+ } else {
|
|
| 79 |
+ loginVO = new LoginVO(); |
|
| 80 |
+ } |
|
| 81 | 81 |
|
| 82 |
- return loginVO; |
|
| 82 |
+ return loginVO; |
|
| 83 | 83 |
} |
| 84 |
- |
|
| 85 |
- |
|
| 84 |
+ |
|
| 85 |
+ |
|
| 86 | 86 |
//관리자 사용자 정보 팝업에서 해당 사용자로 로그인 처리하는 서비스 |
| 87 | 87 |
@Override |
| 88 |
- public LoginVO actionLoginAdmToUsr(LoginVO vo) throws Exception {
|
|
| 88 |
+ public LoginVO actionLoginAdmToUsr(LoginVO vo) throws Exception {
|
|
| 89 | 89 |
|
| 90 |
- // 1. 관리자가 사용자 계정으로 로그인하는 것으로 암호화된 비밀번호를 디비에서 조회해서 로그인 처리를 하므로 암호화가 필요 없다. |
|
| 91 |
- //String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 92 |
- //vo.setPassword(enpassword); |
|
| 90 |
+ // 1. 관리자가 사용자 계정으로 로그인하는 것으로 암호화된 비밀번호를 디비에서 조회해서 로그인 처리를 하므로 암호화가 필요 없다. |
|
| 91 |
+ //String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 92 |
+ //vo.setPassword(enpassword); |
|
| 93 | 93 |
|
| 94 |
- // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 95 |
- LoginVO loginVO = loginDAO.actionLogin(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 94 |
+ // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 95 |
+ LoginVO loginVO = loginDAO.actionLogin(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 96 | 96 |
|
| 97 |
- // 3. 결과를 리턴한다. |
|
| 98 |
- if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 99 |
- return loginVO; |
|
| 100 |
- } else {
|
|
| 101 |
- loginVO = new LoginVO(); |
|
| 102 |
- } |
|
| 97 |
+ // 3. 결과를 리턴한다. |
|
| 98 |
+ if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 99 |
+ return loginVO; |
|
| 100 |
+ } else {
|
|
| 101 |
+ loginVO = new LoginVO(); |
|
| 102 |
+ } |
|
| 103 | 103 |
|
| 104 |
- return loginVO; |
|
| 104 |
+ return loginVO; |
|
| 105 | 105 |
} |
| 106 |
- |
|
| 106 |
+ |
|
| 107 | 107 |
@Override |
| 108 |
- public LoginVO actionSnsLogin(LoginVO vo) throws Exception {
|
|
| 109 |
- // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 110 |
- LoginVO loginVO = loginDAO.actionLogin(vo); |
|
| 108 |
+ public LoginVO actionSnsLogin(LoginVO vo) throws Exception {
|
|
| 109 |
+ // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 110 |
+ LoginVO loginVO = loginDAO.actionLogin(vo); |
|
| 111 | 111 |
|
| 112 |
- // 3. 결과를 리턴한다. |
|
| 113 |
- if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 114 |
- return loginVO; |
|
| 115 |
- } else {
|
|
| 116 |
- loginVO = new LoginVO(); |
|
| 117 |
- } |
|
| 112 |
+ // 3. 결과를 리턴한다. |
|
| 113 |
+ if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 114 |
+ return loginVO; |
|
| 115 |
+ } else {
|
|
| 116 |
+ loginVO = new LoginVO(); |
|
| 117 |
+ } |
|
| 118 | 118 |
|
| 119 |
- return loginVO; |
|
| 120 |
- } |
|
| 121 |
- |
|
| 119 |
+ return loginVO; |
|
| 120 |
+ } |
|
| 121 |
+ |
|
| 122 | 122 |
|
| 123 | 123 |
/** |
| 124 |
- * 등록된 SNS 수량을 조회한다. |
|
| 125 |
- * @param vo LoginVO |
|
| 126 |
- * @return LoginVO |
|
| 127 |
- * @exception Exception |
|
| 128 |
- */ |
|
| 129 |
- @Override |
|
| 130 |
- public int selectSnsIdCount(LoginVO vo) throws Exception {
|
|
| 131 |
- return loginDAO.selectSnsIdCount(vo); |
|
| 132 |
- } |
|
| 133 |
- |
|
| 134 |
- /** |
|
| 135 |
- * 등록된 SNS 아이티를 조회 한다. |
|
| 136 |
- * @param vo LoginVO |
|
| 137 |
- * @return LoginVO |
|
| 138 |
- * @exception Exception |
|
| 139 |
- */ |
|
| 140 |
- @Override |
|
| 141 |
- public LoginVO selectSnsId(LoginVO vo) throws Exception {
|
|
| 142 |
- return loginDAO.selectSnsId(vo); |
|
| 143 |
- } |
|
| 144 |
- |
|
| 145 |
- @Override |
|
| 146 |
- public void updateSnsLink(LoginVO vo) throws Exception {
|
|
| 147 |
- loginDAO.updateSnsLink(vo); |
|
| 148 |
- } |
|
| 149 |
- |
|
| 150 |
- /** |
|
| 151 |
- * 아이디를 찾는다. |
|
| 152 |
- * @param vo LoginVO |
|
| 153 |
- * @return LoginVO |
|
| 154 |
- * @exception Exception |
|
| 155 |
- */ |
|
| 124 |
+ * 등록된 SNS 수량을 조회한다. |
|
| 125 |
+ * |
|
| 126 |
+ * @param vo LoginVO |
|
| 127 |
+ * @return LoginVO |
|
| 128 |
+ * @throws Exception |
|
| 129 |
+ */ |
|
| 156 | 130 |
@Override |
| 157 |
- public LoginVO searchId(LoginVO vo) throws Exception {
|
|
| 158 |
- |
|
| 159 |
- // 1. 이름, 이메일주소가 DB와 일치하는 사용자 ID를 조회한다. |
|
| 160 |
- LoginVO loginVO = loginDAO.searchId(vo); |
|
| 161 |
- |
|
| 162 |
- // 2. 결과를 리턴한다. |
|
| 163 |
- if (loginVO != null && !loginVO.getId().equals("")) {
|
|
| 164 |
- return loginVO; |
|
| 165 |
- } else {
|
|
| 166 |
- loginVO = new LoginVO(); |
|
| 167 |
- } |
|
| 168 |
- |
|
| 169 |
- return loginVO; |
|
| 131 |
+ public int selectSnsIdCount(LoginVO vo) throws Exception {
|
|
| 132 |
+ return loginDAO.selectSnsIdCount(vo); |
|
| 170 | 133 |
} |
| 171 | 134 |
|
| 172 | 135 |
/** |
| 173 |
- * 비밀번호를 찾는다. |
|
| 174 |
- * @param vo LoginVO |
|
| 175 |
- * @return boolean |
|
| 176 |
- * @exception Exception |
|
| 177 |
- */ |
|
| 136 |
+ * 등록된 SNS 아이티를 조회 한다. |
|
| 137 |
+ * |
|
| 138 |
+ * @param vo LoginVO |
|
| 139 |
+ * @return LoginVO |
|
| 140 |
+ * @throws Exception |
|
| 141 |
+ */ |
|
| 178 | 142 |
@Override |
| 179 |
- public boolean searchPassword(LoginVO vo) throws Exception {
|
|
| 180 |
- |
|
| 181 |
- boolean result = true; |
|
| 182 |
- |
|
| 183 |
- // 1. 아이디, 이름, 이메일주소, 비밀번호 힌트, 비밀번호 정답이 DB와 일치하는 사용자 Password를 조회한다. |
|
| 184 |
- LoginVO loginVO = loginDAO.searchPassword(vo); |
|
| 185 |
- if (loginVO == null || loginVO.getPassword() == null || loginVO.getPassword().equals("")) {
|
|
| 186 |
- return false; |
|
| 187 |
- } |
|
| 188 |
- |
|
| 189 |
- // 2. 임시 비밀번호를 생성한다.(영+영+숫+영+영+숫=6자리) |
|
| 190 |
- String newpassword = ""; |
|
| 191 |
- for (int i = 1; i <= 6; i++) {
|
|
| 192 |
- // 영자 |
|
| 193 |
- if (i % 3 != 0) {
|
|
| 194 |
- newpassword += EgovStringUtil.getRandomStr('a', 'z');
|
|
| 195 |
- // 숫자 |
|
| 196 |
- } else {
|
|
| 197 |
- newpassword += EgovNumberUtil.getRandomNum(0, 9); |
|
| 198 |
- } |
|
| 199 |
- } |
|
| 200 |
- |
|
| 201 |
- // 3. 임시 비밀번호를 암호화하여 DB에 저장한다. |
|
| 202 |
- LoginVO pwVO = new LoginVO(); |
|
| 203 |
- String enpassword = EgovFileScrty.encryptPassword(newpassword, vo.getId()); |
|
| 204 |
- pwVO.setId(vo.getId()); |
|
| 205 |
- pwVO.setPassword(enpassword); |
|
| 206 |
- pwVO.setUserSe(vo.getUserSe()); |
|
| 207 |
- loginDAO.updatePassword(pwVO); |
|
| 208 |
- |
|
| 209 |
- // 4. 임시 비밀번호를 이메일 발송한다.(메일연동솔루션 활용) |
|
| 210 |
- //SndngMailVO sndngMailVO = new SndngMailVO(); |
|
| 211 |
- //sndngMailVO.setDsptchPerson("webmaster");
|
|
| 212 |
- //sndngMailVO.setRecptnPerson(vo.getEmail()); |
|
| 213 |
- //sndngMailVO.setSj("[MOPAS] 임시 비밀번호를 발송했습니다.");
|
|
| 214 |
- //sndngMailVO.setEmailCn("고객님의 임시 비밀번호는 " + newpassword + " 입니다.");
|
|
| 215 |
- //sndngMailVO.setAtchFileId("");
|
|
| 216 |
- |
|
| 217 |
- //result = sndngMailRegistService.insertSndngMail(sndngMailVO); |
|
| 218 |
- |
|
| 219 |
- return result; |
|
| 143 |
+ public LoginVO selectSnsId(LoginVO vo) throws Exception {
|
|
| 144 |
+ return loginDAO.selectSnsId(vo); |
|
| 220 | 145 |
} |
| 221 | 146 |
|
| 222 |
- @Override |
|
| 223 |
- public LoginVO getUserAuth(LoginVO resultVO) throws Exception {
|
|
| 224 |
- return loginDAO.getUserAuth(resultVO); |
|
| 225 |
- } |
|
| 147 |
+ @Override |
|
| 148 |
+ public void updateSnsLink(LoginVO vo) throws Exception {
|
|
| 149 |
+ loginDAO.updateSnsLink(vo); |
|
| 150 |
+ } |
|
| 226 | 151 |
|
| 227 |
- @Override |
|
| 228 |
- public LoginVO siteActionLogin(LoginVO vo) throws Exception {
|
|
| 229 |
- // 1. 입력한 비밀번호를 암호화한다. |
|
| 230 |
- String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 231 |
- vo.setPassword(enpassword); |
|
| 152 |
+ /** |
|
| 153 |
+ * 아이디를 찾는다. |
|
| 154 |
+ * |
|
| 155 |
+ * @param vo LoginVO |
|
| 156 |
+ * @return LoginVO |
|
| 157 |
+ * @throws Exception |
|
| 158 |
+ */ |
|
| 159 |
+ @Override |
|
| 160 |
+ public LoginVO searchId(LoginVO vo) throws Exception {
|
|
| 232 | 161 |
|
| 233 |
- // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 234 |
- LoginVO loginVO = loginDAO.siteActionLogin(vo); |
|
| 162 |
+ // 1. 이름, 이메일주소가 DB와 일치하는 사용자 ID를 조회한다. |
|
| 163 |
+ LoginVO loginVO = loginDAO.searchId(vo); |
|
| 235 | 164 |
|
| 236 |
- // 3. 결과를 리턴한다. |
|
| 237 |
- if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 238 |
- return loginVO; |
|
| 239 |
- } else {
|
|
| 240 |
- loginVO = new LoginVO(); |
|
| 241 |
- } |
|
| 165 |
+ // 2. 결과를 리턴한다. |
|
| 166 |
+ if (loginVO != null && !loginVO.getId().equals("")) {
|
|
| 167 |
+ return loginVO; |
|
| 168 |
+ } else {
|
|
| 169 |
+ loginVO = new LoginVO(); |
|
| 170 |
+ } |
|
| 242 | 171 |
|
| 243 |
- return loginVO; |
|
| 244 |
- } |
|
| 245 |
- |
|
| 172 |
+ return loginVO; |
|
| 173 |
+ } |
|
| 174 |
+ |
|
| 175 |
+ /** |
|
| 176 |
+ * 비밀번호를 찾는다. |
|
| 177 |
+ * |
|
| 178 |
+ * @param vo LoginVO |
|
| 179 |
+ * @return boolean |
|
| 180 |
+ * @throws Exception |
|
| 181 |
+ */ |
|
| 182 |
+ @Override |
|
| 183 |
+ public boolean searchPassword(LoginVO vo) throws Exception {
|
|
| 184 |
+ |
|
| 185 |
+ boolean result = true; |
|
| 186 |
+ |
|
| 187 |
+ // 1. 아이디, 이름, 이메일주소, 비밀번호 힌트, 비밀번호 정답이 DB와 일치하는 사용자 Password를 조회한다. |
|
| 188 |
+ LoginVO loginVO = loginDAO.searchPassword(vo); |
|
| 189 |
+ if (loginVO == null || loginVO.getPassword() == null || loginVO.getPassword().equals("")) {
|
|
| 190 |
+ return false; |
|
| 191 |
+ } |
|
| 192 |
+ |
|
| 193 |
+ // 2. 임시 비밀번호를 생성한다.(영+영+숫+영+영+숫=6자리) |
|
| 194 |
+ String newpassword = ""; |
|
| 195 |
+ for (int i = 1; i <= 6; i++) {
|
|
| 196 |
+ // 영자 |
|
| 197 |
+ if (i % 3 != 0) {
|
|
| 198 |
+ newpassword += EgovStringUtil.getRandomStr('a', 'z');
|
|
| 199 |
+ // 숫자 |
|
| 200 |
+ } else {
|
|
| 201 |
+ newpassword += EgovNumberUtil.getRandomNum(0, 9); |
|
| 202 |
+ } |
|
| 203 |
+ } |
|
| 204 |
+ |
|
| 205 |
+ // 3. 임시 비밀번호를 암호화하여 DB에 저장한다. |
|
| 206 |
+ LoginVO pwVO = new LoginVO(); |
|
| 207 |
+ String enpassword = EgovFileScrty.encryptPassword(newpassword, vo.getId()); |
|
| 208 |
+ pwVO.setId(vo.getId()); |
|
| 209 |
+ pwVO.setPassword(enpassword); |
|
| 210 |
+ pwVO.setUserSe(vo.getUserSe()); |
|
| 211 |
+ loginDAO.updatePassword(pwVO); |
|
| 212 |
+ |
|
| 213 |
+ // 4. 임시 비밀번호를 이메일 발송한다.(메일연동솔루션 활용) |
|
| 214 |
+ //SndngMailVO sndngMailVO = new SndngMailVO(); |
|
| 215 |
+ //sndngMailVO.setDsptchPerson("webmaster");
|
|
| 216 |
+ //sndngMailVO.setRecptnPerson(vo.getEmail()); |
|
| 217 |
+ //sndngMailVO.setSj("[MOPAS] 임시 비밀번호를 발송했습니다.");
|
|
| 218 |
+ //sndngMailVO.setEmailCn("고객님의 임시 비밀번호는 " + newpassword + " 입니다.");
|
|
| 219 |
+ //sndngMailVO.setAtchFileId("");
|
|
| 220 |
+ |
|
| 221 |
+ //result = sndngMailRegistService.insertSndngMail(sndngMailVO); |
|
| 222 |
+ |
|
| 223 |
+ return result; |
|
| 224 |
+ } |
|
| 225 |
+ |
|
| 226 |
+ @Override |
|
| 227 |
+ public LoginVO getUserAuth(LoginVO resultVO) throws Exception {
|
|
| 228 |
+ return loginDAO.getUserAuth(resultVO); |
|
| 229 |
+ } |
|
| 230 |
+ |
|
| 231 |
+ @Override |
|
| 232 |
+ public LoginVO siteActionLogin(LoginVO vo) throws Exception {
|
|
| 233 |
+ // 1. 입력한 비밀번호를 암호화한다. |
|
| 234 |
+ String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 235 |
+ vo.setPassword(enpassword); |
|
| 236 |
+ |
|
| 237 |
+ // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 238 |
+ LoginVO loginVO = loginDAO.siteActionLogin(vo); |
|
| 239 |
+ |
|
| 240 |
+ // 3. 결과를 리턴한다. |
|
| 241 |
+ if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 242 |
+ return loginVO; |
|
| 243 |
+ } else {
|
|
| 244 |
+ loginVO = new LoginVO(); |
|
| 245 |
+ } |
|
| 246 |
+ |
|
| 247 |
+ return loginVO; |
|
| 248 |
+ } |
|
| 249 |
+ |
|
| 246 | 250 |
/** |
| 247 | 251 |
* 유저 권한 목록을 조회한다. (by USER_ID) |
| 252 |
+ * |
|
| 248 | 253 |
* @param vo LoginVO |
| 249 | 254 |
* @return List<EgovMap> |
| 250 |
- * @exception Exception |
|
| 255 |
+ * @throws Exception |
|
| 251 | 256 |
*/ |
| 252 | 257 |
@Override |
| 253 | 258 |
public List<EgovMap> selectAuthorities(LoginVO vo) throws Exception {
|
| 254 |
- List<EgovMap> authorities = (List<EgovMap>) loginDAO.selectAuthorities(vo); |
|
| 255 |
- |
|
| 256 |
- return authorities; |
|
| 259 |
+ List<EgovMap> authorities = (List<EgovMap>) loginDAO.selectAuthorities(vo); |
|
| 260 |
+ |
|
| 261 |
+ return authorities; |
|
| 257 | 262 |
} |
| 258 | 263 |
|
| 259 |
- @Override |
|
| 260 |
- public void updatePassMissPlus(LoginVO loginVO) throws Exception {
|
|
| 261 |
- loginDAO.updatePassMissPlus(loginVO); |
|
| 262 |
- } |
|
| 263 |
- |
|
| 264 |
- @Override |
|
| 265 |
- public void updatePassMissReset(LoginVO loginVO) throws Exception {
|
|
| 266 |
- loginDAO.updatePassMissReset(loginVO); |
|
| 267 |
- } |
|
| 268 |
- |
|
| 269 |
- @Override |
|
| 270 |
- public void updateEmplyrSttusCode(LoginVO loginVO) throws Exception {
|
|
| 271 |
- loginDAO.updateEmplyrSttusCode(loginVO); |
|
| 272 |
- } |
|
| 273 |
- |
|
| 274 |
- @Override |
|
| 275 |
- public void insertActionLoginLog(LoginVO loginVO) throws Exception {
|
|
| 276 |
- String loginLogId = loginLogIdService.getNextStringId(); |
|
| 277 |
- loginVO.setUniqId(loginLogId); |
|
| 278 |
- loginDAO.insertActionLoginLog(loginVO); |
|
| 279 |
- } |
|
| 280 |
- |
|
| 281 |
- @Override |
|
| 282 |
- public int selectIPCnt(LoginVO vo) throws Exception {
|
|
| 283 |
- return loginDAO.selectIPCnt(vo); |
|
| 284 |
- } |
|
| 285 |
- |
|
| 286 |
- @Override |
|
| 287 |
- public LoginVO selectKMCInfo(LoginVO vo) throws Exception {
|
|
| 288 |
- return loginDAO.selectKMCInfo(vo); |
|
| 289 |
- } |
|
| 290 |
- |
|
| 291 |
- @Override |
|
| 292 |
- public void insertMberIp(LoginVO loginVO) throws Exception {
|
|
| 293 |
- loginDAO.insertMberIp(loginVO); |
|
| 294 |
- } |
|
| 295 |
- |
|
| 296 | 264 |
@Override |
| 297 |
- public LoginVO actionLoginCmpChk(LoginVO vo) throws Exception {
|
|
| 298 |
- |
|
| 299 |
- // 1. 입력한 비밀번호를 암호화한다. |
|
| 300 |
- String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 301 |
- vo.setPassword(enpassword); |
|
| 302 |
- |
|
| 303 |
- // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 304 |
- LoginVO loginVO = loginDAO.actionLoginCmpChk(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 305 |
- |
|
| 306 |
- // 3. 결과를 리턴한다. |
|
| 307 |
- if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 308 |
- return loginVO; |
|
| 309 |
- } else {
|
|
| 310 |
- loginVO = new LoginVO(); |
|
| 311 |
- } |
|
| 312 |
- |
|
| 313 |
- return loginVO; |
|
| 265 |
+ public void updatePassMissPlus(LoginVO loginVO) throws Exception {
|
|
| 266 |
+ loginDAO.updatePassMissPlus(loginVO); |
|
| 314 | 267 |
} |
| 315 |
- |
|
| 268 |
+ |
|
| 269 |
+ @Override |
|
| 270 |
+ public void updatePassMissReset(LoginVO loginVO) throws Exception {
|
|
| 271 |
+ loginDAO.updatePassMissReset(loginVO); |
|
| 272 |
+ } |
|
| 273 |
+ |
|
| 274 |
+ @Override |
|
| 275 |
+ public void updateEmplyrSttusCode(LoginVO loginVO) throws Exception {
|
|
| 276 |
+ loginDAO.updateEmplyrSttusCode(loginVO); |
|
| 277 |
+ } |
|
| 278 |
+ |
|
| 279 |
+ @Override |
|
| 280 |
+ public void insertActionLoginLog(LoginVO loginVO) throws Exception {
|
|
| 281 |
+ String loginLogId = loginLogIdService.getNextStringId(); |
|
| 282 |
+ loginVO.setUniqId(loginLogId); |
|
| 283 |
+ loginDAO.insertActionLoginLog(loginVO); |
|
| 284 |
+ } |
|
| 285 |
+ |
|
| 286 |
+ @Override |
|
| 287 |
+ public int selectIPCnt(LoginVO vo) throws Exception {
|
|
| 288 |
+ return loginDAO.selectIPCnt(vo); |
|
| 289 |
+ } |
|
| 290 |
+ |
|
| 291 |
+ @Override |
|
| 292 |
+ public LoginVO selectKMCInfo(LoginVO vo) throws Exception {
|
|
| 293 |
+ return loginDAO.selectKMCInfo(vo); |
|
| 294 |
+ } |
|
| 295 |
+ |
|
| 296 |
+ @Override |
|
| 297 |
+ public void insertMberIp(LoginVO loginVO) throws Exception {
|
|
| 298 |
+ loginDAO.insertMberIp(loginVO); |
|
| 299 |
+ } |
|
| 300 |
+ |
|
| 301 |
+ @Override |
|
| 302 |
+ public LoginVO actionLoginCmpChk(LoginVO vo) throws Exception {
|
|
| 303 |
+ |
|
| 304 |
+ // 1. 입력한 비밀번호를 암호화한다. |
|
| 305 |
+ String enpassword = EgovFileScrty.encryptPassword(vo.getPassword(), vo.getId()); |
|
| 306 |
+ vo.setPassword(enpassword); |
|
| 307 |
+ |
|
| 308 |
+ // 2. 아이디와 암호화된 비밀번호가 DB와 일치하는지 확인한다. |
|
| 309 |
+ LoginVO loginVO = loginDAO.actionLoginCmpChk(vo); //사용자 MJ_MEMBER_ADD 추가 |
|
| 310 |
+ |
|
| 311 |
+ // 3. 결과를 리턴한다. |
|
| 312 |
+ if (loginVO != null && !loginVO.getId().equals("") && !loginVO.getPassword().equals("")) {
|
|
| 313 |
+ return loginVO; |
|
| 314 |
+ } else {
|
|
| 315 |
+ loginVO = new LoginVO(); |
|
| 316 |
+ } |
|
| 317 |
+ |
|
| 318 |
+ return loginVO; |
|
| 319 |
+ } |
|
| 320 |
+ |
|
| 316 | 321 |
//비밀번호 실패 횟수 조회 |
| 317 | 322 |
@Override |
| 318 | 323 |
public LoginVO selectPassMiss(LoginVO vo) throws Exception {
|
| 319 |
- return loginDAO.selectPassMiss(vo); |
|
| 324 |
+ return loginDAO.selectPassMiss(vo); |
|
| 320 | 325 |
} |
| 321 | 326 |
|
| 322 |
- public Boolean paramChk(String patn, String param) {
|
|
| 323 |
- Pattern pattern = Pattern.compile(patn); |
|
| 324 |
- Matcher matcher = pattern.matcher(param); |
|
| 325 |
- boolean b = matcher.matches(); |
|
| 326 |
- return b; |
|
| 327 |
- } |
|
| 327 |
+ @Override |
|
| 328 |
+ public LoginVO findMemberByStatus(String id, String password, String userIp, String statusCode) throws Exception {
|
|
| 329 |
+ LoginVO loginVO = new LoginVO(); |
|
| 330 |
+ loginVO.setId(id); |
|
| 331 |
+ loginVO.setIp(userIp); |
|
| 332 |
+ loginVO.setPassword(password); |
|
| 333 |
+ loginVO.setUserSe("GNR");
|
|
| 334 |
+ loginVO.setStatusAll("Y");
|
|
| 335 |
+ loginVO.setEmplyrSttusCode(statusCode); |
|
| 328 | 336 |
|
| 337 |
+ return loginDAO.actionLoginCmpChk(loginVO); |
|
| 338 |
+ } |
|
| 339 |
+ |
|
| 340 |
+ public Boolean paramChk(String patn, String param) {
|
|
| 341 |
+ Pattern pattern = Pattern.compile(patn); |
|
| 342 |
+ Matcher matcher = pattern.matcher(param); |
|
| 343 |
+ boolean b = matcher.matches(); |
|
| 344 |
+ return b; |
|
| 345 |
+ } |
|
| 346 |
+ |
|
| 347 |
+ public String validateLoginResult( |
|
| 348 |
+ LoginVO loginVO, |
|
| 349 |
+ LoginVO resultVO, |
|
| 350 |
+ String userIp |
|
| 351 |
+ ) throws Exception {
|
|
| 352 |
+ if ("admin".equals(loginVO.getId())) return null;
|
|
| 353 |
+ |
|
| 354 |
+ LoginVO passMissVO = selectPassMiss(loginVO); |
|
| 355 |
+ |
|
| 356 |
+ if (passMissVO == null) {
|
|
| 357 |
+ insertHackIp(loginVO.getId(), userIp); |
|
| 358 |
+ return "아이디 또는 비밀번호가 올바르지 않습니다."; |
|
| 359 |
+ } |
|
| 360 |
+ |
|
| 361 |
+ int passMiss = passMissVO.getPassMiss(); |
|
| 362 |
+ String lockedMessage = "5회 이상 로그인에 실패하여 계정이 잠겼습니다. 비밀번호를 재설정해주세요."; |
|
| 363 |
+ if (passMiss >= 5) return lockedMessage; |
|
| 364 |
+ if (resultVO == null || resultVO.getId() == null) {
|
|
| 365 |
+ updatePassMissPlus(loginVO); |
|
| 366 |
+ insertHackIp(loginVO.getId(), userIp); |
|
| 367 |
+ int failureCount = passMiss + 1; |
|
| 368 |
+ if (failureCount >= 5) return lockedMessage; |
|
| 369 |
+ return "아이디 또는 비밀번호가 올바르지 않습니다. (남은 시도 " + (5 - failureCount) + "회)"; |
|
| 370 |
+ } |
|
| 371 |
+ |
|
| 372 |
+ updatePassMissReset(loginVO); |
|
| 373 |
+ return null; |
|
| 374 |
+ } |
|
| 375 |
+ |
|
| 376 |
+ private void insertHackIp(String userId, String userIp) throws Exception {
|
|
| 377 |
+ HackIpVO vo = new HackIpVO(); |
|
| 378 |
+ vo.setHackUserId(userId); |
|
| 379 |
+ vo.setAccessIp(userIp); |
|
| 380 |
+ |
|
| 381 |
+ hackIpService.insertHackIp(vo); |
|
| 382 |
+ } |
|
| 329 | 383 |
|
| 330 | 384 |
} |
--- src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java
+++ src/main/java/itn/let/uat/uia/service/impl/EgovMberManageServiceImpl.java
... | ... | @@ -659,7 +659,25 @@ |
| 659 | 659 |
|
| 660 | 660 |
return headerInfo; |
| 661 | 661 |
} |
| 662 |
- |
|
| 662 |
+ |
|
| 663 |
+ @Override |
|
| 664 |
+ public boolean isCompanyRegistrationPendingOrRejected(String mberId) throws Exception {
|
|
| 665 |
+ MberManageVO condition = new MberManageVO(); |
|
| 666 |
+ condition.setMberId(mberId); |
|
| 667 |
+ |
|
| 668 |
+ MberManageVO history = selectCmpUsrHst(condition); |
|
| 669 |
+ |
|
| 670 |
+ if (history == null) {
|
|
| 671 |
+ return false; |
|
| 672 |
+ } |
|
| 673 |
+ |
|
| 674 |
+ if (!"01".equals(history.getHstType())) {
|
|
| 675 |
+ return false; |
|
| 676 |
+ } |
|
| 677 |
+ |
|
| 678 |
+ return "01".equals(history.getHstSttus()) || "03".equals(history.getHstSttus()); |
|
| 679 |
+ } |
|
| 680 |
+ |
|
| 663 | 681 |
private long calculateEventLeftDay(String eventEndDateStr) {
|
| 664 | 682 |
if (StringUtil.isEmpty(eventEndDateStr)) return 0; |
| 665 | 683 |
LocalDate today = LocalDate.now(); |
+++ src/main/java/itn/let/uat/uia/service/impl/SecondAuthLogDAO.java
... | ... | @@ -0,0 +1,41 @@ |
| 1 | +package itn.let.uat.uia.service.impl; | |
| 2 | + | |
| 3 | +import itn.com.cmm.service.impl.EgovComAbstractDAO; | |
| 4 | +import itn.let.uat.uia.service.SecondAuthLogVO; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +@Repository("secondAuthLogDAO") | |
| 10 | +public class SecondAuthLogDAO extends EgovComAbstractDAO { | |
| 11 | + public void insertSecondAuthLog(SecondAuthLogVO logVO) { | |
| 12 | + insert("secondAuthLogDAO.insertSecondAuthLog", logVO); | |
| 13 | + } | |
| 14 | + | |
| 15 | + public void deleteSecondAuthLog(SecondAuthLogVO logVO) { | |
| 16 | + } | |
| 17 | + | |
| 18 | + public SecondAuthLogVO selectSecondAuthLog(SecondAuthLogVO logVO) { | |
| 19 | + return (SecondAuthLogVO) select("secondAuthLogDAO.selectSecondAuthLog", logVO); | |
| 20 | + } | |
| 21 | + | |
| 22 | + public int selectSecondAuthLogCnt(SecondAuthLogVO logVO) { | |
| 23 | + return (Integer) select("secondAuthLogDAO.selectSecondAuthLogCnt", logVO); | |
| 24 | + } | |
| 25 | + @SuppressWarnings("unchecked") | |
| 26 | + public List<SecondAuthLogVO> selectSecondAuthLogList(SecondAuthLogVO logVO) { | |
| 27 | + return (List<SecondAuthLogVO>) list("secondAuthLogDAO.selectSecondAuthLogList", logVO); | |
| 28 | + } | |
| 29 | + | |
| 30 | + public int selectFailureCountSinceReset(SecondAuthLogVO logVO) { | |
| 31 | + return (Integer) select("secondAuthLogDAO.selectFailureCountSinceReset", logVO); | |
| 32 | + } | |
| 33 | + | |
| 34 | + public int selectActiveSecondAuthLockCount(SecondAuthLogVO logVO) { | |
| 35 | + return (Integer) select("secondAuthLogDAO.selectActiveSecondAuthLockCount", logVO); | |
| 36 | + } | |
| 37 | + | |
| 38 | + public int selectSecondAuthLockRemainingSeconds(SecondAuthLogVO logVO) { | |
| 39 | + return (Integer) select("secondAuthLogDAO.selectSecondAuthLockRemainingSeconds", logVO); | |
| 40 | + } | |
| 41 | +} |
+++ src/main/java/itn/let/uat/uia/service/impl/SecondAuthLogServiceImpl.java
... | ... | @@ -0,0 +1,72 @@ |
| 1 | +package itn.let.uat.uia.service.impl; | |
| 2 | + | |
| 3 | +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
| 4 | +import egovframework.rte.fdl.idgnr.EgovIdGnrService; | |
| 5 | +import itn.let.uat.uia.service.SecondAuthLogService; | |
| 6 | +import itn.let.uat.uia.service.SecondAuthLogVO; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +import javax.annotation.Resource; | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +@Service("secondAuthLogService") | |
| 13 | +public class SecondAuthLogServiceImpl extends EgovAbstractServiceImpl implements SecondAuthLogService { | |
| 14 | + @Resource(name = "secondAuthLogDAO") | |
| 15 | + private SecondAuthLogDAO dao; | |
| 16 | + | |
| 17 | + @Resource(name = "egovSecondAuthLogIdGnrService") | |
| 18 | + private EgovIdGnrService idGenService; | |
| 19 | + | |
| 20 | + public void insertSecondAuthsLog(SecondAuthLogVO logVO) throws Exception{ | |
| 21 | + logVO.setLogId(idGenService.getNextStringId()); | |
| 22 | + dao.insertSecondAuthLog(logVO); | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void deleteSecondAuthLog(SecondAuthLogVO logVO) throws Exception{ | |
| 26 | + dao.deleteSecondAuthLog(logVO); | |
| 27 | + } | |
| 28 | + | |
| 29 | + public SecondAuthLogVO selectSecondAuthLog(SecondAuthLogVO logVO) throws Exception{ | |
| 30 | + return dao.selectSecondAuthLog(logVO); | |
| 31 | + } | |
| 32 | + | |
| 33 | + public int selectSecondAuthLogCnt(SecondAuthLogVO logVO) throws Exception{ | |
| 34 | + return dao.selectSecondAuthLogCnt(logVO); | |
| 35 | + } | |
| 36 | + | |
| 37 | + public List<SecondAuthLogVO> selectSecondAuthLogList(SecondAuthLogVO logVO) throws Exception{ | |
| 38 | + List<SecondAuthLogVO> list = dao.selectSecondAuthLogList(logVO); | |
| 39 | + list.forEach(log -> log.setUserAgent(getDeviceType(log.getUserAgent()))); | |
| 40 | + | |
| 41 | + return list; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public int selectFailureCountSinceReset(SecondAuthLogVO logVO) throws Exception { | |
| 45 | + return dao.selectFailureCountSinceReset(logVO); | |
| 46 | + } | |
| 47 | + | |
| 48 | + public boolean isSecondAuthLocked(SecondAuthLogVO logVO) throws Exception { | |
| 49 | + return dao.selectActiveSecondAuthLockCount(logVO) > 0; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public int selectSecondAuthLockRemainingSeconds(SecondAuthLogVO logVO) throws Exception { | |
| 53 | + return dao.selectSecondAuthLockRemainingSeconds(logVO); | |
| 54 | + } | |
| 55 | + | |
| 56 | + private String getDeviceType(String userAgent) { | |
| 57 | + if (userAgent == null) { | |
| 58 | + return "UNKNOWN"; | |
| 59 | + } | |
| 60 | + | |
| 61 | + String ua = userAgent.toLowerCase(); | |
| 62 | + | |
| 63 | + if (ua.contains("mobile") | |
| 64 | + || ua.contains("android") | |
| 65 | + || ua.contains("iphone") | |
| 66 | + || ua.contains("ipad")) { | |
| 67 | + return "MOBILE"; | |
| 68 | + } | |
| 69 | + | |
| 70 | + return "PC"; | |
| 71 | + } | |
| 72 | +} |
+++ src/main/java/itn/let/uat/uia/service/impl/SecondAuthMethodLogDAO.java
... | ... | @@ -0,0 +1,27 @@ |
| 1 | +package itn.let.uat.uia.service.impl; | |
| 2 | + | |
| 3 | +import itn.com.cmm.service.impl.EgovComAbstractDAO; | |
| 4 | +import itn.let.uat.uia.service.SecondAuthMethodLogVO; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +@Repository("secondAuthMethodLogDAO") | |
| 10 | +public class SecondAuthMethodLogDAO extends EgovComAbstractDAO { | |
| 11 | + public void insertSecondAuthMethodLog(SecondAuthMethodLogVO logVO) { | |
| 12 | + insert("secondAuthMethodLogDAO.insertSecondAuthMethodLog", logVO); | |
| 13 | + } | |
| 14 | + | |
| 15 | + public int selectSecondAuthMethodLogCnt(SecondAuthMethodLogVO logVO) { | |
| 16 | + return (Integer) select("secondAuthMethodLogDAO.selectSecondAuthMethodLogCnt", logVO); | |
| 17 | + } | |
| 18 | + | |
| 19 | + @SuppressWarnings("unchecked") | |
| 20 | + public List<SecondAuthMethodLogVO> selectSecondAuthMethodLogList(SecondAuthMethodLogVO logVO) { | |
| 21 | + return (List<SecondAuthMethodLogVO>) list("secondAuthMethodLogDAO.selectSecondAuthMethodLogList", logVO); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public int deleteExpiredSecondAuthMethodLogs() { | |
| 25 | + return delete("secondAuthMethodLogDAO.deleteExpiredSecondAuthMethodLogs"); | |
| 26 | + } | |
| 27 | +} |
+++ src/main/java/itn/let/uat/uia/service/impl/SecondAuthMethodLogServiceImpl.java
... | ... | @@ -0,0 +1,35 @@ |
| 1 | +package itn.let.uat.uia.service.impl; | |
| 2 | + | |
| 3 | +import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
| 4 | +import itn.let.uat.uia.service.SecondAuthMethodLogService; | |
| 5 | +import itn.let.uat.uia.service.SecondAuthMethodLogVO; | |
| 6 | +import org.springframework.stereotype.Service; | |
| 7 | + | |
| 8 | +import javax.annotation.Resource; | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +@Service("secondAuthMethodLogService") | |
| 12 | +public class SecondAuthMethodLogServiceImpl extends EgovAbstractServiceImpl implements SecondAuthMethodLogService { | |
| 13 | + @Resource(name = "secondAuthMethodLogDAO") | |
| 14 | + private SecondAuthMethodLogDAO secondAuthMethodLogDAO; | |
| 15 | + | |
| 16 | + @Override | |
| 17 | + public void insertSecondAuthMethodLog(SecondAuthMethodLogVO logVO) throws Exception { | |
| 18 | + secondAuthMethodLogDAO.insertSecondAuthMethodLog(logVO); | |
| 19 | + } | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public int selectSecondAuthMethodLogCnt(SecondAuthMethodLogVO logVO) throws Exception { | |
| 23 | + return secondAuthMethodLogDAO.selectSecondAuthMethodLogCnt(logVO); | |
| 24 | + } | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public List<SecondAuthMethodLogVO> selectSecondAuthMethodLogList(SecondAuthMethodLogVO logVO) throws Exception { | |
| 28 | + return secondAuthMethodLogDAO.selectSecondAuthMethodLogList(logVO); | |
| 29 | + } | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public int deleteExpiredSecondAuthMethodLogs() throws Exception { | |
| 33 | + return secondAuthMethodLogDAO.deleteExpiredSecondAuthMethodLogs(); | |
| 34 | + } | |
| 35 | +} |
+++ src/main/java/itn/let/uat/uia/support/SecondAuthSessionConstants.java
... | ... | @@ -0,0 +1,12 @@ |
| 1 | +package itn.let.uat.uia.support; | |
| 2 | + | |
| 3 | +public final class SecondAuthSessionConstants { | |
| 4 | + | |
| 5 | + public static final String SEND_COUNT = "secondAuthSendCount"; | |
| 6 | + public static final String LAST_SENT_AT = "secondAuthLastSentAt"; | |
| 7 | + public static final int MAX_SEND_COUNT = 4; // 최초 발송 1회 + 재발송 3회 | |
| 8 | + public static final long RESEND_INTERVAL_MILLIS = 30 * 1000L; | |
| 9 | + | |
| 10 | + private SecondAuthSessionConstants() { | |
| 11 | + } | |
| 12 | +} |
--- src/main/java/itn/let/uat/uia/web/EgovLoginController.java
+++ src/main/java/itn/let/uat/uia/web/EgovLoginController.java
... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 |
import javax.servlet.http.HttpServletResponse; |
| 31 | 31 |
import javax.servlet.http.HttpSession; |
| 32 | 32 |
|
| 33 |
+import itn.let.uat.uia.service.*; |
|
| 33 | 34 |
import org.apache.commons.lang.StringUtils; |
| 34 | 35 |
import org.apache.commons.lang3.ArrayUtils; |
| 35 | 36 |
import org.apache.http.HttpResponse; |
... | ... | @@ -68,7 +69,6 @@ |
| 68 | 69 |
import com.fasterxml.jackson.databind.ObjectMapper; |
| 69 | 70 |
|
| 70 | 71 |
import NiceID.Check.CPClient; |
| 71 |
-import egovframework.rte.fdl.cmmn.trace.LeaveaTrace; |
|
| 72 | 72 |
import egovframework.rte.fdl.property.EgovPropertyService; |
| 73 | 73 |
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; |
| 74 | 74 |
import itn.com.cmm.ComDefaultCodeVO; |
... | ... | @@ -89,6 +89,7 @@ |
| 89 | 89 |
import itn.let.cert.ip.service.MberCertLoginLogVO; |
| 90 | 90 |
import itn.let.cert.phone.service.CertPhoneService; |
| 91 | 91 |
import itn.let.cert.phone.service.MberCertPhoneVO; |
| 92 |
+import itn.let.cert.phone.support.PhoneResetSessionConstants; |
|
| 92 | 93 |
import itn.let.cop.bbs.service.BoardVO; |
| 93 | 94 |
import itn.let.mjo.event.service.MjonEventService; |
| 94 | 95 |
import itn.let.mjo.event.service.MjonEventVO; |
... | ... | @@ -104,7 +105,6 @@ |
| 104 | 105 |
import itn.let.mjo.pay.service.MjonPayService; |
| 105 | 106 |
import itn.let.sym.grd.service.MberGrdService; |
| 106 | 107 |
import itn.let.sym.grd.service.MberGrdVO; |
| 107 |
-import itn.let.sym.log.clg.service.EgovLoginLogService; |
|
| 108 | 108 |
import itn.let.sym.log.clg.service.LoginLog; |
| 109 | 109 |
import itn.let.sym.mnu.mpm.service.MenuManageJTreeVO; |
| 110 | 110 |
import itn.let.sym.site.service.EgovSiteManagerService; |
... | ... | @@ -113,8 +113,7 @@ |
| 113 | 113 |
import itn.let.sym.site.service.TermsVO; |
| 114 | 114 |
import itn.let.uat.uap.service.EgovLoginPolicyService; |
| 115 | 115 |
import itn.let.uat.uap.service.LoginPolicyVO; |
| 116 |
-import itn.let.uat.uia.service.AuthCertVO; |
|
| 117 |
-import itn.let.uat.uia.service.EgovLoginService; |
|
| 116 |
+import itn.let.uat.uia.support.SecondAuthSessionConstants; |
|
| 118 | 117 |
import itn.let.uss.umt.service.EgovMberManageService; |
| 119 | 118 |
import itn.let.uss.umt.service.EgovUserManageService; |
| 120 | 119 |
import itn.let.uss.umt.service.MberManageConfigVO; |
... | ... | @@ -122,15 +121,13 @@ |
| 122 | 121 |
import itn.let.uss.umt.service.UserDefaultVO; |
| 123 | 122 |
import itn.let.uss.umt.service.UserGuestVO; |
| 124 | 123 |
import itn.let.uss.umt.service.UserManageVO; |
| 125 |
-import itn.let.utl.fcc.service.EgovCryptoUtil; |
|
| 126 |
-import itn.let.utl.fcc.service.EgovStringUtil; |
|
| 127 | 124 |
import itn.let.utl.sim.service.EgovClntInfo; |
| 128 | 125 |
import itn.let.utl.user.service.MjonNoticeSendUtil; |
| 129 | 126 |
import itn.let.utl.user.service.MjonSmsCertSendUtil; |
| 130 | 127 |
|
| 131 | 128 |
/** |
| 132 | 129 |
* 일반 로그인, 인증서 로그인을 처리하는 컨트롤러 클래스 |
| 133 |
- * |
|
| 130 |
+ * |
|
| 134 | 131 |
* @author 공통서비스 개발팀 박지욱 |
| 135 | 132 |
* @since 2009.03.06 |
| 136 | 133 |
* @version 1.0 |
... | ... | @@ -170,6 +167,9 @@ |
| 170 | 167 |
@Resource(name = "loginService") |
| 171 | 168 |
private EgovLoginService loginService; |
| 172 | 169 |
|
| 170 |
+ @Resource(name = "secondAuthLogService") |
|
| 171 |
+ private SecondAuthLogService secondAuthLogService; |
|
| 172 |
+ |
|
| 173 | 173 |
/** EgovMessageSource */ |
| 174 | 174 |
@Resource(name = "egovMessageSource") |
| 175 | 175 |
EgovMessageSource egovMessageSource; |
... | ... | @@ -181,13 +181,6 @@ |
| 181 | 181 |
/** EgovPropertyService */ |
| 182 | 182 |
@Resource(name = "propertiesService") |
| 183 | 183 |
protected EgovPropertyService propertiesService; |
| 184 |
- |
|
| 185 |
- /** TRACE */ |
|
| 186 |
- @Resource(name = "leaveaTrace") |
|
| 187 |
- LeaveaTrace leaveaTrace; |
|
| 188 |
- |
|
| 189 |
- @Resource(name = "EgovLoginLogService") |
|
| 190 |
- private EgovLoginLogService loginLogService; |
|
| 191 | 184 |
|
| 192 | 185 |
@Resource(name = "egovSiteManagerService") |
| 193 | 186 |
private EgovSiteManagerService egovSiteManagerService; |
... | ... | @@ -218,44 +211,41 @@ |
| 218 | 211 |
@Resource(name = "MjonMsgDataService") |
| 219 | 212 |
private MjonMsgDataService mjonMsgDataService; |
| 220 | 213 |
|
| 221 |
- @Resource(name = "egovCryptoUtil") |
|
| 222 |
- EgovCryptoUtil egovCryptoUtil; |
|
| 223 |
- |
|
| 224 | 214 |
@Resource(name = "MjonMsgSentService") |
| 225 | 215 |
private MjonMsgSentService mjonMsgSentService; |
| 226 | 216 |
|
| 227 | 217 |
/** 알림전송 Util */ |
| 228 | 218 |
@Resource(name = "mjonNoticeSendUtil") |
| 229 | 219 |
private MjonNoticeSendUtil mjonNoticeSendUtil; |
| 230 |
- |
|
| 220 |
+ |
|
| 231 | 221 |
@Resource(name = "MjonSmsCertSendUtil") |
| 232 | 222 |
private MjonSmsCertSendUtil mjonSmsCertSendUtil; |
| 233 |
- |
|
| 223 |
+ |
|
| 234 | 224 |
@Resource(name="MjonCommon") |
| 235 | 225 |
private MjonCommon mjonCommon; |
| 236 | 226 |
|
| 237 | 227 |
@Resource(name = "MjonEventService") |
| 238 | 228 |
private MjonEventService mjonEventService; |
| 239 |
- |
|
| 229 |
+ |
|
| 240 | 230 |
@Resource(name = "mjonPayService") |
| 241 |
- private MjonPayService mjonPayService; |
|
| 242 |
- |
|
| 231 |
+ private MjonPayService mjonPayService; |
|
| 232 |
+ |
|
| 243 | 233 |
@Resource(name = "mberGrdService") |
| 244 | 234 |
MberGrdService mberGrdService; |
| 245 | 235 |
|
| 246 | 236 |
@Resource(name = "CertPhoneService") |
| 247 | 237 |
private CertPhoneService certPhoneService; |
| 248 |
- |
|
| 238 |
+ |
|
| 249 | 239 |
@Resource(name = "CertLoginLogService") |
| 250 | 240 |
private CertLoginLogService certLoginLogService; |
| 251 |
- |
|
| 241 |
+ |
|
| 252 | 242 |
@Resource(name = "CertIpService") |
| 253 | 243 |
private CertIpService certIpService; |
| 254 |
- |
|
| 244 |
+ |
|
| 255 | 245 |
@Resource(name = "KmcCertChecker") |
| 256 | 246 |
private KmcCertChecker kmcCertChecker; |
| 257 |
- |
|
| 258 |
- |
|
| 247 |
+ |
|
| 248 |
+ |
|
| 259 | 249 |
private static final Logger logger = LoggerFactory.getLogger(MjonMsgDataController.class); |
| 260 | 250 |
|
| 261 | 251 |
/* 문자고 사용자 로그인 시작 */ |
... | ... | @@ -266,16 +256,16 @@ |
| 266 | 256 |
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); |
| 267 | 257 |
if (isAuthenticated) |
| 268 | 258 |
return "redirect:/"; |
| 269 |
- |
|
| 259 |
+ |
|
| 270 | 260 |
// B선라인 |
| 271 | 261 |
String blineCode = request.getParameter("blineCode");
|
| 272 | 262 |
if (blineCode != null && blineCode.length() != 0){
|
| 273 | 263 |
} |
| 274 | 264 |
else {
|
| 275 |
- blineCode = "N"; |
|
| 265 |
+ blineCode = "N"; |
|
| 276 | 266 |
} |
| 277 | 267 |
model.addAttribute("blineCode", blineCode);
|
| 278 |
- |
|
| 268 |
+ |
|
| 279 | 269 |
return "web/login/usrSelectDept"; |
| 280 | 270 |
} |
| 281 | 271 |
|
... | ... | @@ -285,8 +275,7 @@ |
| 285 | 275 |
@ModelAttribute("mberManageVO") MberManageVO mberManageVO, TermsVO termsVO, ModelMap model)
|
| 286 | 276 |
throws Exception {
|
| 287 | 277 |
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); |
| 288 |
- if (isAuthenticated) |
|
| 289 |
- return "redirect:/"; |
|
| 278 |
+ if (isAuthenticated) return "redirect:/"; |
|
| 290 | 279 |
//URL을 이용한 비정상적인 접근 차단 |
| 291 | 280 |
|
| 292 | 281 |
if("".equals(mberManageVO.getDept()) || mberManageVO.getDept() == null) {
|
... | ... | @@ -306,16 +295,16 @@ |
| 306 | 295 |
// 나이스 본인인증 |
| 307 | 296 |
/* |
| 308 | 297 |
* String referer = (String) request.getHeader("REFERER");
|
| 309 |
- * |
|
| 298 |
+ * |
|
| 310 | 299 |
* URL newURL = new URL(referer); |
| 311 |
- * |
|
| 300 |
+ * |
|
| 312 | 301 |
* String protocol = newURL.getProtocol() + "://"; String host = |
| 313 | 302 |
* newURL.getHost(); |
| 314 |
- * |
|
| 303 |
+ * |
|
| 315 | 304 |
* String succUrl = protocol + host + "/web/user/login/niceCheckAjax.do"; // 성공시 |
| 316 | 305 |
* 이동할 URL - String failUrl = protocol + host + |
| 317 | 306 |
* "/web/user/login/selectUserDept.do"; |
| 318 |
- * |
|
| 307 |
+ * |
|
| 319 | 308 |
* mberManageVO.setNiceSuccUrl(succUrl); mberManageVO.setNiceFailUrl(failUrl); |
| 320 | 309 |
*/ |
| 321 | 310 |
model.addAttribute("mberManageVO", mberManageVO);
|
... | ... | @@ -323,22 +312,10 @@ |
| 323 | 312 |
// KMC 본인인증 데이터 불러오기 |
| 324 | 313 |
// 핸드폰인증만 사용할 시 |
| 325 | 314 |
if (joinSettingVO.getJoinCertType().equals("M")) {
|
| 326 |
- |
|
| 327 |
-// KmcCertChecker kmcCertCheck = new KmcCertChecker(); |
|
| 328 |
-// |
|
| 329 |
-// String serverNm = request.getScheme() + "://" + request.getServerName(); |
|
| 330 |
-// if(request.getServerPort() != 80 |
|
| 331 |
-// && request.getServerPort() != 443) {
|
|
| 332 |
-// serverNm += ":" + request.getServerPort(); |
|
| 333 |
-// } |
|
| 334 |
-// |
|
| 335 |
-// AuthCertVO certVO = kmcCertCheck.authCertCheck(serverNm + "/web/cop/kmc/authRequestAjax.do"); |
|
| 336 |
-// |
|
| 337 |
- |
|
| 338 | 315 |
MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
| 339 | 316 |
mberCertPhoneVO.setTrUrl("/web/cop/kmc/authRequestAjax.do");
|
| 340 | 317 |
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
| 341 |
- |
|
| 318 |
+ |
|
| 342 | 319 |
model.addAttribute("tr_cert", certVO.getTr_cert());
|
| 343 | 320 |
model.addAttribute("tr_url", certVO.getTr_url());
|
| 344 | 321 |
model.addAttribute("tr_add", certVO.getTr_add());
|
... | ... | @@ -350,10 +327,10 @@ |
| 350 | 327 |
if (blineCode != null && blineCode.length() != 0){
|
| 351 | 328 |
} |
| 352 | 329 |
else {
|
| 353 |
- blineCode = "N"; |
|
| 330 |
+ blineCode = "N"; |
|
| 354 | 331 |
} |
| 355 | 332 |
model.addAttribute("blineCode", blineCode);
|
| 356 |
- |
|
| 333 |
+ |
|
| 357 | 334 |
return "web/login/usrCheckTerms"; |
| 358 | 335 |
} |
| 359 | 336 |
|
... | ... | @@ -368,16 +345,6 @@ |
| 368 | 345 |
ModelAndView modelAndView = new ModelAndView(); |
| 369 | 346 |
modelAndView.setViewName("jsonView");
|
| 370 | 347 |
|
| 371 |
-// KmcCertChecker kmcCertCheck = new KmcCertChecker(); |
|
| 372 |
- |
|
| 373 |
- // kmc 본인인증 실/개발 서버 구분 |
|
| 374 |
-// String serverNm = ""; |
|
| 375 |
-// if (request.getServerName().contains("219.240.88.15") || request.getServerName().contains("localhost")) {
|
|
| 376 |
-// serverNm = request.getScheme() + "://219.240.88.15:8095"; |
|
| 377 |
-// } else {
|
|
| 378 |
-// serverNm = request.getScheme() + "://www.munjaon.co.kr"; |
|
| 379 |
-// } |
|
| 380 |
- |
|
| 381 | 348 |
MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
| 382 | 349 |
mberCertPhoneVO.setTrUrl("/web/cop/kmc/authRequestAjax.do");
|
| 383 | 350 |
mberCertPhoneVO.setName(mberManageVO.getMberNm()); |
... | ... | @@ -385,20 +352,12 @@ |
| 385 | 352 |
mberCertPhoneVO.setGender(mberManageVO.getSexdstnCode()); |
| 386 | 353 |
mberCertPhoneVO.setNation(mberManageVO.getNationality()); |
| 387 | 354 |
mberCertPhoneVO.setBirthDay(mberManageVO.getBirth()); |
| 388 |
- |
|
| 355 |
+ |
|
| 389 | 356 |
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
| 390 | 357 |
|
| 391 |
-// AuthCertVO certVO = kmcCertCheck.authCertCheckTwo(serverNm + "/web/cop/kmc/authRequestAjax.do", |
|
| 392 |
-// mberManageVO.getMberNm(), mberManageVO.getMoblphonNo(), mberManageVO.getSexdstnCode(), |
|
| 393 |
-// mberManageVO.getNationality(), mberManageVO.getBirth()); |
|
| 394 | 358 |
|
| 395 | 359 |
System.out.println("++++++++++++ 세션체크222 ::: " + (MberManageVO) session.getAttribute("mberSession"));
|
| 396 | 360 |
|
| 397 |
- /* |
|
| 398 |
- * model.addAttribute("tr_cert", certVO.getTr_cert());
|
|
| 399 |
- * model.addAttribute("tr_url", certVO.getTr_url());
|
|
| 400 |
- * model.addAttribute("tr_add", certVO.getTr_add());
|
|
| 401 |
- */ |
|
| 402 | 361 |
modelAndView.addObject("tr_cert", certVO.getTr_cert());
|
| 403 | 362 |
modelAndView.addObject("tr_url", certVO.getTr_url());
|
| 404 | 363 |
modelAndView.addObject("tr_add", certVO.getTr_add());
|
... | ... | @@ -412,8 +371,7 @@ |
| 412 | 371 |
@ModelAttribute("mberManageVO") MberManageVO mberManageVO, TermsVO termsVO, ModelMap model,
|
| 413 | 372 |
HttpSession session, JoinSettingVO joinSettingVO, RedirectAttributes redirectAttributes) throws Exception {
|
| 414 | 373 |
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); |
| 415 |
- if (isAuthenticated) |
|
| 416 |
- return "redirect:/cmm/main/mainPage.do"; |
|
| 374 |
+ if (isAuthenticated) return "redirect:/cmm/main/mainPage.do"; |
|
| 417 | 375 |
|
| 418 | 376 |
//URL을 이용한 비정상적인 접근 차단 |
| 419 | 377 |
if("".equals(mberManageVO.getDept()) || mberManageVO.getDept() == null || "".equals(mberManageVO.getMblDn()) || mberManageVO.getMblDn() == null) {
|
... | ... | @@ -444,26 +402,6 @@ |
| 444 | 402 |
|
| 445 | 403 |
if (joinType.equals("M") || joinType.equals("A")) {
|
| 446 | 404 |
|
| 447 |
- // 크롬 SameSite정책 방지 - 도메인이 다른 타사로 이동 시 크롬 정책에 의해 세션 유실이 일어나는 경우가 있는데, 이를 방지하기 위해 |
|
| 448 |
- // samesite 보안을 none처리 |
|
| 449 |
- /* |
|
| 450 |
- * response.setHeader("Set-Cookie",
|
|
| 451 |
- * "AuthKmcCertVO=AuthKmcCertVO; Secure; SameSite=None"); //KMC 문자 본인인증 세션 정보 |
|
| 452 |
- * 받아오기 AuthCertVO certKmcVO = (AuthCertVO) |
|
| 453 |
- * session.getAttribute("AuthKmcCertVO");
|
|
| 454 |
- * |
|
| 455 |
- * if(certKmcVO != null) {
|
|
| 456 |
- * |
|
| 457 |
- * mberManageVO.setNiceNm(certKmcVO.getCertName()); //본인인증 이름 |
|
| 458 |
- * mberManageVO.setMoblphonNo(certKmcVO.getCertPhone()); //본인인증 핸드폰 |
|
| 459 |
- * mberManageVO.setMblDn(certKmcVO.getCertDi()); //본인인증 중복가입방지 번호 |
|
| 460 |
- * mberManageVO.setNationality(certKmcVO.getCertNation()); |
|
| 461 |
- * mberManageVO.setBirthDay(certKmcVO.getBirthDay()); |
|
| 462 |
- * mberManageVO.setSexdstnCode(certKmcVO.getSexdstnCode()); |
|
| 463 |
- * |
|
| 464 |
- * } |
|
| 465 |
- */ |
|
| 466 |
- |
|
| 467 | 405 |
} else {
|
| 468 | 406 |
|
| 469 | 407 |
// ARS 전화 본인인증 세션 정보 받아오기 |
... | ... | @@ -477,18 +415,6 @@ |
| 477 | 415 |
|
| 478 | 416 |
} |
| 479 | 417 |
|
| 480 |
- // 나이스 본인인증을 했을때 세션처리 후 데이터 저장해주기. |
|
| 481 |
- /* |
|
| 482 |
- * MberManageVO VO = new MberManageVO(); if (null != |
|
| 483 |
- * request.getSession().getAttribute("userSearchVO")) { // 세션체크 VO =
|
|
| 484 |
- * ((MberManageVO) request.getSession().getAttribute("userSearchVO"));
|
|
| 485 |
- * mberManageVO.setNiceNm(VO.getNiceNm()); // 이름 |
|
| 486 |
- * mberManageVO.setSexdstnCode(VO.getSexdstnCode()); // 성별 |
|
| 487 |
- * mberManageVO.setMoblphonNo(VO.getMoblphonNo()); // 핸드폰번호 |
|
| 488 |
- * mberManageVO.setBirthDay(VO.getBirthDay()); // 생년월일 |
|
| 489 |
- * mberManageVO.setMblDn(VO.getMblDn()); // 모바일 인증키 |
|
| 490 |
- * session.removeAttribute("userSearchVO"); }
|
|
| 491 |
- */ |
|
| 492 | 418 |
model.addAttribute("mberManageVO", mberManageVO);
|
| 493 | 419 |
|
| 494 | 420 |
// B선라인 |
... | ... | @@ -1012,9 +938,7 @@ |
| 1012 | 938 |
@RequestMapping(value = "/web/user/login/usrJoinComplete.do") |
| 1013 | 939 |
public String selectUserComplete(@ModelAttribute("mberManageVO") MberManageVO mberManageVO, ModelMap model,
|
| 1014 | 940 |
HttpSession session) throws Exception {
|
| 1015 |
- |
|
| 1016 |
- LoginVO loginVo = (LoginVO) session.getAttribute("LoginVO");
|
|
| 1017 |
- model.addAttribute("mberManageVO", loginVo);
|
|
| 941 |
+ model.addAttribute("mberManageVO", mberManageVO);
|
|
| 1018 | 942 |
|
| 1019 | 943 |
return "web/login/usrInserCompl"; |
| 1020 | 944 |
} |
... | ... | @@ -1029,21 +953,6 @@ |
| 1029 | 953 |
|
| 1030 | 954 |
return "web/login/usrInserMemShipCompl"; |
| 1031 | 955 |
} |
| 1032 |
- |
|
| 1033 |
- /* |
|
| 1034 |
- *//** |
|
| 1035 |
- * (관리자)로그인 화면으로 들어간다 |
|
| 1036 |
- * |
|
| 1037 |
- * @param vo |
|
| 1038 |
- * - 로그인후 이동할 URL이 담긴 LoginVO |
|
| 1039 |
- * @return 로그인 페이지 |
|
| 1040 |
- * @exception Exception |
|
| 1041 |
- *//* |
|
| 1042 |
- * @RequestMapping(value = "/uat/uia/egovLoginUsr.do") public String |
|
| 1043 |
- * loginUsrView(@ModelAttribute("loginVO") LoginVO loginVO, HttpServletRequest
|
|
| 1044 |
- * request, HttpServletResponse response, ModelMap model) throws Exception {
|
|
| 1045 |
- * return "uat/uia/EgovLoginUsr"; } |
|
| 1046 |
- */ |
|
| 1047 | 956 |
|
| 1048 | 957 |
/** |
| 1049 | 958 |
* (관리자) 로그인 화면. |
... | ... | @@ -1071,63 +980,21 @@ |
| 1071 | 980 |
public String userLogin(HttpServletRequest request, HttpServletResponse response, ModelMap model, |
| 1072 | 981 |
@RequestParam Map<String, Object> commandMap, HttpSession session) throws Exception {
|
| 1073 | 982 |
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated(); |
| 1074 |
- if (isAuthenticated) |
|
| 1075 |
- return "redirect:/"; |
|
| 983 |
+ if (isAuthenticated) return "redirect:/"; |
|
| 1076 | 984 |
|
| 1077 |
- // 로그인필요 URL 호출하여 온경우 |
|
| 1078 | 985 |
String beforeUrl = (String) commandMap.get("beforeUrl");
|
| 1079 | 986 |
String message = (String) commandMap.get("message");
|
| 1080 | 987 |
String goEventPay = (String) commandMap.get("goEventPay");
|
| 1081 |
- |
|
| 1082 |
- /* |
|
| 1083 |
- * 헤더에서 id/pw는 맞지만 보안로그인 설정 되어있을때 -> secure |
|
| 1084 |
- * |
|
| 1085 |
- */ |
|
| 1086 | 988 |
|
| 1087 | 989 |
String headerLoginResult = (String) commandMap.get("headerLoginResult");
|
| 1088 | 990 |
String id = (String) commandMap.get("id");
|
| 1089 | 991 |
String pw = (String) commandMap.get("password");
|
| 1090 |
- |
|
| 1091 |
- // sns 회원가입 key 값 설정 |
|
| 1092 |
-// String naverClientId = itnNaverClientId; |
|
| 1093 |
-// String naverClientSecret = itnNaverClientSecret; |
|
| 1094 |
-// |
|
| 1095 |
-// String kakaoRestApiKey = itnKakaoRestApiKey; |
|
| 1096 |
-// String kakaoReturnUrl = itnKakaoReturnUrl; |
|
| 1097 | 992 |
|
| 1098 | 993 |
// config 정보 가져오기 |
| 1099 | 994 |
MberManageConfigVO mberConfigVO = new MberManageConfigVO(); |
| 1100 | 995 |
|
| 1101 | 996 |
List<MberManageConfigVO> mberManageCnfVO = mberManageService.selectMberCnf(mberConfigVO); |
| 1102 | 997 |
|
| 1103 |
- /*for (int i = 0; i < mberManageCnfVO.size(); i++) {
|
|
| 1104 |
- if (mberManageCnfVO.get(i).getIsSns().equals("Y")) {
|
|
| 1105 |
- if (mberManageCnfVO.get(i).getUseYn().equals("Y")) {
|
|
| 1106 |
- if (mberManageCnfVO.get(i).getConfigId().equals("snsNaver")) {
|
|
| 1107 |
- String redirectURI = URLEncoder.encode(itnNaverReturnUrl, "UTF-8"); |
|
| 1108 |
- SecureRandom random = new SecureRandom(); |
|
| 1109 |
- BigInteger state = new BigInteger(130, random); |
|
| 1110 |
- String naver_url = "https://nid.naver.com/oauth2.0/authorize?response_type=code"; |
|
| 1111 |
- naver_url += "&client_id=" + itnNaverClientId; |
|
| 1112 |
- naver_url += "&redirect_url=" + redirectURI; |
|
| 1113 |
- naver_url += "&state=" + state; |
|
| 1114 |
- mberManageCnfVO.get(i).setSiteUrl(naver_url); |
|
| 1115 |
- mberManageCnfVO.get(i).setSiteIcon("/img/login_naver_icon.png");
|
|
| 1116 |
- |
|
| 1117 |
- } else if (mberManageCnfVO.get(i).getConfigId().equals("snsKakao")) {
|
|
| 1118 |
- |
|
| 1119 |
- String kakao_url = "https://kauth.kakao.com/oauth/authorize?response_type=code"; |
|
| 1120 |
- kakao_url += "&client_id=" + kakaoRestApiKey; |
|
| 1121 |
- kakao_url += "&redirect_uri=" + kakaoReturnUrl; |
|
| 1122 |
- mberManageCnfVO.get(i).setSiteUrl(kakao_url); |
|
| 1123 |
- mberManageCnfVO.get(i).setSiteIcon("/img/login_kakao_icon.png");
|
|
| 1124 |
- |
|
| 1125 |
- } else if (mberManageCnfVO.get(i).getConfigId().equals("snsGoogle")) {
|
|
| 1126 |
- |
|
| 1127 |
- } |
|
| 1128 |
- } |
|
| 1129 |
- } |
|
| 1130 |
- }*/ |
|
| 1131 | 998 |
model.addAttribute("mberManageCnfVO", mberManageCnfVO);
|
| 1132 | 999 |
model.addAttribute("beforeUrl", beforeUrl);
|
| 1133 | 1000 |
model.addAttribute("message", message);
|
... | ... | @@ -1135,16 +1002,8 @@ |
| 1135 | 1002 |
|
| 1136 | 1003 |
// 공인 IP 구하기 |
| 1137 | 1004 |
String userIp = EgovClntInfo.getClntIP(request); |
| 1138 |
- System.out.println("userIp :: "+userIp);
|
|
| 1139 |
- // java.util.Scanner s = new java.util.Scanner(new |
|
| 1140 |
- // java.net.URL("https://api.ipify.org").openStream(),
|
|
| 1141 |
- // "UTF-8").useDelimiter("\\A");
|
|
| 1142 |
- // userIp = s.next(); |
|
| 1143 |
- |
|
| 1144 | 1005 |
model.addAttribute("userIp", userIp);
|
| 1145 | 1006 |
model.addAttribute("goEventPay", goEventPay);
|
| 1146 |
- |
|
| 1147 |
- |
|
| 1148 | 1007 |
if(StringUtil.isNotEmpty(headerLoginResult)) {
|
| 1149 | 1008 |
model.addAttribute("id_secure", id);
|
| 1150 | 1009 |
model.addAttribute("pw_secure", pw);
|
... | ... | @@ -1154,7 +1013,7 @@ |
| 1154 | 1013 |
|
| 1155 | 1014 |
model.addAttribute("headerLoginResult", headerLoginResult);
|
| 1156 | 1015 |
|
| 1157 |
- return "web/login/EgovLoginGnrlUsr"; |
|
| 1016 |
+ return "web/login/login"; |
|
| 1158 | 1017 |
} |
| 1159 | 1018 |
|
| 1160 | 1019 |
/** |
... | ... | @@ -1811,323 +1670,130 @@ |
| 1811 | 1670 |
return "redirect:/"; |
| 1812 | 1671 |
} |
| 1813 | 1672 |
} |
| 1814 |
- |
|
| 1815 |
- /** |
|
| 1816 |
- * @Method Name : selectUserSttusAjax |
|
| 1817 |
- * @작성일 : 2024. 3. 27. |
|
| 1818 |
- * @작성자 : WYH |
|
| 1819 |
- * @변경이력 : |
|
| 1820 |
- * @Method 설명 : 회원상태 조회 (Y:일반회원, B:이용정지 회원, N:탈퇴회원) |
|
| 1821 |
- */ |
|
| 1822 |
- /* |
|
| 1823 |
- @RequestMapping(value = { "/web/user/login/actionSecurityLoginAjax.do" })
|
|
| 1824 |
- public ModelAndView actionSecurityLoginAjax(@ModelAttribute("loginVO") LoginVO loginVO, HttpServletResponse response,
|
|
| 1825 |
- HttpServletRequest request, @RequestParam Map<String, Object> commandMap, ModelMap model, |
|
| 1826 |
- HttpSession session, RedirectAttributes redirectAttributes) throws Exception {
|
|
| 1827 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 1828 |
- modelAndView.setViewName("jsonView");
|
|
| 1829 |
- |
|
| 1830 |
- String p_id = ""; |
|
| 1831 |
- String p_pwd = ""; |
|
| 1832 |
- |
|
| 1833 |
- try {
|
|
| 1834 |
- //id, pwd 로그인 하고 결과와 hp 번호를 돌려주면 됨 |
|
| 1835 |
- p_id = request.getParameter("id");
|
|
| 1836 |
- p_pwd = request.getParameter("password");
|
|
| 1837 |
- |
|
| 1838 |
- |
|
| 1839 |
- |
|
| 1840 |
- String userId = mjonMsgVO.getUserId(); |
|
| 1841 |
- String userSttus = userManageService.selectUserStatusInfoCheck(userId); |
|
| 1842 |
- |
|
| 1843 |
- modelAndView.addObject("status", "success");
|
|
| 1844 |
- modelAndView.addObject("userSttus", userSttus);
|
|
| 1845 |
- |
|
| 1846 |
- } catch (Exception e) {
|
|
| 1847 |
- modelAndView.addObject("status", "fail");
|
|
| 1848 |
- modelAndView.addObject("msg", "인증에 실패하였습니다.");
|
|
| 1849 |
- } |
|
| 1850 |
- |
|
| 1851 |
- return modelAndView; |
|
| 1852 |
- } |
|
| 1853 |
- */ |
|
| 1854 |
- |
|
| 1673 |
+ |
|
| 1855 | 1674 |
@RequestMapping(value = "/web/user/login/actionSecurityLoginBeforeHpAjax.do") |
| 1856 |
- public ModelAndView selectActionSecurityLoginWebBeforeHp(@ModelAttribute("loginVO") LoginVO loginVO, HttpServletResponse response,
|
|
| 1857 |
- HttpServletRequest request, @RequestParam Map<String, Object> commandMap, ModelMap model, |
|
| 1858 |
- HttpSession session, RedirectAttributes redirectAttributes) throws Exception {
|
|
| 1859 |
- |
|
| 1860 |
- |
|
| 1861 |
- |
|
| 1862 |
- ModelAndView modelAndView = new ModelAndView(); |
|
| 1863 |
- modelAndView.setViewName("jsonView");
|
|
| 1864 |
- |
|
| 1675 |
+ public ModelAndView selectActionSecurityLoginWebBeforeHp( |
|
| 1676 |
+ @ModelAttribute("loginVO") LoginVO loginVO,
|
|
| 1677 |
+ HttpServletRequest request, |
|
| 1678 |
+ @RequestParam Map<String, Object> commandMap, |
|
| 1679 |
+ HttpSession session |
|
| 1680 |
+ ) throws Exception {
|
|
| 1865 | 1681 |
String userIp = EgovClntInfo.getClntIP(request); |
| 1866 |
- HackIpVO hackIpVO = new HackIpVO(); |
|
| 1867 |
- hackIpVO.setAccessIp(userIp); |
|
| 1868 |
- hackIpVO.setBlockYn("Y");
|
|
| 1869 |
- if (null != hackIpService.selectHackIpVO(hackIpVO)) {
|
|
| 1870 |
- String message = "차단된 아이피입니다. 관리자에게 문의해 주십시요."; |
|
| 1871 |
- |
|
| 1872 |
- modelAndView.addObject("status", "fail");
|
|
| 1873 |
- modelAndView.addObject("msg", message);
|
|
| 1874 |
- return modelAndView; |
|
| 1875 |
- |
|
| 1682 |
+ |
|
| 1683 |
+ if (hackIpService.isBlockedIp(userIp)) {
|
|
| 1684 |
+ return fail("차단된 아이피입니다. 관리자에게 문의해 주십시요.");
|
|
| 1876 | 1685 |
} |
| 1877 |
- |
|
| 1878 |
- /*ScriptEngineManager engine = new ScriptEngineManager();*/ |
|
| 1879 |
- |
|
| 1880 | 1686 |
loginVO.setUserSe("USR");
|
| 1881 |
- // 로그인 정보 check |
|
| 1882 | 1687 |
|
| 1883 |
- if (loginVO.getId() == null || loginVO.getPassword() == null) {
|
|
| 1884 |
- // 회원가입 시 로그인 처리 |
|
| 1885 |
- LoginVO pLoginVO = (LoginVO) request.getAttribute("pLoginVO");
|
|
| 1886 |
- if (pLoginVO == null) {
|
|
| 1887 |
- // RSA 키 생성 |
|
| 1888 |
- initRsa(request); |
|
| 1889 |
- /* return "redirect:/web/user/login/login.do"; */ |
|
| 1890 |
- //return "redirect:/"; |
|
| 1891 |
- |
|
| 1892 |
- String message = "로그인 실패했습니다."; |
|
| 1893 |
- |
|
| 1894 |
- modelAndView.addObject("status", "fail");
|
|
| 1895 |
- modelAndView.addObject("msg", message);
|
|
| 1896 |
- return modelAndView; |
|
| 1897 |
- |
|
| 1898 |
- } else {
|
|
| 1899 |
- loginVO.setId(pLoginVO.getId()); |
|
| 1900 |
- loginVO.setPassword(pLoginVO.getPassword()); |
|
| 1901 |
- loginVO.setBeforeUrl(pLoginVO.getBeforeUrl()); |
|
| 1902 |
- loginVO.setMessage(pLoginVO.getMessage()); |
|
| 1903 |
- } |
|
| 1688 |
+ if (!resolveLoginInfo(loginVO, request)) {
|
|
| 1689 |
+ initRsa(request); |
|
| 1690 |
+ return fail("로그인 실패했습니다.");
|
|
| 1904 | 1691 |
} |
| 1905 | 1692 |
|
| 1906 |
- // 1. 일반 로그인 처리 |
|
| 1907 | 1693 |
PrivateKey privateKey = (PrivateKey) session.getAttribute(EgovLoginController.RSA_WEB_KEY); |
| 1908 | 1694 |
if (privateKey == null) {
|
| 1909 | 1695 |
initRsa(request); |
| 1910 |
- /*return "web/site/login/EgovLoginGnrlUsr";*/ |
|
| 1911 |
- String message = "아이디와 비밀번호를 확인해주세요."; |
|
| 1912 |
- redirectAttributes.addFlashAttribute("message", message);
|
|
| 1913 |
- System.out.println("======================================================");
|
|
| 1914 |
- System.out.println("= RSA privateKey is null =");
|
|
| 1915 |
- System.out.println("======================================================");
|
|
| 1916 |
- |
|
| 1917 |
- modelAndView.addObject("status", "fail");
|
|
| 1918 |
- modelAndView.addObject("msg", message);
|
|
| 1919 |
- return modelAndView; |
|
| 1920 |
- |
|
| 1696 |
+ return fail("아이디 또는 비밀번호가 올바르지 않습니다.");
|
|
| 1921 | 1697 |
} |
| 1922 |
- |
|
| 1923 |
- LoginVO resultVO; |
|
| 1924 |
- // 복호화 |
|
| 1925 |
- String id = ""; |
|
| 1698 |
+ String id; |
|
| 1699 |
+ String password; |
|
| 1926 | 1700 |
try {
|
| 1927 |
- //아이디 복호화 후 소문자 변환 |
|
| 1928 | 1701 |
id = decryptRsa(privateKey, loginVO.getId()).toLowerCase(); |
| 1702 |
+ password = decryptRsa(privateKey, loginVO.getPassword()); |
|
| 1929 | 1703 |
} catch (Exception e) {
|
| 1930 |
- initRsa(request); |
|
| 1931 |
- |
|
| 1932 |
- String message = "로그인 실패했습니다."; |
|
| 1933 |
- |
|
| 1934 |
- modelAndView.addObject("status", "fail");
|
|
| 1935 |
- modelAndView.addObject("msg", message);
|
|
| 1936 |
- return modelAndView; |
|
| 1937 |
- |
|
| 1704 |
+ id = loginVO.getId(); |
|
| 1705 |
+ password = loginVO.getPassword(); |
|
| 1938 | 1706 |
} |
| 1939 |
- String password = decryptRsa(privateKey, loginVO.getPassword()); |
|
| 1940 | 1707 |
loginVO.setId(id); |
| 1941 |
- loginVO.setIp(EgovClntInfo.getClntIP(request)); |
|
| 1942 | 1708 |
loginVO.setPassword(password); |
| 1709 |
+ loginVO.setIp(userIp); |
|
| 1943 | 1710 |
loginVO.setUserSe("GNR");
|
| 1944 |
- loginVO.setStatusAll("Y"); // 신청대기중인 사용자까지 조회
|
|
| 1945 |
- |
|
| 1946 |
- //기업회원 가입중인지 체크 - 기존 로그인 select는 MBER_STTUS = 'Y'가 하드코딩이라 로그인 전 기업회원 가입중인지 선 체크 |
|
| 1947 |
- //암호화 2번 방지를 위한 LoginVO 생성 |
|
| 1948 |
- LoginVO loginCmpChkVO = new LoginVO(); |
|
| 1949 |
- loginCmpChkVO.setId(id); |
|
| 1950 |
- loginCmpChkVO.setIp(EgovClntInfo.getClntIP(request)); |
|
| 1951 |
- loginCmpChkVO.setPassword(password); |
|
| 1952 |
- loginCmpChkVO.setUserSe("GNR");
|
|
| 1953 |
- loginCmpChkVO.setStatusAll("Y"); // 신청대기중인 사용자까지 조회
|
|
| 1954 |
- loginCmpChkVO.setEmplyrSttusCode("A"); // 신청대기중인 사용자까지 조회
|
|
| 1955 |
- LoginVO cmpHstResultVO = loginService.actionLoginCmpChk(loginCmpChkVO); |
|
| 1956 |
- if(null != cmpHstResultVO.getId()) {
|
|
| 1957 |
- //기업회원 정보 마지막 내역 조회 |
|
| 1958 |
- MberManageVO mberManageVO = new MberManageVO(); |
|
| 1959 |
- mberManageVO.setMberId(loginVO.getId()); |
|
| 1960 |
- MberManageVO cmpChangeManageVO = mberManageService.selectCmpUsrHst(mberManageVO); |
|
| 1961 |
- if(null != cmpChangeManageVO) {
|
|
| 1962 |
- if("01".equals(cmpChangeManageVO.getHstType())) { //가장 마지막 내역이 기업회원 가입일 시
|
|
| 1963 |
- if("01".equals(cmpChangeManageVO.getHstSttus()) || "03".equals(cmpChangeManageVO.getHstSttus()) ) { //가장 마지막 기업회원 가입이 신청 또는 반려 상태일 시
|
|
| 1711 |
+ loginVO.setStatusAll("Y");
|
|
| 1964 | 1712 |
|
| 1965 |
- String message = "기업회원 신청 또는 반려상태입니다."; |
|
| 1966 |
- modelAndView.addObject("returnType", "B");
|
|
| 1967 |
- modelAndView.addObject("mberId", loginVO.getId());
|
|
| 1968 |
- modelAndView.addObject("status", "fail");
|
|
| 1969 |
- modelAndView.addObject("msg", message);
|
|
| 1970 |
- return modelAndView; |
|
| 1971 |
- } |
|
| 1972 |
- } |
|
| 1973 |
- } |
|
| 1974 |
- } |
|
| 1975 |
- //스팸처리 회원인지 mj_spam_member_info 해당 ID의 최근 1개 데이터 조회 |
|
| 1976 |
- LoginVO loginSmiChkVO = new LoginVO(); |
|
| 1977 |
- loginSmiChkVO.setId(id); |
|
| 1978 |
- loginSmiChkVO.setIp(EgovClntInfo.getClntIP(request)); |
|
| 1979 |
- loginSmiChkVO.setPassword(password); |
|
| 1980 |
- loginSmiChkVO.setUserSe("GNR");
|
|
| 1981 |
- loginSmiChkVO.setStatusAll("Y"); // 신청대기중인 사용자까지 조회
|
|
| 1982 |
- loginSmiChkVO.setEmplyrSttusCode("B"); // 회원상태 B : 회원 탈퇴정보
|
|
| 1983 |
- LoginVO smiResultVO = loginService.actionLoginCmpChk(loginSmiChkVO); |
|
| 1984 |
- if(null != smiResultVO.getId()) {
|
|
| 1985 |
- modelAndView.addObject("returnType", "C");
|
|
| 1986 |
- modelAndView.addObject("mberId", loginVO.getId());
|
|
| 1987 |
- modelAndView.addObject("status", "fail");
|
|
| 1988 |
- return modelAndView; |
|
| 1989 |
- } |
|
| 1990 |
- resultVO = loginService.actionLogin(loginVO); |
|
| 1991 |
- LoginVO passMissVO = loginService.selectPassMiss(loginVO); |
|
| 1992 |
- |
|
| 1993 |
- String alertMessage = ""; |
|
| 1994 |
- if (!"admin".equals(loginVO.getId())) {
|
|
| 1995 |
- //아이디가 존재 |
|
| 1996 |
- if(passMissVO != null) {
|
|
| 1997 |
- // 로그인 실패 ( |
|
| 1998 |
- if (null == resultVO.getId() && passMissVO.getPassMiss() < 5 ) {
|
|
| 1999 |
- loginService.updatePassMissPlus(loginVO); |
|
| 2000 |
- alertMessage = egovMessageSource.getMessage("fail.common.login");
|
|
| 2001 |
- |
|
| 2002 |
- // 로그인 실패시 해킹의심 IP 테이블에 등록_아이디는 있지만 비밀번호가 틀린상황 |
|
| 2003 |
- /// HackIpVO hackIpVO = new HackIpVO(); |
|
| 2004 |
- hackIpVO.setHackUserId(loginVO.getId()); |
|
| 2005 |
- hackIpVO.setAccessIp( EgovClntInfo.getClntIP(request)); |
|
| 2006 |
- hackIpService.insertHackIp(hackIpVO); |
|
| 2007 |
- if (loginVO.getBeforeUrl().toString().contains("/web/user/login/login.do")) {
|
|
| 2008 |
- String message = "로그인 실패했습니다."; |
|
| 2009 |
- |
|
| 2010 |
- modelAndView.addObject("status", "fail");
|
|
| 2011 |
- modelAndView.addObject("msg", message);
|
|
| 2012 |
- return modelAndView; |
|
| 2013 |
- } |
|
| 2014 |
- |
|
| 2015 |
- String message = "로그인 실패했습니다."; |
|
| 2016 |
- |
|
| 2017 |
- modelAndView.addObject("status", "fail");
|
|
| 2018 |
- modelAndView.addObject("msg", message);
|
|
| 2019 |
- return modelAndView; |
|
| 2020 |
- |
|
| 2021 |
- } else {
|
|
| 2022 |
- if (passMissVO.getPassMiss() >= 5) {
|
|
| 2023 |
- //alertMessage = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 비밀번호를 재설정해주세요."; |
|
| 2024 |
- String message = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 비밀번호를 재설정해주세요."; |
|
| 2025 |
- |
|
| 2026 |
- modelAndView.addObject("status", "fail");
|
|
| 2027 |
- modelAndView.addObject("msg", message);
|
|
| 2028 |
- return modelAndView; |
|
| 2029 |
- } /* |
|
| 2030 |
- * else if("A".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2031 |
- * "신청하신 아이디가 현제 승인대기 상" + "태입니다."; return goUserLoginPage(redirectAttributes, |
|
| 2032 |
- * request, model, alertMessage); }else |
|
| 2033 |
- * if("B".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2034 |
- * "아이디가 차단상태가 되어 사용할수 없습니다."; return goUserLoginPage(redirectAttributes, |
|
| 2035 |
- * request, model, alertMessage); } |
|
| 2036 |
- */ |
|
| 2037 |
- loginService.updatePassMissReset(loginVO); |
|
| 2038 |
- } |
|
| 2039 |
- } |
|
| 2040 |
- //아이디 미존재 |
|
| 2041 |
- else {
|
|
| 2042 |
- alertMessage = egovMessageSource.getMessage("fail.common.login");
|
|
| 2043 |
- |
|
| 2044 |
- // 로그인 실패시 해킹의심 IP 테이블에 등록_아이디없고 비밀번호도 틀린상황 |
|
| 2045 |
- /// HackIpVO hackIpVO = new HackIpVO(); |
|
| 2046 |
- hackIpVO.setHackUserId(loginVO.getId()); |
|
| 2047 |
- hackIpVO.setAccessIp(EgovClntInfo.getClntIP(request)); |
|
| 2048 |
- hackIpService.insertHackIp(hackIpVO); |
|
| 2049 |
- if (loginVO.getBeforeUrl().toString().contains("/web/user/login/login.do")) {
|
|
| 2050 |
- String message = "로그인 실패했습니다."; |
|
| 2051 |
- |
|
| 2052 |
- modelAndView.addObject("status", "fail");
|
|
| 2053 |
- modelAndView.addObject("msg", message);
|
|
| 2054 |
- return modelAndView; |
|
| 2055 |
- } |
|
| 2056 |
- |
|
| 2057 |
- String message = "로그인 실패했습니다."; |
|
| 2058 |
- |
|
| 2059 |
- modelAndView.addObject("status", "fail");
|
|
| 2060 |
- modelAndView.addObject("msg", message);
|
|
| 2061 |
- return modelAndView; |
|
| 2062 |
- } |
|
| 1713 |
+ LoginVO companyMember = loginService.findMemberByStatus(id, password, userIp, "A"); |
|
| 1714 |
+ if (companyMember != null && companyMember.getId() != null && mberManageService.isCompanyRegistrationPendingOrRejected(id)) {
|
|
| 1715 |
+ return fail("기업회원 신청 또는 반려상태입니다.", "B", id);
|
|
| 2063 | 1716 |
} |
| 2064 | 1717 |
|
| 2065 |
- |
|
| 2066 |
- /* 일시 : 2023.07.26 |
|
| 2067 |
- * 내용 : 로그인시 휴먼고객 redirect 기능 추가 |
|
| 2068 |
- * 작업자 : 원영현 과장 |
|
| 2069 |
- */ |
|
| 2070 |
- |
|
| 2071 |
- if(resultVO.getDormantYn().equals("Y") || resultVO.getDormantYn() == "Y") {
|
|
| 2072 |
- |
|
| 2073 |
- String message = "휴면계정입니다."; |
|
| 2074 |
- modelAndView.addObject("returnType", "A");
|
|
| 2075 |
- modelAndView.addObject("status", "fail");
|
|
| 2076 |
- modelAndView.addObject("msg", message);
|
|
| 2077 |
- return modelAndView; |
|
| 1718 |
+ LoginVO spamMember = loginService.findMemberByStatus(id, password, userIp, "B"); |
|
| 1719 |
+ if (spamMember != null && spamMember.getId() != null) {
|
|
| 1720 |
+ return fail(null, "C", id); |
|
| 2078 | 1721 |
} |
| 2079 |
- |
|
| 2080 |
- String message = "로그인 성공했습니다."; |
|
| 2081 |
- |
|
| 2082 |
- |
|
| 2083 |
- |
|
| 2084 |
- |
|
| 2085 | 1722 |
|
| 2086 |
- /* 일시 : 2024.11.18 |
|
| 2087 |
- * 내용 : 다중 인증번호 조회 |
|
| 2088 |
- * 작업자 : 이호영 |
|
| 2089 |
- */ |
|
| 2090 |
- |
|
| 2091 |
- |
|
| 2092 |
- List<MberCertPhoneVO> mberCertPhoneList = certPhoneService.selectMberCertPhoneList(resultVO.getId()); |
|
| 2093 |
- |
|
| 2094 |
- |
|
| 2095 |
- modelAndView.addObject("status", "success");
|
|
| 2096 |
- modelAndView.addObject("msg", message);
|
|
| 2097 |
- modelAndView.addObject("data", resultVO);
|
|
| 2098 |
- modelAndView.addObject("mberCertPhoneList", mberCertPhoneList);
|
|
| 2099 |
- |
|
| 2100 |
- |
|
| 2101 |
- |
|
| 2102 |
- |
|
| 2103 |
- /* 일시 : 2024.11.21 |
|
| 2104 |
- * 내용 : 패스 인증 조회 |
|
| 2105 |
- * 작업자 : 이호영 |
|
| 2106 |
- */ |
|
| 2107 |
- String userId = loginVO.getId(); |
|
| 2108 |
- // lettngnrlmber TB에 secuLoginFlag 값이 Y면 인증 해야함 |
|
| 2109 |
- String secuLoginFlag = mberManageService.getSecuLoginFlag(userId); |
|
| 2110 |
- |
|
| 2111 |
- String passFlag = "Y"; |
|
| 2112 |
- if("Y".equals(secuLoginFlag)) {
|
|
| 2113 |
- // lettngnrlmber TB에 secuLoginFlag 값이 Y면 |
|
| 2114 |
- // IP가 등록 되어 있는지 확인 |
|
| 2115 |
- // 있으면 2차인증 안함 |
|
| 2116 |
- // 없으면 2차인증 진행 |
|
| 2117 |
- MberCertIpVO mberCertIpVO = new MberCertIpVO(); |
|
| 2118 |
- mberCertIpVO.setCertIp(userIp); |
|
| 2119 |
- mberCertIpVO.setMberId(userId); |
|
| 2120 |
- // ip가 있으면 true |
|
| 2121 |
- if(!certIpService.checkCertIp(mberCertIpVO)) {
|
|
| 2122 |
- passFlag = "N"; |
|
| 2123 |
- } |
|
| 1723 |
+ LoginVO resultVO = loginService.actionLogin(loginVO); |
|
| 1724 |
+ String loginFailure = loginService.validateLoginResult(loginVO, resultVO, userIp); |
|
| 1725 |
+ if(loginFailure != null) {
|
|
| 1726 |
+ ModelAndView failure = fail(loginFailure); |
|
| 1727 |
+ failure.addObject("locked", loginFailure.startsWith("5회 이상 로그인에 실패"));
|
|
| 1728 |
+ return failure; |
|
| 2124 | 1729 |
} |
| 2125 |
- modelAndView.addObject("passFlag", passFlag);
|
|
| 2126 |
- |
|
| 2127 |
- |
|
| 2128 |
- return modelAndView; |
|
| 2129 |
- |
|
| 2130 | 1730 |
|
| 1731 |
+ if("Y".equals(resultVO.getDormantYn())) {
|
|
| 1732 |
+ return fail("휴면계정입니다.", "A", null);
|
|
| 1733 |
+ } |
|
| 1734 |
+ |
|
| 1735 |
+ List<MberCertPhoneVO> phoneList = certPhoneService.selectMberCertPhoneList(resultVO.getId()); |
|
| 1736 |
+ |
|
| 1737 |
+ session.setAttribute(PhoneResetSessionConstants.PENDING_USER_ID, resultVO.getId()); |
|
| 1738 |
+ session.setAttribute(PhoneResetSessionConstants.PENDING_AT, System.currentTimeMillis()); |
|
| 1739 |
+ resetSecondAuthSendState(session); |
|
| 1740 |
+ |
|
| 1741 |
+ ModelAndView mav = new ModelAndView("jsonView");
|
|
| 1742 |
+ |
|
| 1743 |
+ mav.addObject("status", "success");
|
|
| 1744 |
+ mav.addObject("msg", "로그인 성공했습니다.");
|
|
| 1745 |
+ mav.addObject("data", loginVO);
|
|
| 1746 |
+ mav.addObject("mberCertPhoneList", phoneList);
|
|
| 1747 |
+ |
|
| 1748 |
+ return mav; |
|
| 1749 |
+ } |
|
| 1750 |
+ |
|
| 1751 |
+ private ModelAndView fail(String message) {
|
|
| 1752 |
+ return fail(message, null, null); |
|
| 1753 |
+ } |
|
| 1754 |
+ |
|
| 1755 |
+ private ModelAndView fail( |
|
| 1756 |
+ String message, |
|
| 1757 |
+ String returnType, |
|
| 1758 |
+ String memberId |
|
| 1759 |
+ ) {
|
|
| 1760 |
+ ModelAndView mav = new ModelAndView("jsonView");
|
|
| 1761 |
+ mav.addObject("status", "fail");
|
|
| 1762 |
+ mav.addObject("msg", message);
|
|
| 1763 |
+ |
|
| 1764 |
+ if (returnType != null) {
|
|
| 1765 |
+ mav.addObject("returnType", returnType);
|
|
| 1766 |
+ } |
|
| 1767 |
+ |
|
| 1768 |
+ if (memberId != null) {
|
|
| 1769 |
+ mav.addObject("mberId", memberId);
|
|
| 1770 |
+ } |
|
| 1771 |
+ |
|
| 1772 |
+ return mav; |
|
| 1773 |
+ } |
|
| 1774 |
+ |
|
| 1775 |
+ private boolean resolveLoginInfo( |
|
| 1776 |
+ LoginVO loginVO, |
|
| 1777 |
+ HttpServletRequest request |
|
| 1778 |
+ ) {
|
|
| 1779 |
+ |
|
| 1780 |
+ if (loginVO.getId() != null && loginVO.getPassword() != null) {
|
|
| 1781 |
+ return true; |
|
| 1782 |
+ } |
|
| 1783 |
+ |
|
| 1784 |
+ LoginVO previousLogin = |
|
| 1785 |
+ (LoginVO) request.getAttribute("pLoginVO");
|
|
| 1786 |
+ |
|
| 1787 |
+ if (previousLogin == null) {
|
|
| 1788 |
+ return false; |
|
| 1789 |
+ } |
|
| 1790 |
+ |
|
| 1791 |
+ loginVO.setId(previousLogin.getId()); |
|
| 1792 |
+ loginVO.setPassword(previousLogin.getPassword()); |
|
| 1793 |
+ loginVO.setBeforeUrl(previousLogin.getBeforeUrl()); |
|
| 1794 |
+ loginVO.setMessage(previousLogin.getMessage()); |
|
| 1795 |
+ |
|
| 1796 |
+ return true; |
|
| 2131 | 1797 |
} |
| 2132 | 1798 |
|
| 2133 | 1799 |
@RequestMapping(value = "/web/user/login/actionSecurityLogin_ori_00.do") |
... | ... | @@ -2267,27 +1933,20 @@ |
| 2267 | 1933 |
redirectAttributes.addFlashAttribute("fail", true);
|
| 2268 | 1934 |
return "redirect:/web/user/login/login.do"; |
| 2269 | 1935 |
} |
| 2270 |
- |
|
| 1936 |
+ |
|
| 2271 | 1937 |
return goUserLoginPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2272 | 1938 |
} else {
|
| 2273 | 1939 |
if (passMissVO.getPassMiss() >= 5) {
|
| 2274 | 1940 |
alertMessage = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 비밀번호를 재설정해주세요."; |
| 2275 | 1941 |
return goUserPassMissPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2276 |
- } /* |
|
| 2277 |
- * else if("A".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2278 |
- * "신청하신 아이디가 현제 승인대기 상" + "태입니다."; return goUserLoginPage(redirectAttributes, |
|
| 2279 |
- * request, model, alertMessage); }else |
|
| 2280 |
- * if("B".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2281 |
- * "아이디가 차단상태가 되어 사용할수 없습니다."; return goUserLoginPage(redirectAttributes, |
|
| 2282 |
- * request, model, alertMessage); } |
|
| 2283 |
- */ |
|
| 1942 |
+ } |
|
| 2284 | 1943 |
loginService.updatePassMissReset(loginVO); |
| 2285 | 1944 |
} |
| 2286 | 1945 |
} |
| 2287 | 1946 |
//아이디 미존재 |
| 2288 | 1947 |
else {
|
| 2289 | 1948 |
alertMessage = egovMessageSource.getMessage("fail.common.login");
|
| 2290 |
- |
|
| 1949 |
+ |
|
| 2291 | 1950 |
// 로그인 실패시 해킹의심 IP 테이블에 등록_아이디없고 비밀번호도 틀린상황 |
| 2292 | 1951 |
/// HackIpVO hackIpVO = new HackIpVO(); |
| 2293 | 1952 |
hackIpVO.setHackUserId(loginVO.getId()); |
... | ... | @@ -2440,13 +2099,59 @@ |
| 2440 | 2099 |
} |
| 2441 | 2100 |
|
| 2442 | 2101 |
|
| 2443 |
- |
|
| 2102 |
+ |
|
| 2103 |
+ @RequestMapping(value = "/web/user/login/verifySecondAuthAjax.do", method = RequestMethod.POST) |
|
| 2104 |
+ public ModelAndView verifySecondAuthAjax( |
|
| 2105 |
+ @RequestParam("hp") String phone,
|
|
| 2106 |
+ @RequestParam("num") String verificationNumber,
|
|
| 2107 |
+ @RequestParam(value = "msgId", required = false) String msgId, |
|
| 2108 |
+ HttpServletRequest request, |
|
| 2109 |
+ HttpSession session) throws Exception {
|
|
| 2110 |
+ ModelAndView mav = new ModelAndView("jsonView");
|
|
| 2111 |
+ String userId = getPendingSecurityUserId(session); |
|
| 2112 |
+ if (StringUtils.isBlank(userId)) {
|
|
| 2113 |
+ mav.addObject("status", "fail");
|
|
| 2114 |
+ mav.addObject("message", "로그인 유효시간이 만료되었습니다. 다시 로그인해주세요.");
|
|
| 2115 |
+ return mav; |
|
| 2116 |
+ } |
|
| 2117 |
+ |
|
| 2118 |
+ SecondAuthLogVO secondAuthLogVO = createSecondAuthLogVO(userId, msgId, request); |
|
| 2119 |
+ if (secondAuthLogService.isSecondAuthLocked(secondAuthLogVO)) {
|
|
| 2120 |
+ return secondAuthLockedResponse(mav, secondAuthLogVO); |
|
| 2121 |
+ } |
|
| 2122 |
+ |
|
| 2123 |
+ if (!verificationNumber.matches("^\\d{6}$") || !isRegisteredSecurityPhone(userId, phone)) {
|
|
| 2124 |
+ return secondAuthFailureResponse(mav, secondAuthLogVO, session); |
|
| 2125 |
+ } |
|
| 2126 |
+ |
|
| 2127 |
+ SendLogVO sendLogVO = new SendLogVO(); |
|
| 2128 |
+ sendLogVO.setSendId(userId); |
|
| 2129 |
+ sendLogVO.setReceive(phone); |
|
| 2130 |
+ sendLogVO.setCheckNo(verificationNumber); |
|
| 2131 |
+ |
|
| 2132 |
+ if (mjonMsgDataService.selectSysMsgLogCheck(sendLogVO) == null) {
|
|
| 2133 |
+ return secondAuthFailureResponse(mav, secondAuthLogVO, session); |
|
| 2134 |
+ } |
|
| 2135 |
+ |
|
| 2136 |
+ mav.addObject("status", "success");
|
|
| 2137 |
+ return mav; |
|
| 2138 |
+ } |
|
| 2139 |
+ |
|
| 2444 | 2140 |
@RequestMapping(value = "/web/user/login/actionSecurityLoginAfterHp.do") |
| 2445 | 2141 |
public String selectActionSecurityLoginWebAfterHp(@ModelAttribute("loginVO") LoginVO loginVO, HttpServletResponse response,
|
| 2446 | 2142 |
HttpServletRequest request, @RequestParam Map<String, Object> commandMap, ModelMap model, |
| 2447 | 2143 |
HttpSession session, RedirectAttributes redirectAttributes) throws Exception {
|
| 2448 |
- |
|
| 2449 | 2144 |
String userIp = EgovClntInfo.getClntIP(request); |
| 2145 |
+ String s_hp = request.getParameter("hp");
|
|
| 2146 |
+ String s_num = request.getParameter("num");
|
|
| 2147 |
+ String msgId = request.getParameter("msgId");
|
|
| 2148 |
+ |
|
| 2149 |
+ SecondAuthLogVO secondAuthLogVO = new SecondAuthLogVO(); |
|
| 2150 |
+ secondAuthLogVO.setAccessIp(userIp); |
|
| 2151 |
+ secondAuthLogVO.setUserAgent(request.getHeader("User-Agent"));
|
|
| 2152 |
+ secondAuthLogVO.setAuthStep("SECONDARY");
|
|
| 2153 |
+ secondAuthLogVO.setMsgId(msgId); |
|
| 2154 |
+ |
|
| 2450 | 2155 |
HackIpVO hackIpVO = new HackIpVO(); |
| 2451 | 2156 |
hackIpVO.setAccessIp(userIp); |
| 2452 | 2157 |
hackIpVO.setBlockYn("Y");
|
... | ... | @@ -2455,19 +2160,12 @@ |
| 2455 | 2160 |
redirectAttributes.addFlashAttribute("message", message);
|
| 2456 | 2161 |
return "redirect:/"; |
| 2457 | 2162 |
} |
| 2458 |
- |
|
| 2459 |
- /*ScriptEngineManager engine = new ScriptEngineManager();*/ |
|
| 2460 |
- |
|
| 2461 | 2163 |
loginVO.setUserSe("USR");
|
| 2462 |
- // 로그인 정보 check |
|
| 2463 | 2164 |
|
| 2464 | 2165 |
if (loginVO.getId() == null || loginVO.getPassword() == null) {
|
| 2465 |
- // 회원가입 시 로그인 처리 |
|
| 2466 | 2166 |
LoginVO pLoginVO = (LoginVO) request.getAttribute("pLoginVO");
|
| 2467 | 2167 |
if (pLoginVO == null) {
|
| 2468 |
- // RSA 키 생성 |
|
| 2469 | 2168 |
initRsa(request); |
| 2470 |
- /* return "redirect:/web/user/login/login.do"; */ |
|
| 2471 | 2169 |
return "redirect:/"; |
| 2472 | 2170 |
} else {
|
| 2473 | 2171 |
loginVO.setId(pLoginVO.getId()); |
... | ... | @@ -2476,12 +2174,11 @@ |
| 2476 | 2174 |
loginVO.setMessage(pLoginVO.getMessage()); |
| 2477 | 2175 |
} |
| 2478 | 2176 |
} |
| 2479 |
- |
|
| 2177 |
+ |
|
| 2480 | 2178 |
// 1. 일반 로그인 처리 |
| 2481 | 2179 |
PrivateKey privateKey = (PrivateKey) session.getAttribute(EgovLoginController.RSA_WEB_KEY); |
| 2482 | 2180 |
if (privateKey == null) {
|
| 2483 | 2181 |
initRsa(request); |
| 2484 |
- /*return "web/site/login/EgovLoginGnrlUsr";*/ |
|
| 2485 | 2182 |
String message = "아이디와 비밀번호를 확인해주세요."; |
| 2486 | 2183 |
redirectAttributes.addFlashAttribute("message", message);
|
| 2487 | 2184 |
System.out.println("======================================================");
|
... | ... | @@ -2494,11 +2191,10 @@ |
| 2494 | 2191 |
// 복호화 |
| 2495 | 2192 |
String id = ""; |
| 2496 | 2193 |
try {
|
| 2497 |
- //아이디 복호화 후 소문자 변환 |
|
| 2498 | 2194 |
id = decryptRsa(privateKey, loginVO.getId()).toLowerCase(); |
| 2195 |
+ secondAuthLogVO.setTryLoginId(id); |
|
| 2499 | 2196 |
} catch (Exception e) {
|
| 2500 | 2197 |
initRsa(request); |
| 2501 |
- // return "redirect:/web/user/login/login.do"; |
|
| 2502 | 2198 |
if (loginVO.getBeforeUrl().toString().contains("/web/user/login/login.do")) {
|
| 2503 | 2199 |
redirectAttributes.addFlashAttribute("fail", true);
|
| 2504 | 2200 |
return "redirect:/web/user/login/login.do"; |
... | ... | @@ -2506,48 +2202,39 @@ |
| 2506 | 2202 |
return "redirect:/"; |
| 2507 | 2203 |
|
| 2508 | 2204 |
} |
| 2509 |
- |
|
| 2510 |
- |
|
| 2205 |
+ String pendingUserId = getPendingSecurityUserId(session); |
|
| 2206 |
+ if (StringUtils.isBlank(pendingUserId) || !pendingUserId.equals(id)) {
|
|
| 2207 |
+ redirectAttributes.addFlashAttribute("message", "로그인 유효시간이 만료되었습니다. 다시 로그인해주세요.");
|
|
| 2208 |
+ return "redirect:/web/user/login/login.do"; |
|
| 2209 |
+ } |
|
| 2210 |
+ if (secondAuthLogService.isSecondAuthLocked(secondAuthLogVO)) {
|
|
| 2211 |
+ redirectAttributes.addFlashAttribute("message",
|
|
| 2212 |
+ "인증 시도 5회 이상 실패하여 5분간 로그인이 제한됩니다. 잠시 후 다시 시도해주세요."); |
|
| 2213 |
+ return "redirect:/web/user/login/login.do"; |
|
| 2214 |
+ } |
|
| 2511 | 2215 |
//핸드폰 인증번호 확인 |
| 2512 |
- String s_hp = request.getParameter("hp");
|
|
| 2513 |
- String s_num = request.getParameter("num");
|
|
| 2514 |
- |
|
| 2515 |
- System.out.println(s_hp); |
|
| 2516 |
- System.out.println(s_num); |
|
| 2517 |
- System.out.println("s_num==============");
|
|
| 2518 |
- |
|
| 2519 | 2216 |
SendLogVO sendLogVO = new SendLogVO(); |
| 2520 | 2217 |
sendLogVO.setSendId(id); |
| 2521 | 2218 |
sendLogVO.setReceive(s_hp); |
| 2522 | 2219 |
sendLogVO.setCheckNo(s_num); |
| 2523 |
- |
|
| 2524 |
- String passFlag = request.getParameter("passFlag");
|
|
| 2525 |
- System.out.println("passFlag : "+ passFlag);
|
|
| 2526 |
- System.out.println("passFlag : "+ passFlag);
|
|
| 2527 |
- System.out.println("passFlag : "+ passFlag);
|
|
| 2528 |
- System.out.println("passFlag : "+ passFlag);
|
|
| 2529 |
- System.out.println("passFlag : "+ passFlag.toString());
|
|
| 2530 |
- System.out.println("StringUtils.isNotEmpty(passFlag) : "+ StringUtils.isNotEmpty(passFlag));
|
|
| 2531 |
- |
|
| 2532 |
- if(!"Y".equals(passFlag)) {
|
|
| 2533 |
- |
|
| 2534 |
- sendLogVO = mjonMsgDataService.selectSysMsgLogCheck(sendLogVO); |
|
| 2535 |
- |
|
| 2536 |
- if (sendLogVO==null) {
|
|
| 2537 |
- redirectAttributes.addFlashAttribute("fail2", true);
|
|
| 2538 |
- return "redirect:/web/user/login/login.do"; |
|
| 2539 |
- } |
|
| 2540 |
- |
|
| 2220 |
+ |
|
| 2221 |
+ sendLogVO = mjonMsgDataService.selectSysMsgLogCheck(sendLogVO); |
|
| 2222 |
+ if (sendLogVO==null) {
|
|
| 2223 |
+ recordSecondAuthFailure(secondAuthLogVO); |
|
| 2224 |
+ redirectAttributes.addFlashAttribute("fail2", true);
|
|
| 2225 |
+ return "redirect:/web/user/login/login.do"; |
|
| 2541 | 2226 |
} |
| 2542 |
- System.out.println("========================= : "+ passFlag);
|
|
| 2543 |
- |
|
| 2227 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_USER_ID); |
|
| 2228 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_AT); |
|
| 2229 |
+ resetSecondAuthSendState(session); |
|
| 2230 |
+ |
|
| 2544 | 2231 |
String password = decryptRsa(privateKey, loginVO.getPassword()); |
| 2545 | 2232 |
loginVO.setId(id); |
| 2546 | 2233 |
loginVO.setIp(EgovClntInfo.getClntIP(request)); |
| 2547 | 2234 |
loginVO.setPassword(password); |
| 2548 | 2235 |
loginVO.setUserSe("GNR");
|
| 2549 | 2236 |
loginVO.setStatusAll("Y"); // 신청대기중인 사용자까지 조회
|
| 2550 |
- |
|
| 2237 |
+ |
|
| 2551 | 2238 |
//기업회원 가입중인지 체크 - 기존 로그인 select는 MBER_STTUS = 'Y'가 하드코딩이라 로그인 전 기업회원 가입중인지 선 체크 |
| 2552 | 2239 |
//암호화 2번 방지를 위한 LoginVO 생성 |
| 2553 | 2240 |
LoginVO loginCmpChkVO = new LoginVO(); |
... | ... | @@ -2567,8 +2254,6 @@ |
| 2567 | 2254 |
if("01".equals(cmpChangeManageVO.getHstType())) { //가장 마지막 내역이 기업회원 가입일 시
|
| 2568 | 2255 |
if("01".equals(cmpChangeManageVO.getHstSttus()) || "03".equals(cmpChangeManageVO.getHstSttus()) ) { //가장 마지막 기업회원 가입이 신청 또는 반려 상태일 시
|
| 2569 | 2256 |
redirectAttributes.addFlashAttribute("mberId", loginVO.getId());
|
| 2570 |
- //addFlashAttribute 일회성으로 인하여 membershipAttachDocBefore.do 이동 후 |
|
| 2571 |
- //membershipAttachDoc.do로 바로 submit하여 새로고침 시 정보 유지되게 끔 처리 |
|
| 2572 | 2257 |
return "redirect:/web/user/login/membershipAttachDocBefore.do"; |
| 2573 | 2258 |
} |
| 2574 | 2259 |
} |
... | ... | @@ -2603,9 +2288,7 @@ |
| 2603 | 2288 |
if (null == resultVO.getId() && passMissVO.getPassMiss() < 5 ) {
|
| 2604 | 2289 |
loginService.updatePassMissPlus(loginVO); |
| 2605 | 2290 |
alertMessage = egovMessageSource.getMessage("fail.common.login");
|
| 2606 |
- |
|
| 2607 |
- // 로그인 실패시 해킹의심 IP 테이블에 등록_아이디는 있지만 비밀번호가 틀린상황 |
|
| 2608 |
- /// HackIpVO hackIpVO = new HackIpVO(); |
|
| 2291 |
+ |
|
| 2609 | 2292 |
hackIpVO.setHackUserId(loginVO.getId()); |
| 2610 | 2293 |
hackIpVO.setAccessIp( EgovClntInfo.getClntIP(request)); |
| 2611 | 2294 |
hackIpService.insertHackIp(hackIpVO); |
... | ... | @@ -2613,29 +2296,20 @@ |
| 2613 | 2296 |
redirectAttributes.addFlashAttribute("fail", true);
|
| 2614 | 2297 |
return "redirect:/web/user/login/login.do"; |
| 2615 | 2298 |
} |
| 2616 |
- |
|
| 2299 |
+ |
|
| 2617 | 2300 |
return goUserLoginPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2618 | 2301 |
} else {
|
| 2619 | 2302 |
if (passMissVO.getPassMiss() >= 5) {
|
| 2620 | 2303 |
alertMessage = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 비밀번호를 재설정해주세요."; |
| 2621 | 2304 |
return goUserPassMissPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2622 |
- } /* |
|
| 2623 |
- * else if("A".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2624 |
- * "신청하신 아이디가 현제 승인대기 상" + "태입니다."; return goUserLoginPage(redirectAttributes, |
|
| 2625 |
- * request, model, alertMessage); }else |
|
| 2626 |
- * if("B".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2627 |
- * "아이디가 차단상태가 되어 사용할수 없습니다."; return goUserLoginPage(redirectAttributes, |
|
| 2628 |
- * request, model, alertMessage); } |
|
| 2629 |
- */ |
|
| 2305 |
+ } |
|
| 2630 | 2306 |
loginService.updatePassMissReset(loginVO); |
| 2631 | 2307 |
} |
| 2632 | 2308 |
} |
| 2633 | 2309 |
//아이디 미존재 |
| 2634 | 2310 |
else {
|
| 2635 | 2311 |
alertMessage = egovMessageSource.getMessage("fail.common.login");
|
| 2636 |
- |
|
| 2637 |
- // 로그인 실패시 해킹의심 IP 테이블에 등록_아이디없고 비밀번호도 틀린상황 |
|
| 2638 |
- /// HackIpVO hackIpVO = new HackIpVO(); |
|
| 2312 |
+ |
|
| 2639 | 2313 |
hackIpVO.setHackUserId(loginVO.getId()); |
| 2640 | 2314 |
hackIpVO.setAccessIp(EgovClntInfo.getClntIP(request)); |
| 2641 | 2315 |
hackIpService.insertHackIp(hackIpVO); |
... | ... | @@ -2643,30 +2317,15 @@ |
| 2643 | 2317 |
redirectAttributes.addFlashAttribute("fail", true);
|
| 2644 | 2318 |
return "redirect:/web/user/login/login.do"; |
| 2645 | 2319 |
} |
| 2646 |
- |
|
| 2647 | 2320 |
return goUserLoginPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2648 | 2321 |
} |
| 2649 | 2322 |
} |
| 2650 | 2323 |
|
| 2651 |
- |
|
| 2652 |
- /* 일시 : 2023.07.26 |
|
| 2653 |
- * 내용 : 로그인시 휴먼고객 redirect 기능 추가 |
|
| 2654 |
- * 작업자 : 원영현 과장 |
|
| 2655 |
- */ |
|
| 2656 |
- |
|
| 2657 | 2324 |
if(resultVO.getDormantYn().equals("Y") || resultVO.getDormantYn() == "Y") {
|
| 2658 |
- |
|
| 2659 | 2325 |
return "redirect:/web/user/humanPage.do"; |
| 2660 | 2326 |
} |
| 2661 |
- |
|
| 2662 |
- |
|
| 2663 |
- |
|
| 2664 |
- |
|
| 2327 |
+ |
|
| 2665 | 2328 |
boolean loginPolicyYn = true; |
| 2666 |
- |
|
| 2667 |
- // 접속IP |
|
| 2668 |
- // userIp = EgovClntInfo.getClntIP(request); |
|
| 2669 |
- |
|
| 2670 | 2329 |
// resultVO.siteId 의 각 로그인 ip를 조회함 |
| 2671 | 2330 |
if (resultVO != null && resultVO.getId() != null && !resultVO.getId().equals("") && loginPolicyYn) {
|
| 2672 | 2331 |
// 세션에다 ip 등록 |
... | ... | @@ -2676,7 +2335,7 @@ |
| 2676 | 2335 |
UsernamePasswordAuthenticationFilter springSecurity = null; |
| 2677 | 2336 |
ApplicationContext act = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext()); |
| 2678 | 2337 |
Map<String, UsernamePasswordAuthenticationFilter> beans = act.getBeansOfType(UsernamePasswordAuthenticationFilter.class); |
| 2679 |
- |
|
| 2338 |
+ |
|
| 2680 | 2339 |
if (beans.size() > 0) {
|
| 2681 | 2340 |
springSecurity = (UsernamePasswordAuthenticationFilter) beans.values().toArray()[0]; |
| 2682 | 2341 |
springSecurity.setUsernameParameter("egov_security_username");
|
... | ... | @@ -2709,36 +2368,16 @@ |
| 2709 | 2368 |
httpSession.setAttribute("siteManageList", siteManageList);
|
| 2710 | 2369 |
httpSession.setAttribute("loginId", user.getId()); // 자동완성 공통으로 쓰기위해
|
| 2711 | 2370 |
httpSession.setAttribute("esntlId", user.getPassword());
|
| 2712 |
- |
|
| 2713 |
- // 최근검색어 조회 후 세션에 넣어줌 |
|
| 2714 |
- /* |
|
| 2715 |
- * UserManageVO tempUserManageVO = new UserManageVO(); |
|
| 2716 |
- * tempUserManageVO.setEmplyrId(user.getId()); tempUserManageVO = |
|
| 2717 |
- * userManageService.selectRecentSearchWord(tempUserManageVO); |
|
| 2718 |
- * |
|
| 2719 |
- * List<String> lisRecentSearch = new ArrayList<String>(); if(null != |
|
| 2720 |
- * tempUserManageVO){ //ArrayList 로 세션 저장
|
|
| 2721 |
- * Collections.addAll(lisRecentSearch,tempUserManageVO.getSearchWord().split(","
|
|
| 2722 |
- * )) ; } httpSession.setAttribute("recentSearch", lisRecentSearch) ;
|
|
| 2723 |
- */ |
|
| 2724 | 2371 |
} |
| 2725 | 2372 |
} |
| 2726 |
- /* |
|
| 2727 |
- * loginLog.setLoginId(uniqId); loginLog.setLoginIp(ip); |
|
| 2728 |
- * loginLog.setLoginMthd("I"); // 로그인:I, 로그아웃:O loginLog.setErrOccrrAt("N");
|
|
| 2729 |
- * loginLog.setErrorCode(""); //로그인은 관리자, PC만 됨 loginLog.setUserAt("U"); //사용자
|
|
| 2730 |
- * loginLog.setDeviceType("P"); //PC loginLog.setProgrmFileNm("adminLogin");
|
|
| 2731 |
- * loginLog.setMenuNm("관리자로그인"); loginLogService.logInsertLoginLog(loginLog);
|
|
| 2732 |
- */ |
|
| 2733 | 2373 |
|
| 2734 | 2374 |
loginVO.getId(); |
| 2735 | 2375 |
loginVO.getIp(); |
| 2736 | 2376 |
loginVO.setMessage("로그인 성공되었습니다.");
|
| 2737 | 2377 |
loginVO.setLoginYn("Y");
|
| 2738 |
- |
|
| 2378 |
+ |
|
| 2739 | 2379 |
loginService.insertActionLoginLog(loginVO); |
| 2740 |
- // 인증 로그인 이력을 위한 insert |
|
| 2741 |
- |
|
| 2380 |
+ |
|
| 2742 | 2381 |
MberCertLoginLogVO mberCertLoginLogVO = new MberCertLoginLogVO(); |
| 2743 | 2382 |
mberCertLoginLogVO.setLoginId(loginVO.getId()); |
| 2744 | 2383 |
mberCertLoginLogVO.setLoginIp(loginVO.getIp()); |
... | ... | @@ -2751,9 +2390,9 @@ |
| 2751 | 2390 |
mberGrdVO.setMberId(loginVO.getId()); |
| 2752 | 2391 |
mberGrdVO.setAmt("0");
|
| 2753 | 2392 |
mberGrdVO.setMoid("");
|
| 2754 |
- mberGrdService.mberGrdSaveByUserNoHist(mberGrdVO); |
|
| 2393 |
+ mberGrdService.mberGrdSaveByUserNoHist(mberGrdVO); |
|
| 2755 | 2394 |
// End |
| 2756 |
- |
|
| 2395 |
+ |
|
| 2757 | 2396 |
// 이벤트 결제 바로가기 로직 체크 Start |
| 2758 | 2397 |
String goEventPay = (String) commandMap.get("goEventPay");
|
| 2759 | 2398 |
System.out.println("goEventPay : " + goEventPay);
|
... | ... | @@ -2764,7 +2403,7 @@ |
| 2764 | 2403 |
} |
| 2765 | 2404 |
} |
| 2766 | 2405 |
// End |
| 2767 |
- |
|
| 2406 |
+ |
|
| 2768 | 2407 |
String beforeUrl = (String) commandMap.get("beforeUrl");
|
| 2769 | 2408 |
|
| 2770 | 2409 |
// 로그인 전 URL 호출 시 |
... | ... | @@ -2776,14 +2415,13 @@ |
| 2776 | 2415 |
} |
| 2777 | 2416 |
} |
| 2778 | 2417 |
|
| 2779 |
- // 개인키 삭제 |
|
| 2780 |
- // 성공시 웹페이지 분기로 인해 session에 페이지 타입을 넣어준다. |
|
| 2781 | 2418 |
request.getSession().setAttribute("pageType", "web");
|
| 2782 |
- |
|
| 2783 |
- return "blank"; // 성공 시 페이지.. (redirect 불가) |
|
| 2784 | 2419 |
|
| 2785 |
- // uat/uia/actionMain.do 실제 성공시 무조건 좌측 메소드로 감. |
|
| 2786 |
- // return "forward:/web/main/mainPage.do"; |
|
| 2420 |
+ secondAuthLogVO.setReason("인증번호 일치");
|
|
| 2421 |
+ secondAuthLogVO.setResultCode(s_num); |
|
| 2422 |
+ secondAuthLogVO.setLoginResult("SUCCESS");
|
|
| 2423 |
+ secondAuthLogService.insertSecondAuthsLog(secondAuthLogVO); |
|
| 2424 |
+ return "blank"; |
|
| 2787 | 2425 |
} else {
|
| 2788 | 2426 |
String message = egovMessageSource.getMessage("fail.common.login");
|
| 2789 | 2427 |
redirectAttributes.addFlashAttribute("beforeUrl", loginVO.getBeforeUrl());
|
... | ... | @@ -2791,7 +2429,104 @@ |
| 2791 | 2429 |
return "redirect:/"; |
| 2792 | 2430 |
} |
| 2793 | 2431 |
} |
| 2794 |
- |
|
| 2432 |
+ |
|
| 2433 |
+ private String getPendingSecurityUserId(HttpSession session) {
|
|
| 2434 |
+ Object userId = session.getAttribute(PhoneResetSessionConstants.PENDING_USER_ID); |
|
| 2435 |
+ Object pendingAt = session.getAttribute(PhoneResetSessionConstants.PENDING_AT); |
|
| 2436 |
+ if (!(userId instanceof String) || !(pendingAt instanceof Long)) {
|
|
| 2437 |
+ return null; |
|
| 2438 |
+ } |
|
| 2439 |
+ if (System.currentTimeMillis() - (Long) pendingAt > PhoneResetSessionConstants.TIMEOUT_MILLIS) {
|
|
| 2440 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_USER_ID); |
|
| 2441 |
+ session.removeAttribute(PhoneResetSessionConstants.PENDING_AT); |
|
| 2442 |
+ resetSecondAuthSendState(session); |
|
| 2443 |
+ return null; |
|
| 2444 |
+ } |
|
| 2445 |
+ return (String) userId; |
|
| 2446 |
+ } |
|
| 2447 |
+ |
|
| 2448 |
+ private boolean isRegisteredSecurityPhone(String userId, String phone) throws Exception {
|
|
| 2449 |
+ if (StringUtils.isBlank(phone)) {
|
|
| 2450 |
+ return false; |
|
| 2451 |
+ } |
|
| 2452 |
+ List<MberCertPhoneVO> phoneList = certPhoneService.selectMberCertPhoneList(userId); |
|
| 2453 |
+ for (MberCertPhoneVO certPhone : phoneList) {
|
|
| 2454 |
+ if (phone.equals(certPhone.getMbtlnum())) {
|
|
| 2455 |
+ return true; |
|
| 2456 |
+ } |
|
| 2457 |
+ } |
|
| 2458 |
+ return false; |
|
| 2459 |
+ } |
|
| 2460 |
+ |
|
| 2461 |
+ private SecondAuthLogVO createSecondAuthLogVO( |
|
| 2462 |
+ String userId, String msgId, HttpServletRequest request) throws Exception {
|
|
| 2463 |
+ SecondAuthLogVO logVO = new SecondAuthLogVO(); |
|
| 2464 |
+ logVO.setTryLoginId(userId); |
|
| 2465 |
+ logVO.setMsgId(msgId); |
|
| 2466 |
+ logVO.setAccessIp(EgovClntInfo.getClntIP(request)); |
|
| 2467 |
+ logVO.setUserAgent(request.getHeader("User-Agent"));
|
|
| 2468 |
+ logVO.setAuthStep("SECONDARY");
|
|
| 2469 |
+ return logVO; |
|
| 2470 |
+ } |
|
| 2471 |
+ |
|
| 2472 |
+ private int recordSecondAuthFailure(SecondAuthLogVO logVO) throws Exception {
|
|
| 2473 |
+ logVO.setReason("인증번호 불일치");
|
|
| 2474 |
+ logVO.setLoginResult("FAIL");
|
|
| 2475 |
+ logVO.setResultCode("INVALID");
|
|
| 2476 |
+ secondAuthLogService.insertSecondAuthsLog(logVO); |
|
| 2477 |
+ |
|
| 2478 |
+ int failureCount = secondAuthLogService.selectFailureCountSinceReset(logVO); |
|
| 2479 |
+ if (failureCount >= 5) {
|
|
| 2480 |
+ logVO.setReason("SECOND_AUTH_LOCK");
|
|
| 2481 |
+ logVO.setLoginResult("FAIL");
|
|
| 2482 |
+ logVO.setResultCode("LOCKED");
|
|
| 2483 |
+ secondAuthLogService.insertSecondAuthsLog(logVO); |
|
| 2484 |
+ } |
|
| 2485 |
+ return failureCount; |
|
| 2486 |
+ } |
|
| 2487 |
+ |
|
| 2488 |
+ private ModelAndView secondAuthFailureResponse( |
|
| 2489 |
+ ModelAndView mav, SecondAuthLogVO logVO, HttpSession session) throws Exception {
|
|
| 2490 |
+ int failureCount = recordSecondAuthFailure(logVO); |
|
| 2491 |
+ if (failureCount >= 5) {
|
|
| 2492 |
+ resetSecondAuthSendState(session); |
|
| 2493 |
+ return secondAuthLockedResponse(mav, logVO); |
|
| 2494 |
+ } |
|
| 2495 |
+ mav.addObject("status", "fail");
|
|
| 2496 |
+ mav.addObject("remaining", 5 - failureCount);
|
|
| 2497 |
+ mav.addObject("message", "인증번호가 일치하지 않습니다. 5회 실패 시 5분간 로그인이 제한됩니다. (남은 시도 "
|
|
| 2498 |
+ + (5 - failureCount) + "회)"); |
|
| 2499 |
+ return mav; |
|
| 2500 |
+ } |
|
| 2501 |
+ |
|
| 2502 |
+ private ModelAndView secondAuthLockedResponse(ModelAndView mav, SecondAuthLogVO logVO) throws Exception {
|
|
| 2503 |
+ mav.addObject("status", "locked");
|
|
| 2504 |
+ mav.addObject("locked", true);
|
|
| 2505 |
+ mav.addObject("lockSeconds", Math.max(1,
|
|
| 2506 |
+ secondAuthLogService.selectSecondAuthLockRemainingSeconds(logVO))); |
|
| 2507 |
+ mav.addObject("message", "인증 시도 5회 이상 실패하여 5분간 로그인이 제한됩니다. 잠시 후 다시 시도해주세요.");
|
|
| 2508 |
+ return mav; |
|
| 2509 |
+ } |
|
| 2510 |
+ |
|
| 2511 |
+ private void resetSecondAuthSendState(HttpSession session) {
|
|
| 2512 |
+ session.removeAttribute(SecondAuthSessionConstants.SEND_COUNT); |
|
| 2513 |
+ session.removeAttribute(SecondAuthSessionConstants.LAST_SENT_AT); |
|
| 2514 |
+ } |
|
| 2515 |
+ |
|
| 2516 |
+ private int getSecondAuthSendCount(HttpSession session) {
|
|
| 2517 |
+ Object sendCount = session.getAttribute(SecondAuthSessionConstants.SEND_COUNT); |
|
| 2518 |
+ return sendCount instanceof Integer ? (Integer) sendCount : 0; |
|
| 2519 |
+ } |
|
| 2520 |
+ |
|
| 2521 |
+ private long getSecondAuthResendRemainingMillis(HttpSession session) {
|
|
| 2522 |
+ Object lastSentAt = session.getAttribute(SecondAuthSessionConstants.LAST_SENT_AT); |
|
| 2523 |
+ if (!(lastSentAt instanceof Long)) {
|
|
| 2524 |
+ return 0; |
|
| 2525 |
+ } |
|
| 2526 |
+ long elapsed = System.currentTimeMillis() - (Long) lastSentAt; |
|
| 2527 |
+ return Math.max(0, SecondAuthSessionConstants.RESEND_INTERVAL_MILLIS - elapsed); |
|
| 2528 |
+ } |
|
| 2529 |
+ |
|
| 2795 | 2530 |
// 이벤트 결제 바로가기 |
| 2796 | 2531 |
public boolean goEventPay(LoginVO loginVO) throws Exception {
|
| 2797 | 2532 |
boolean goEventPay = false; |
... | ... | @@ -2801,16 +2536,16 @@ |
| 2801 | 2536 |
String bbsId = "BBSMSTR_000000000731"; //이벤트 게시판 번호 |
| 2802 | 2537 |
String nttSj = "[첫결제 이벤트] 첫 결제 시, 누구나 조건 없이 인생 최저가!"; |
| 2803 | 2538 |
BoardVO resultEvent = selectEventBoardInfo(bbsId, nttSj); |
| 2804 |
- |
|
| 2539 |
+ |
|
| 2805 | 2540 |
if(resultEvent != null) {//이벤트 게시판의 이벤트 게시글 번호 셋팅
|
| 2806 | 2541 |
mjonEventVO.setEventNttId(Float.toString(resultEvent.getNttId())); |
| 2807 |
- |
|
| 2542 |
+ |
|
| 2808 | 2543 |
// 회원 이름 조회 |
| 2809 | 2544 |
MberManageVO mberManageVO = new MberManageVO(); |
| 2810 | 2545 |
mberManageVO.setMberId(loginVO.getId()); |
| 2811 | 2546 |
String mberNm = mberManageService.selectMberNmByMberId(mberManageVO); |
| 2812 | 2547 |
if (mberNm != null) {
|
| 2813 |
- loginVO.setName(mberNm); |
|
| 2548 |
+ loginVO.setName(mberNm); |
|
| 2814 | 2549 |
} |
| 2815 | 2550 |
|
| 2816 | 2551 |
// Step 0. B선 전송사 이용고객 => 이벤트대상 제외처리 |
... | ... | @@ -2844,24 +2579,24 @@ |
| 2844 | 2579 |
} |
| 2845 | 2580 |
} |
| 2846 | 2581 |
} |
| 2847 |
- |
|
| 2582 |
+ |
|
| 2848 | 2583 |
return goEventPay; |
| 2849 | 2584 |
} |
| 2850 |
- |
|
| 2585 |
+ |
|
| 2851 | 2586 |
//이벤트 게시글 정보 불러오기 함수 |
| 2852 | 2587 |
public BoardVO selectEventBoardInfo(String bbsId, String nttSj) throws Exception{
|
| 2853 |
- |
|
| 2588 |
+ |
|
| 2854 | 2589 |
BoardVO boardVO = new BoardVO(); |
| 2855 | 2590 |
boardVO.setBbsId(bbsId); |
| 2856 | 2591 |
boardVO.setNttSj(nttSj); |
| 2857 | 2592 |
BoardVO resultEvent = mjonEventService.selectEventInfoByNttSj(boardVO); |
| 2858 |
- |
|
| 2593 |
+ |
|
| 2859 | 2594 |
return resultEvent; |
| 2860 | 2595 |
} |
| 2861 |
- |
|
| 2596 |
+ |
|
| 2862 | 2597 |
//이벤트 회원 정보 불러오기 함수 |
| 2863 | 2598 |
public MjonEventVO selectEventMsgMberDefaultInfo(MjonEventVO mjonEventVO, float nttId, String bbsId, String mberId, String mberNm) throws Exception{
|
| 2864 |
- |
|
| 2599 |
+ |
|
| 2865 | 2600 |
mjonEventVO.setEventNttId(Float.toString(nttId)); |
| 2866 | 2601 |
mjonEventVO.setEventBbsId(bbsId); |
| 2867 | 2602 |
mjonEventVO.setMberId(mberId); |
... | ... | @@ -2909,59 +2644,11 @@ |
| 2909 | 2644 |
return "redirect:/"; |
| 2910 | 2645 |
} |
| 2911 | 2646 |
|
| 2912 |
- /* |
|
| 2913 |
- * ScriptEngineManager engine = new ScriptEngineManager(); if |
|
| 2914 |
- * (loginVO.getSnsSite() != null) { int snsIdCnt =
|
|
| 2915 |
- * loginService.selectSnsIdCount(loginVO); LoginVO snsInfo = |
|
| 2916 |
- * loginService.selectSnsId(loginVO); if (snsIdCnt == 0) { LoginVO snsLoginVO =
|
|
| 2917 |
- * new LoginVO(); snsLoginVO.setSnsSite(loginVO.getSnsSite()); |
|
| 2918 |
- * snsLoginVO.setSnsId(loginVO.getSnsId()); |
|
| 2919 |
- * snsLoginVO.setName(loginVO.getName()); |
|
| 2920 |
- * snsLoginVO.setSnsEmail(loginVO.getSnsEmail()); |
|
| 2921 |
- * |
|
| 2922 |
- * if (null != snsInfo) { snsLoginVO.setId(snsInfo.getId());
|
|
| 2923 |
- * redirectAttributes.addFlashAttribute("loginVO", snsLoginVO); return
|
|
| 2924 |
- * "redirect:/web/user/join/snsLink.do"; } else {
|
|
| 2925 |
- * |
|
| 2926 |
- * redirectAttributes.addFlashAttribute("loginVO", snsLoginVO); return
|
|
| 2927 |
- * "redirect:/web/user/join/usrJoinIntro.do"; } } else {
|
|
| 2928 |
- * loginVO.setId(snsInfo.getId()); loginVO.setPassword(snsInfo.getPassword()); } |
|
| 2929 |
- * |
|
| 2930 |
- * } |
|
| 2931 |
- */ |
|
| 2932 |
- |
|
| 2933 | 2647 |
loginVO.setUserSe("USR");
|
| 2934 |
- // 로그인 정보 check |
|
| 2935 |
- |
|
| 2936 |
- /* |
|
| 2937 |
- * if (loginVO.getId() == null || loginVO.getPassword() == null) { // 회원가입 시 로그인
|
|
| 2938 |
- * 처리 LoginVO pLoginVO = (LoginVO) request.getAttribute("pLoginVO"); if
|
|
| 2939 |
- * (pLoginVO == null) { // RSA 키 생성 initRsa(request); return
|
|
| 2940 |
- * "redirect:/web/user/login/login.do"; return "redirect:/"; } else {
|
|
| 2941 |
- * loginVO.setId(pLoginVO.getId()); loginVO.setPassword(pLoginVO.getPassword()); |
|
| 2942 |
- * loginVO.setBeforeUrl(pLoginVO.getBeforeUrl()); |
|
| 2943 |
- * loginVO.setMessage(pLoginVO.getMessage()); } } |
|
| 2944 |
- */ |
|
| 2945 |
- |
|
| 2946 |
- /* |
|
| 2947 |
- * // 1. 일반 로그인 처리 PrivateKey privateKey = (PrivateKey) |
|
| 2948 |
- * session.getAttribute(EgovLoginController.RSA_WEB_KEY); if (privateKey == |
|
| 2949 |
- * null) { initRsa(request); return "web/site/login/EgovLoginGnrlUsr"; }
|
|
| 2950 |
- */ |
|
| 2951 | 2648 |
LoginVO resultVO; |
| 2952 | 2649 |
if (loginVO.getSnsSite() == null) {
|
| 2953 | 2650 |
// 복호화 |
| 2954 | 2651 |
String id = ""; |
| 2955 |
- /* |
|
| 2956 |
- * try { id = decryptRsa(privateKey, loginVO.getId()); } catch (Exception e) {
|
|
| 2957 |
- * initRsa(request); //return "redirect:/web/user/login/login.do"; |
|
| 2958 |
- * if(loginVO.getBeforeUrl().toString().contains("/web/user/login/login.do")) {
|
|
| 2959 |
- * redirectAttributes.addFlashAttribute("fail", true); return
|
|
| 2960 |
- * "redirect:/web/user/login/login.do"; } return "redirect:/"; |
|
| 2961 |
- * |
|
| 2962 |
- * } |
|
| 2963 |
- */ |
|
| 2964 |
- // String password = decryptRsa(privateKey, loginVO.getPassword()); |
|
| 2965 | 2652 |
loginVO.setId(loginVO.getId()); |
| 2966 | 2653 |
loginVO.setIp(EgovClntInfo.getClntIP(request)); |
| 2967 | 2654 |
loginVO.setPassword(loginVO.getPassword()); |
... | ... | @@ -2991,14 +2678,7 @@ |
| 2991 | 2678 |
if (resultVO.getPassMiss() > 5) {
|
| 2992 | 2679 |
alertMessage = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 관리자에게 문의하시기 바랍니다."; |
| 2993 | 2680 |
return goUserLoginPage(redirectAttributes, loginVO, request, model, alertMessage); |
| 2994 |
- } /* |
|
| 2995 |
- * else if("A".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2996 |
- * "신청하신 아이디가 현제 승인대기 상" + "태입니다."; return goUserLoginPage(redirectAttributes, |
|
| 2997 |
- * request, model, alertMessage); }else |
|
| 2998 |
- * if("B".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 2999 |
- * "아이디가 차단상태가 되어 사용할수 없습니다."; return goUserLoginPage(redirectAttributes, |
|
| 3000 |
- * request, model, alertMessage); } |
|
| 3001 |
- */ |
|
| 2681 |
+ } |
|
| 3002 | 2682 |
loginService.updatePassMissReset(loginVO); |
| 3003 | 2683 |
} |
| 3004 | 2684 |
} |
... | ... | @@ -3009,10 +2689,6 @@ |
| 3009 | 2689 |
|
| 3010 | 2690 |
boolean loginPolicyYn = true; |
| 3011 | 2691 |
|
| 3012 |
- // 접속IP |
|
| 3013 |
- // userIp = EgovClntInfo.getClntIP(request); |
|
| 3014 |
- |
|
| 3015 |
- // resultVO.siteId 의 각 로그인 ip를 조회함 |
|
| 3016 | 2692 |
if (resultVO != null && resultVO.getId() != null && !resultVO.getId().equals("") && loginPolicyYn) {
|
| 3017 | 2693 |
// 세션에다 ip 등록 |
| 3018 | 2694 |
resultVO.setIp(userIp); |
... | ... | @@ -3191,34 +2867,6 @@ |
| 3191 | 2867 |
@RequestParam Map<String, Object> commandMap, ModelMap model, RedirectAttributes redirectAttributes) |
| 3192 | 2868 |
throws Exception {
|
| 3193 | 2869 |
|
| 3194 |
- /* |
|
| 3195 |
- * // 해킹 의심 IP 차단상태의 경우 로그인 불가 String userIp = EgovClntInfo.getClntIP(request); |
|
| 3196 |
- * HackIpVO hackIpVO = new HackIpVO(); hackIpVO.setAccessIp(userIp); |
|
| 3197 |
- * hackIpVO.setBlockYn("Y"); if (null != hackIpService.selectHackIpVO(hackIpVO))
|
|
| 3198 |
- * { String message = "차단된 아이피입니다. 관리자에게 문의해 주십시요.";
|
|
| 3199 |
- * redirectAttributes.addFlashAttribute("message", message); return
|
|
| 3200 |
- * "redirect:/"; } |
|
| 3201 |
- * |
|
| 3202 |
- * ScriptEngineManager engine = new ScriptEngineManager(); if |
|
| 3203 |
- * (loginVO.getSnsSite() != null) { int snsIdCnt =
|
|
| 3204 |
- * loginService.selectSnsIdCount(loginVO); LoginVO snsInfo = |
|
| 3205 |
- * loginService.selectSnsId(loginVO); if (snsIdCnt == 0) { LoginVO snsLoginVO =
|
|
| 3206 |
- * new LoginVO(); snsLoginVO.setSnsSite(loginVO.getSnsSite()); |
|
| 3207 |
- * snsLoginVO.setSnsId(loginVO.getSnsId()); |
|
| 3208 |
- * snsLoginVO.setName(loginVO.getName()); |
|
| 3209 |
- * snsLoginVO.setSnsEmail(loginVO.getSnsEmail()); |
|
| 3210 |
- * |
|
| 3211 |
- * if (null != snsInfo) { snsLoginVO.setId(snsInfo.getId());
|
|
| 3212 |
- * redirectAttributes.addFlashAttribute("loginVO", snsLoginVO); return
|
|
| 3213 |
- * "redirect:/web/user/join/snsLink.do"; } else {
|
|
| 3214 |
- * |
|
| 3215 |
- * redirectAttributes.addFlashAttribute("loginVO", snsLoginVO); return
|
|
| 3216 |
- * "redirect:/web/user/join/usrJoinIntro.do"; } } else {
|
|
| 3217 |
- * loginVO.setId(snsInfo.getId()); loginVO.setPassword(snsInfo.getPassword()); } |
|
| 3218 |
- * |
|
| 3219 |
- * } |
|
| 3220 |
- */ |
|
| 3221 |
- |
|
| 3222 | 2870 |
String adminId = request.getParameter("adminId");
|
| 3223 | 2871 |
|
| 3224 | 2872 |
String mberId = request.getParameter("mberId");
|
... | ... | @@ -3258,6 +2906,7 @@ |
| 3258 | 2906 |
resultVO = loginService.actionLoginAdmToUsr(usrLoginVO); |
| 3259 | 2907 |
|
| 3260 | 2908 |
String alertMessage = ""; |
| 2909 |
+ |
|
| 3261 | 2910 |
if (!"admin".equals(usrLoginVO.getId())) {
|
| 3262 | 2911 |
if (null == resultVO.getId()) { // 로그인 실패
|
| 3263 | 2912 |
/* loginService.updatePassMissPlus(loginVO); */ |
... | ... | @@ -3280,14 +2929,7 @@ |
| 3280 | 2929 |
if (resultVO.getPassMiss() > 5) {
|
| 3281 | 2930 |
alertMessage = "패스워드가 5회 이상 틀려 로그인 할수 없습니다. 관리자에게 문의하시기 바랍니다."; |
| 3282 | 2931 |
return goUserLoginPage(redirectAttributes, usrLoginVO, request, model, alertMessage); |
| 3283 |
- } /* |
|
| 3284 |
- * else if("A".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 3285 |
- * "신청하신 아이디가 현제 승인대기 상" + "태입니다."; return goUserLoginPage(redirectAttributes, |
|
| 3286 |
- * request, model, alertMessage); }else |
|
| 3287 |
- * if("B".equals(resultVO.getEmplyrSttusCode())){ //신청상태 alertMessage =
|
|
| 3288 |
- * "아이디가 차단상태가 되어 사용할수 없습니다."; return goUserLoginPage(redirectAttributes, |
|
| 3289 |
- * request, model, alertMessage); } |
|
| 3290 |
- */ |
|
| 2932 |
+ } |
|
| 3291 | 2933 |
loginService.updatePassMissReset(usrLoginVO); |
| 3292 | 2934 |
} |
| 3293 | 2935 |
} |
... | ... | @@ -3658,37 +3300,56 @@ |
| 3658 | 3300 |
*/ |
| 3659 | 3301 |
@RequestMapping(value = { "/web/user/sendSysMsgDataAjax.do" })
|
| 3660 | 3302 |
public ModelAndView sendSysMsgDataAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO,
|
| 3661 |
- RedirectAttributes redirectAttributes, ModelMap model, HttpServletRequest request) throws Exception {
|
|
| 3303 |
+ RedirectAttributes redirectAttributes, ModelMap model, HttpServletRequest request, |
|
| 3304 |
+ HttpSession session, |
|
| 3305 |
+ @RequestParam(value = "securityLogin", required = false) String securityLogin) throws Exception {
|
|
| 3662 | 3306 |
|
| 3663 | 3307 |
ModelAndView modelAndView = new ModelAndView(); |
| 3664 | 3308 |
modelAndView.setViewName("jsonView");
|
| 3309 |
+ boolean secondAuthRequest = "Y".equals(securityLogin); |
|
| 3310 |
+ if (secondAuthRequest) {
|
|
| 3311 |
+ String pendingUserId = getPendingSecurityUserId(session); |
|
| 3312 |
+ if (StringUtils.isBlank(pendingUserId) |
|
| 3313 |
+ || !pendingUserId.equals(mjonMsgVO.getUserId()) |
|
| 3314 |
+ || !isRegisteredSecurityPhone(pendingUserId, mjonMsgVO.getCallTo())) {
|
|
| 3315 |
+ modelAndView.addObject("result", "fail");
|
|
| 3316 |
+ modelAndView.addObject("message", "로그인 정보를 다시 확인해주세요.");
|
|
| 3317 |
+ return modelAndView; |
|
| 3318 |
+ } |
|
| 3319 |
+ |
|
| 3320 |
+ SecondAuthLogVO lockCheck = new SecondAuthLogVO(); |
|
| 3321 |
+ lockCheck.setTryLoginId(pendingUserId); |
|
| 3322 |
+ if (secondAuthLogService.isSecondAuthLocked(lockCheck)) {
|
|
| 3323 |
+ modelAndView.addObject("result", "fail");
|
|
| 3324 |
+ modelAndView.addObject("locked", true);
|
|
| 3325 |
+ modelAndView.addObject("lockSeconds", Math.max(1,
|
|
| 3326 |
+ secondAuthLogService.selectSecondAuthLockRemainingSeconds(lockCheck))); |
|
| 3327 |
+ modelAndView.addObject("message", "인증 시도 5회 이상 실패하여 5분간 로그인이 제한됩니다. 잠시 후 다시 시도해주세요.");
|
|
| 3328 |
+ return modelAndView; |
|
| 3329 |
+ } |
|
| 3330 |
+ |
|
| 3331 |
+ int sendCount = getSecondAuthSendCount(session); |
|
| 3332 |
+ if (sendCount >= SecondAuthSessionConstants.MAX_SEND_COUNT) {
|
|
| 3333 |
+ modelAndView.addObject("result", "fail");
|
|
| 3334 |
+ modelAndView.addObject("message", "인증번호 재발송 가능 횟수를 초과했습니다.");
|
|
| 3335 |
+ return modelAndView; |
|
| 3336 |
+ } |
|
| 3337 |
+ long remainingMillis = getSecondAuthResendRemainingMillis(session); |
|
| 3338 |
+ if (remainingMillis > 0) {
|
|
| 3339 |
+ modelAndView.addObject("result", "fail");
|
|
| 3340 |
+ modelAndView.addObject("message", "인증번호 재발송은 30초마다 가능합니다.");
|
|
| 3341 |
+ modelAndView.addObject("retryAfter", (remainingMillis + 999) / 1000);
|
|
| 3342 |
+ return modelAndView; |
|
| 3343 |
+ } |
|
| 3344 |
+ } |
|
| 3665 | 3345 |
|
| 3666 | 3346 |
String resultSts = "0"; |
| 3667 | 3347 |
String resultBlockSts = "0"; |
| 3668 |
- |
|
| 3669 |
- // 문자 수신 번호 jsp에서 받아와야함! |
|
| 3670 |
- /* mjonMsgVO.setCallTo(callTo); */ |
|
| 3671 |
- |
|
| 3672 |
- // System.out.println("mjonMsgVO.toString()");
|
|
| 3673 |
- // System.out.println(mjonMsgVO.toString()); |
|
| 3674 |
- // System.out.println("mjonMsgVO.toString()");
|
|
| 3675 |
- |
|
| 3676 |
- // 사용자 유효성 검사 |
|
| 3677 |
- // id, hp, nm |
|
| 3348 |
+ String resultMsg = null; |
|
| 3678 | 3349 |
try {
|
| 3679 |
- |
|
| 3680 |
- |
|
| 3681 | 3350 |
List<MberCertPhoneVO> mberCertPhoneList = certPhoneService.selectMberCertPhoneList(mjonMsgVO.getUserId()); |
| 3682 |
- |
|
| 3683 |
- |
|
| 3684 |
- |
|
| 3685 |
- |
|
| 3686 |
- |
|
| 3687 | 3351 |
boolean TorF = mberCertPhoneList.size() > 0 ? true : false; |
| 3688 |
- |
|
| 3689 |
- |
|
| 3690 | 3352 |
if (!TorF) {
|
| 3691 |
- |
|
| 3692 | 3353 |
modelAndView.addObject("message", "입력하신 아이디/이름/휴대폰 번호에 맞는 회원 정보가 없습니다.");
|
| 3693 | 3354 |
modelAndView.addObject("result", "fail-check");
|
| 3694 | 3355 |
modelAndView.addObject("resultSts", "0");
|
... | ... | @@ -3703,10 +3364,9 @@ |
| 3703 | 3364 |
userManageVO.setEmplyrNm(mjonMsgVO.getSearchNm()); |
| 3704 | 3365 |
userManageVO.setMoblphonNo(mjonMsgVO.getCallTo()); |
| 3705 | 3366 |
|
| 3706 |
- |
|
| 3707 | 3367 |
List<UserManageVO> usedNmList = userManageService.selectUserIdAjax2(userManageVO); |
| 3708 | 3368 |
if(!usedNmList.get(0).getMberSttus().equals("Y")) {
|
| 3709 |
- |
|
| 3369 |
+ |
|
| 3710 | 3370 |
String mberSttus = usedNmList.get(0).getMberSttus(); |
| 3711 | 3371 |
String message = ""; |
| 3712 | 3372 |
|
... | ... | @@ -3719,32 +3379,23 @@ |
| 3719 | 3379 |
} else {
|
| 3720 | 3380 |
message = "회원 상태를 확인할 수 없습니다."; |
| 3721 | 3381 |
} |
| 3722 |
- |
|
| 3382 |
+ |
|
| 3723 | 3383 |
modelAndView.addObject("message", message);
|
| 3724 | 3384 |
modelAndView.addObject("result", "fail-check");
|
| 3725 | 3385 |
modelAndView.addObject("resultSts", "0");
|
| 3726 | 3386 |
modelAndView.addObject("resultBlockSts", "0");
|
| 3727 | 3387 |
return modelAndView; |
| 3728 | 3388 |
} |
| 3729 |
- |
|
| 3730 | 3389 |
} catch (Exception e) {
|
| 3731 |
- |
|
| 3732 | 3390 |
logger.error(e.getMessage(), e); |
| 3733 |
- // modelAndView.addObject("result", "fail");
|
|
| 3734 |
- // modelAndView.addObject("message", "기타 시스템 오류 : " + e.getMessage());
|
|
| 3735 |
- |
|
| 3736 | 3391 |
} |
| 3737 | 3392 |
|
| 3738 | 3393 |
try {
|
| 3739 |
- |
|
| 3740 |
- |
|
| 3741 |
- |
|
| 3742 |
- |
|
| 3743 | 3394 |
MjonMsgReturnVO returnVO = mjonMsgDataService.sendSysMsgData(mjonMsgVO, request); |
| 3744 | 3395 |
|
| 3745 | 3396 |
resultSts = returnVO.getSendMsgCnt(); |
| 3746 | 3397 |
resultBlockSts = returnVO.getSendMsgBlockCnt(); |
| 3747 |
- |
|
| 3398 |
+ resultMsg = returnVO.getMsgGroupId(); |
|
| 3748 | 3399 |
|
| 3749 | 3400 |
} catch (Exception e) {
|
| 3750 | 3401 |
|
... | ... | @@ -3755,11 +3406,19 @@ |
| 3755 | 3406 |
} |
| 3756 | 3407 |
|
| 3757 | 3408 |
if (!resultSts.equals("0")) {
|
| 3409 |
+ if (secondAuthRequest) {
|
|
| 3410 |
+ int sendCount = getSecondAuthSendCount(session) + 1; |
|
| 3411 |
+ session.setAttribute(SecondAuthSessionConstants.SEND_COUNT, sendCount); |
|
| 3412 |
+ session.setAttribute(SecondAuthSessionConstants.LAST_SENT_AT, System.currentTimeMillis()); |
|
| 3413 |
+ modelAndView.addObject("resendRemaining",
|
|
| 3414 |
+ SecondAuthSessionConstants.MAX_SEND_COUNT - sendCount); |
|
| 3415 |
+ } |
|
| 3758 | 3416 |
|
| 3759 | 3417 |
modelAndView.addObject("message", "문자 전송이 완료되었습니다.");
|
| 3760 | 3418 |
modelAndView.addObject("result", "success");
|
| 3761 | 3419 |
modelAndView.addObject("resultSts", resultSts);
|
| 3762 | 3420 |
modelAndView.addObject("resultBlockSts", resultBlockSts);
|
| 3421 |
+ modelAndView.addObject("resultMsgId", resultMsg);
|
|
| 3763 | 3422 |
|
| 3764 | 3423 |
} else {
|
| 3765 | 3424 |
|
... | ... | @@ -3772,10 +3431,10 @@ |
| 3772 | 3431 |
|
| 3773 | 3432 |
return modelAndView; |
| 3774 | 3433 |
} |
| 3775 |
- |
|
| 3434 |
+ |
|
| 3776 | 3435 |
/** |
| 3777 | 3436 |
* 이용정치 회원 주소록 다운로드 본인인증 시스템 문자발송 |
| 3778 |
- * |
|
| 3437 |
+ * |
|
| 3779 | 3438 |
* @param searchVO |
| 3780 | 3439 |
* @param model |
| 3781 | 3440 |
* @return "" |
... | ... | @@ -3784,13 +3443,13 @@ |
| 3784 | 3443 |
@RequestMapping(value = { "/web/user/sendAddrRequestMsgDataAjax.do" })
|
| 3785 | 3444 |
public ModelAndView sendAddrRequestMsgDataAjax(@ModelAttribute("searchVO") MjonMsgVO mjonMsgVO,
|
| 3786 | 3445 |
RedirectAttributes redirectAttributes, ModelMap model) throws Exception {
|
| 3787 |
- |
|
| 3446 |
+ |
|
| 3788 | 3447 |
ModelAndView modelAndView = new ModelAndView(); |
| 3789 | 3448 |
modelAndView.setViewName("jsonView");
|
| 3790 |
- |
|
| 3449 |
+ |
|
| 3791 | 3450 |
String resultSts = "0"; |
| 3792 | 3451 |
String resultBlockSts = "0"; |
| 3793 |
- |
|
| 3452 |
+ |
|
| 3794 | 3453 |
// 비밀번호 찾기 문자내용 |
| 3795 | 3454 |
String contents = "주소록 요청 인증번호입니다. 인증번호는 : %code% 입니다."; |
| 3796 | 3455 |
String code = ""; |
... | ... | @@ -3802,18 +3461,18 @@ |
| 3802 | 3461 |
code = randomCode.append(Integer.toString(random.nextInt(10))).toString(); |
| 3803 | 3462 |
} |
| 3804 | 3463 |
contents = contents.replace("%code%", code);
|
| 3805 |
- |
|
| 3464 |
+ |
|
| 3806 | 3465 |
mjonMsgVO.setSmsTxt(contents); |
| 3807 | 3466 |
mjonMsgVO.setReserveYn("N");
|
| 3808 | 3467 |
// 시스템 문자발송 번호 |
| 3809 | 3468 |
mjonMsgVO.setCallFrom("15518011");
|
| 3810 |
- |
|
| 3469 |
+ |
|
| 3811 | 3470 |
try {
|
| 3812 |
- |
|
| 3471 |
+ |
|
| 3813 | 3472 |
mjonMsgVO.setUserId("system");
|
| 3814 |
- |
|
| 3473 |
+ |
|
| 3815 | 3474 |
String msgType = "4"; |
| 3816 |
- |
|
| 3475 |
+ |
|
| 3817 | 3476 |
// 전송사 전송 배분 |
| 3818 | 3477 |
MjonMsgVO pramVO = new MjonMsgVO(); |
| 3819 | 3478 |
List<MjonMsgVO> sendRateList = mjonMsgService.selectTodayAgentSendCntList(pramVO); // 전송사 전송 배분률 및 현재 전송건수 |
... | ... | @@ -3823,7 +3482,7 @@ |
| 3823 | 3482 |
float totCnt = tmpVO.getTotCnt(); |
| 3824 | 3483 |
tmpVO.setSendRateInfo(Float.parseFloat(tmpVO.getSendRate()) - (cnt / totCnt * 100)); // 배분률 - 현재전송 비율 |
| 3825 | 3484 |
} |
| 3826 |
- |
|
| 3485 |
+ |
|
| 3827 | 3486 |
String sendAgent = sendRateList.get(0).getAgentCode(); |
| 3828 | 3487 |
float maxRate = sendRateList.get(0).getSendRateInfo(); |
| 3829 | 3488 |
for (MjonMsgVO tmpVO : sendRateList) { // 배분률 대비 현재전송 비율이 가장 적은거 찾기
|
... | ... | @@ -3832,24 +3491,24 @@ |
| 3832 | 3491 |
sendAgent = tmpVO.getAgentCode(); |
| 3833 | 3492 |
} |
| 3834 | 3493 |
} |
| 3835 |
- |
|
| 3494 |
+ |
|
| 3836 | 3495 |
mjonMsgVO.setMsgType("4");
|
| 3837 |
- mjonMsgVO.setMsgDiv("S"); // 단문
|
|
| 3838 |
- |
|
| 3496 |
+ mjonMsgVO.setMsgDiv("S"); // 단문
|
|
| 3497 |
+ |
|
| 3839 | 3498 |
// 문자타입별 대표전송사 정보 |
| 3840 | 3499 |
MjonMsgVO mjonMsgVO2 = new MjonMsgVO(); |
| 3841 | 3500 |
mjonMsgVO2 = mjonMsgService.selectRepMsgAgetnInfo(mjonMsgVO); |
| 3842 | 3501 |
// 전송사 구분 코드 - 01 : 아이하트, 02 : 현대 퓨쳐넷, 03 : 아이엠오, 04 : 다우기술 |
| 3843 |
- mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택 |
|
| 3502 |
+ mjonMsgVO.setAgentCode(mjonMsgVO2.getAgentCode()); //전송사 선택 |
|
| 3844 | 3503 |
// 전송금액 |
| 3845 | 3504 |
mjonMsgVO.setTotPrice(mjonMsgVO2.getAgentPrice().toString()); //총금액 |
| 3846 |
- mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액 |
|
| 3847 |
- |
|
| 3505 |
+ mjonMsgVO.setEachPrice(mjonMsgVO2.getAgentPrice().toString()); //한건 금액 |
|
| 3506 |
+ |
|
| 3848 | 3507 |
MjonMsgReturnVO returnVO = mjonMsgDataService.insertSysMsgDataInfo(mjonMsgVO); |
| 3849 |
- |
|
| 3508 |
+ |
|
| 3850 | 3509 |
resultSts = returnVO.getSendMsgCnt(); |
| 3851 | 3510 |
resultBlockSts = returnVO.getSendMsgBlockCnt(); |
| 3852 |
- |
|
| 3511 |
+ |
|
| 3853 | 3512 |
// 시스템 발송 로그 |
| 3854 | 3513 |
SendLogVO sendLogVO = new SendLogVO(); |
| 3855 | 3514 |
// SendType 1:문자로 발송 2:이메일로 발송 |
... | ... | @@ -3859,45 +3518,77 @@ |
| 3859 | 3518 |
sendLogVO.setReceive(mjonMsgVO.getCallTo()); |
| 3860 | 3519 |
sendLogVO.setCheckNo(code); |
| 3861 | 3520 |
sendLogVO.setContents(contents); |
| 3862 |
- |
|
| 3521 |
+ |
|
| 3863 | 3522 |
mjonMsgDataService.insertSysMsgLog(sendLogVO); |
| 3864 |
- |
|
| 3523 |
+ |
|
| 3865 | 3524 |
} catch (Exception e) {
|
| 3866 |
- |
|
| 3525 |
+ |
|
| 3867 | 3526 |
logger.error(e.getMessage(), e); |
| 3868 | 3527 |
modelAndView.addObject("result", "fail");
|
| 3869 | 3528 |
modelAndView.addObject("message", "기타 시스템 오류 : " + e.getMessage());
|
| 3870 |
- |
|
| 3529 |
+ |
|
| 3871 | 3530 |
} |
| 3872 |
- |
|
| 3531 |
+ |
|
| 3873 | 3532 |
if (!resultSts.equals("0")) {
|
| 3874 |
- |
|
| 3533 |
+ |
|
| 3875 | 3534 |
modelAndView.addObject("message", "휴대폰으로 전송된 인증번호 5자리를 입력해주시기 바랍니다.");
|
| 3876 | 3535 |
modelAndView.addObject("certCode", code);
|
| 3877 | 3536 |
modelAndView.addObject("result", "success");
|
| 3878 | 3537 |
modelAndView.addObject("resultSts", resultSts);
|
| 3879 | 3538 |
modelAndView.addObject("resultBlockSts", resultBlockSts);
|
| 3880 |
- |
|
| 3539 |
+ |
|
| 3881 | 3540 |
} else {
|
| 3882 |
- |
|
| 3541 |
+ |
|
| 3883 | 3542 |
modelAndView.addObject("message", "문자 전송에 오류가 발생하였습니다.");
|
| 3884 | 3543 |
modelAndView.addObject("result", "fail");
|
| 3885 | 3544 |
modelAndView.addObject("resultSts", "0");
|
| 3886 | 3545 |
modelAndView.addObject("resultBlockSts", "0");
|
| 3887 |
- |
|
| 3546 |
+ |
|
| 3888 | 3547 |
} |
| 3889 |
- |
|
| 3548 |
+ |
|
| 3890 | 3549 |
return modelAndView; |
| 3891 | 3550 |
} |
| 3892 | 3551 |
|
| 3893 | 3552 |
// 아이디 비밀번호 찾기 시스템 인증번호발송 조회 |
| 3894 | 3553 |
@RequestMapping(value = "/web/user/sendSysMsgSelectAjax.do") |
| 3895 |
- public ModelAndView sendSysMsgSelectAjax(@ModelAttribute("SendLogVO") SendLogVO sendLogVO) throws Exception {
|
|
| 3896 |
- |
|
| 3554 |
+ public ModelAndView sendSysMsgSelectAjax( |
|
| 3555 |
+ @ModelAttribute("SendLogVO") SendLogVO sendLogVO,
|
|
| 3556 |
+ @RequestParam(value = "securityLogin", required = false) String securityLogin, |
|
| 3557 |
+ @RequestParam(value = "userId", required = false) String userId, |
|
| 3558 |
+ HttpSession session) throws Exception {
|
|
| 3559 |
+ // log |
|
| 3897 | 3560 |
ModelAndView modelAndView = new ModelAndView(); |
| 3898 | 3561 |
modelAndView.setViewName("jsonView");
|
| 3899 | 3562 |
|
| 3900 | 3563 |
try {
|
| 3564 |
+ if ("Y".equals(securityLogin)) {
|
|
| 3565 |
+ String pendingUserId = getPendingSecurityUserId(session); |
|
| 3566 |
+ if (StringUtils.isBlank(pendingUserId) || !pendingUserId.equals(userId)) {
|
|
| 3567 |
+ modelAndView.addObject("compare", false);
|
|
| 3568 |
+ modelAndView.addObject("message", "로그인 정보를 다시 확인해주세요.");
|
|
| 3569 |
+ return modelAndView; |
|
| 3570 |
+ } |
|
| 3571 |
+ SecondAuthLogVO lockCheck = new SecondAuthLogVO(); |
|
| 3572 |
+ lockCheck.setTryLoginId(pendingUserId); |
|
| 3573 |
+ if (secondAuthLogService.isSecondAuthLocked(lockCheck)) {
|
|
| 3574 |
+ modelAndView.addObject("compare", false);
|
|
| 3575 |
+ modelAndView.addObject("locked", true);
|
|
| 3576 |
+ modelAndView.addObject("lockSeconds", Math.max(1,
|
|
| 3577 |
+ secondAuthLogService.selectSecondAuthLockRemainingSeconds(lockCheck))); |
|
| 3578 |
+ modelAndView.addObject("message", "인증 시도 5회 이상 실패하여 5분간 로그인이 제한됩니다. 잠시 후 다시 시도해주세요.");
|
|
| 3579 |
+ return modelAndView; |
|
| 3580 |
+ } |
|
| 3581 |
+ if (getSecondAuthSendCount(session) >= SecondAuthSessionConstants.MAX_SEND_COUNT) {
|
|
| 3582 |
+ modelAndView.addObject("compare", false);
|
|
| 3583 |
+ modelAndView.addObject("message", "인증번호 재발송 가능 횟수를 초과했습니다.");
|
|
| 3584 |
+ return modelAndView; |
|
| 3585 |
+ } |
|
| 3586 |
+ long remainingMillis = getSecondAuthResendRemainingMillis(session); |
|
| 3587 |
+ modelAndView.addObject("compare", remainingMillis <= 0);
|
|
| 3588 |
+ modelAndView.addObject("retryAfter", (remainingMillis + 999) / 1000);
|
|
| 3589 |
+ modelAndView.addObject("status", "success");
|
|
| 3590 |
+ return modelAndView; |
|
| 3591 |
+ } |
|
| 3901 | 3592 |
sendLogVO = mjonMsgDataService.selectSysMsgLog(sendLogVO); |
| 3902 | 3593 |
if (sendLogVO == null) {
|
| 3903 | 3594 |
modelAndView.addObject("compare", true);
|
... | ... | @@ -3941,7 +3632,7 @@ |
| 3941 | 3632 |
System.out.println(mberManageVO.toString()); |
| 3942 | 3633 |
System.out.println("mberManageVO.toString()");
|
| 3943 | 3634 |
|
| 3944 |
- |
|
| 3635 |
+ |
|
| 3945 | 3636 |
// 사용자 유효성 검사 |
| 3946 | 3637 |
// id, hp, nm |
| 3947 | 3638 |
try {
|
... | ... | @@ -3951,18 +3642,18 @@ |
| 3951 | 3642 |
userManageVO.setEmplyrNm(mberManageVO.getMberNm()); |
| 3952 | 3643 |
userManageVO.setMoblphonNo(mberManageVO.getMoblphonNo()); |
| 3953 | 3644 |
|
| 3954 |
- boolean TorF = true; |
|
| 3645 |
+ boolean TorF = true; |
|
| 3955 | 3646 |
if("USR".equals(mberManageVO.getUserSe()))
|
| 3956 | 3647 |
{
|
| 3957 | 3648 |
TorF = userManageService.selectAdminIdAjax(userManageVO) > 0 ? true : false; |
| 3958 |
- |
|
| 3649 |
+ |
|
| 3959 | 3650 |
mberManageVO.setMberNm("");
|
| 3960 | 3651 |
// 관리자 로그인 본인인증은 name이 null이여야함 |
| 3961 |
- |
|
| 3652 |
+ |
|
| 3962 | 3653 |
} |
| 3963 | 3654 |
else |
| 3964 | 3655 |
{
|
| 3965 |
- |
|
| 3656 |
+ |
|
| 3966 | 3657 |
/* |
| 3967 | 3658 |
* 일 시 : 2023.07.25 |
| 3968 | 3659 |
* 담당자 : 원영현 과장 수정 |
... | ... | @@ -3972,7 +3663,7 @@ |
| 3972 | 3663 |
userManageVO.setMoblphonNo("");
|
| 3973 | 3664 |
List<UserManageVO> usedNmList = new ArrayList<>(); |
| 3974 | 3665 |
usedNmList = userManageService.selectUserIdAjax2(userManageVO); |
| 3975 |
- TorF = usedNmList.size() > 0 ? true : false; |
|
| 3666 |
+ TorF = usedNmList.size() > 0 ? true : false; |
|
| 3976 | 3667 |
} |
| 3977 | 3668 |
|
| 3978 | 3669 |
|
... | ... | @@ -4013,7 +3704,7 @@ |
| 4013 | 3704 |
// serverNm = request.getScheme() + "://www.munjaon.co.kr"; |
| 4014 | 3705 |
// } |
| 4015 | 3706 |
// String authRUrl = serverNm + mberManageVO.getAuthRUrl(); |
| 4016 |
-// |
|
| 3707 |
+// |
|
| 4017 | 3708 |
// AuthCertVO certVO = kmcCertCheck.authCertCheckThree(authRUrl, mberManageVO); |
| 4018 | 3709 |
// |
| 4019 | 3710 |
// |
... | ... | @@ -4021,7 +3712,7 @@ |
| 4021 | 3712 |
mberCertPhoneVO.setTrUrl("/web/cop/kmc/authRequestFindIdPwAjax.do");
|
| 4022 | 3713 |
mberCertPhoneVO.setName(mberManageVO.getMberNm()); |
| 4023 | 3714 |
mberCertPhoneVO.setPhoneNo(mberManageVO.getMoblphonNo()); |
| 4024 |
- |
|
| 3715 |
+ |
|
| 4025 | 3716 |
String plusInfo = ""; |
| 4026 | 3717 |
plusInfo += mberManageVO.getMberId(); |
| 4027 | 3718 |
if(StringUtils.isNotEmpty(mberManageVO.getPassword())) |
... | ... | @@ -4029,13 +3720,13 @@ |
| 4029 | 3720 |
plusInfo = plusInfo + ",,," + mberManageVO.getPassword(); |
| 4030 | 3721 |
} |
| 4031 | 3722 |
mberCertPhoneVO.setPlusInfo(plusInfo); |
| 4032 |
- |
|
| 3723 |
+ |
|
| 4033 | 3724 |
AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
| 4034 |
- |
|
| 3725 |
+ |
|
| 4035 | 3726 |
modelAndView.addObject("tr_cert", certVO.getTr_cert());
|
| 4036 | 3727 |
modelAndView.addObject("tr_url", certVO.getTr_url());
|
| 4037 | 3728 |
modelAndView.addObject("tr_add", certVO.getTr_add());
|
| 4038 |
- |
|
| 3729 |
+ |
|
| 4039 | 3730 |
modelAndView.addObject("result", "success");
|
| 4040 | 3731 |
|
| 4041 | 3732 |
} catch (Exception e) {
|
... | ... | @@ -4096,24 +3787,24 @@ |
| 4096 | 3787 |
RedirectAttributes redirectAttributes, HttpSession session) throws Exception {
|
| 4097 | 3788 |
|
| 4098 | 3789 |
UserManageVO userManageVO = new UserManageVO(); |
| 4099 |
- |
|
| 3790 |
+ |
|
| 4100 | 3791 |
// KmcVO kmcRVO = loginService.kmcDecryption(request, kmcVO); |
| 4101 |
- |
|
| 3792 |
+ |
|
| 4102 | 3793 |
//kmc 본인인증 결과처리 |
| 4103 | 3794 |
kmcVO = kmcCertChecker.authCertResult(request, response, model); |
| 4104 | 3795 |
//kmc 본인인증 로그 처리 |
| 4105 | 3796 |
AuthCertVO certVO = kmcCertChecker.insertCertLog(kmcVO, "KMC_아이디패스워드찾기"); |
| 4106 |
- |
|
| 3797 |
+ |
|
| 4107 | 3798 |
|
| 4108 | 3799 |
userManageVO.setCrtfcDnValue(kmcVO.getDI()); |
| 4109 | 3800 |
userManageVO.setEmplyrNm(kmcVO.getName()); |
| 4110 | 3801 |
userManageVO.setEmplyrId(kmcVO.getPlusInfo().split(",,,")[0]);
|
| 4111 | 3802 |
userManageVO.setPassword(kmcVO.getPlusInfo().split(",,,")[1]);
|
| 4112 |
- |
|
| 3803 |
+ |
|
| 4113 | 3804 |
userManageService.updateCrtfcDnValue(userManageVO); |
| 4114 |
- |
|
| 3805 |
+ |
|
| 4115 | 3806 |
try {
|
| 4116 |
- |
|
| 3807 |
+ |
|
| 4117 | 3808 |
String msg = ""; |
| 4118 | 3809 |
if (!findIdKmcAdmCheck(userManageVO)) {
|
| 4119 | 3810 |
msg = "일치하는 정보가 없습니다."; |
... | ... | @@ -4126,17 +3817,7 @@ |
| 4126 | 3817 |
e.printStackTrace(); |
| 4127 | 3818 |
// TODO: handle exception |
| 4128 | 3819 |
} |
| 4129 |
-// kmcRVO.setCertType("KMC_관리자미인증IP접속인증");
|
|
| 4130 |
-// // 디비 테이블에 저장하기 |
|
| 4131 |
-// |
|
| 4132 |
-// try {
|
|
| 4133 |
-// mberManageService.insertCertInfoLogBn(kmcRVO); |
|
| 4134 |
-// |
|
| 4135 |
-// } catch (Exception e) {
|
|
| 4136 |
-// System.out.println("!!!!!!!!!!!!!!!!!");
|
|
| 4137 |
-// e.printStackTrace(); |
|
| 4138 |
-// // TODO: handle exception |
|
| 4139 |
-// } |
|
| 3820 |
+ |
|
| 4140 | 3821 |
|
| 4141 | 3822 |
|
| 4142 | 3823 |
model.addAttribute("kmcVO", kmcVO);
|
+++ src/main/java/itn/let/uat/uia/web/EgovMyPageRestController.java
... | ... | @@ -0,0 +1,258 @@ |
| 1 | +package itn.let.uat.uia.web; | |
| 2 | + | |
| 3 | +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; | |
| 4 | +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; | |
| 5 | +import itn.com.cmm.LoginVO; | |
| 6 | +import itn.com.cmm.service.EgovFileMngService; | |
| 7 | +import itn.com.cmm.service.EgovFileMngUtil; | |
| 8 | +import itn.com.cmm.service.FileVO; | |
| 9 | +import itn.com.utl.page.PaginationUtil; | |
| 10 | +import itn.com.utl.response.ApiResponse; | |
| 11 | +import itn.com.utl.response.PageResponse; | |
| 12 | +import itn.let.cert.phone.service.CertPhoneService; | |
| 13 | +import itn.let.cert.phone.service.MberCertPhoneVO; | |
| 14 | +import itn.let.mjo.mjocommon.MjonCommon; | |
| 15 | +import itn.let.uat.uia.service.SecondAuthMethodLogService; | |
| 16 | +import itn.let.uat.uia.service.SecondAuthMethodLogVO; | |
| 17 | +import itn.let.mjo.msg.service.MjonMsgService; | |
| 18 | +import itn.let.mjo.msg.service.MjEmployeeCertVO; | |
| 19 | +import itn.let.mjo.msg.service.SendNumberStatusVO; | |
| 20 | +import itn.let.sym.site.service.EgovSiteManagerService; | |
| 21 | +import itn.let.sym.site.service.JoinSettingVO; | |
| 22 | +import org.slf4j.Logger; | |
| 23 | +import org.slf4j.LoggerFactory; | |
| 24 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 25 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 26 | +import org.springframework.web.bind.annotation.RestController; | |
| 27 | +import org.springframework.web.multipart.MultipartFile; | |
| 28 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | |
| 29 | + | |
| 30 | +import javax.annotation.Resource; | |
| 31 | +import java.util.ArrayList; | |
| 32 | +import java.util.HashMap; | |
| 33 | +import java.util.LinkedHashMap; | |
| 34 | +import java.util.List; | |
| 35 | +import java.util.Locale; | |
| 36 | +import java.util.Map; | |
| 37 | + | |
| 38 | +@RestController | |
| 39 | +public class EgovMyPageRestController { | |
| 40 | + | |
| 41 | + private static final Logger LOGGER = LoggerFactory.getLogger(EgovMyPageRestController.class); | |
| 42 | + | |
| 43 | + @Resource(name = "CertPhoneService") | |
| 44 | + private CertPhoneService certPhoneService; | |
| 45 | + | |
| 46 | + @Resource(name = "secondAuthMethodLogService") | |
| 47 | + private SecondAuthMethodLogService secondAuthMethodLogService; | |
| 48 | + | |
| 49 | + @Resource(name = "mjonMsgService") | |
| 50 | + private MjonMsgService mjonMsgService; | |
| 51 | + | |
| 52 | + @Resource(name = "EgovFileMngUtil") | |
| 53 | + private EgovFileMngUtil fileUtil; | |
| 54 | + | |
| 55 | + @Resource(name = "EgovFileMngService") | |
| 56 | + private EgovFileMngService fileMngService; | |
| 57 | + | |
| 58 | + @Resource(name = "MjonCommon") | |
| 59 | + private MjonCommon mjonCommon; | |
| 60 | + | |
| 61 | + @Resource(name = "egovSiteManagerService") | |
| 62 | + private EgovSiteManagerService egovSiteManagerService; | |
| 63 | + | |
| 64 | + @RequestMapping(value = {"/web/user/send-number/status.do", "/web/user/selectSendNumberStatus.do"}) | |
| 65 | + public ApiResponse<SendNumberStatusVO> selectSendNumberStatus() { | |
| 66 | + try { | |
| 67 | + LoginVO user = getAuthenticatedUser(); | |
| 68 | + return ApiResponse.success(mjonMsgService.selectSendNumberStatus(user.getId())); | |
| 69 | + } catch (Exception e) { | |
| 70 | + return ApiResponse.fail(e.getMessage()); | |
| 71 | + } | |
| 72 | + } | |
| 73 | + | |
| 74 | + @RequestMapping(value = "/web/user/send-number/employee-cert/apply.do", method = RequestMethod.POST) | |
| 75 | + public ApiResponse<SendNumberStatusVO> applyEmployeeCert( | |
| 76 | + MultipartHttpServletRequest multiRequest) { | |
| 77 | + List<FileVO> savedFiles = null; | |
| 78 | + try { | |
| 79 | + LoginVO user = getAuthenticatedUser(); | |
| 80 | + int applyCnt = parseApplyCnt(multiRequest.getParameter("applyCnt")); | |
| 81 | + if (!"Y".equals(multiRequest.getParameter("agreeYn"))) { | |
| 82 | + throw new IllegalArgumentException("증빙서류 수집·이용에 동의해 주세요."); | |
| 83 | + } | |
| 84 | + | |
| 85 | + Map<String, MultipartFile> files = validateEmployeeCertFiles(multiRequest.getFileMap()); | |
| 86 | + savedFiles = fileUtil.parseFileInf(files, "EMP_CERT_", 0, "", "", ""); | |
| 87 | + String atchFileId = fileMngService.insertFileInfs(savedFiles); | |
| 88 | + | |
| 89 | + MjEmployeeCertVO employeeCertVO = new MjEmployeeCertVO(); | |
| 90 | + employeeCertVO.setMberId(user.getId()); | |
| 91 | + employeeCertVO.setApplyCnt(applyCnt); | |
| 92 | + employeeCertVO.setAgreeYn("Y"); | |
| 93 | + employeeCertVO.setAtchFileId(atchFileId); | |
| 94 | + | |
| 95 | + SendNumberStatusVO status = mjonMsgService.applyEmployeeCert(employeeCertVO); | |
| 96 | + sendEmployeeCertSlackNotice(user); | |
| 97 | + return ApiResponse.success(status, "종사자 수 인증을 신청했습니다."); | |
| 98 | + } catch (Exception e) { | |
| 99 | + deleteSavedFiles(savedFiles); | |
| 100 | + return ApiResponse.fail(e.getMessage()); | |
| 101 | + } | |
| 102 | + } | |
| 103 | + | |
| 104 | + private void sendEmployeeCertSlackNotice(LoginVO user) { | |
| 105 | + try { | |
| 106 | + JoinSettingVO joinSettingVO = egovSiteManagerService.selectAdminNotiDetail(); | |
| 107 | + if (joinSettingVO == null || !"Y".equals(joinSettingVO.getSlackNoti())) { | |
| 108 | + return; | |
| 109 | + } | |
| 110 | + | |
| 111 | + String mberNm = user.getMberNm(); | |
| 112 | + if (mberNm == null || mberNm.trim().isEmpty()) { | |
| 113 | + mberNm = user.getName(); | |
| 114 | + } | |
| 115 | + if (mberNm == null) { | |
| 116 | + mberNm = ""; | |
| 117 | + } | |
| 118 | + | |
| 119 | + String message = "[문자온] 종사자 수 인증 요청 - " | |
| 120 | + + mberNm + "(" + user.getId() + ")"; | |
| 121 | + mjonCommon.sendSimpleSlackMsg(message); | |
| 122 | + } catch (Exception e) { | |
| 123 | + LOGGER.warn("종사자 수 인증 신청 Slack 알림 발송에 실패했습니다. mberId={}", user.getId(), e); | |
| 124 | + } | |
| 125 | + } | |
| 126 | + | |
| 127 | + @RequestMapping(value = "/web/user/selectAuthPhoneNumber.do") | |
| 128 | + public ApiResponse<Map<String, Object>> selectAuthPhoneNumber() { | |
| 129 | + try { | |
| 130 | + LoginVO user = getAuthenticatedUser(); | |
| 131 | + Map<String, Object> data = new HashMap<String, Object>(); | |
| 132 | + data.put("registered", withAccountPhone(certPhoneService.selectMberCertPhoneList(user.getId()), user.getMoblphonNo())); | |
| 133 | + data.put("candidates", certPhoneService.selectEligibleCertPhoneList(user.getId())); | |
| 134 | + data.put("maxCount", "c".equalsIgnoreCase(user.getDept()) ? 4 : 3); | |
| 135 | + return ApiResponse.success(data); | |
| 136 | + } catch (Exception e) { | |
| 137 | + return ApiResponse.fail(e.getMessage()); | |
| 138 | + } | |
| 139 | + } | |
| 140 | + | |
| 141 | + @RequestMapping(value = "/web/user/selectAuthMethodChangeHistory.do") | |
| 142 | + public ApiResponse<PageResponse<SecondAuthMethodLogVO>> selectAuthMethodChangeHistory( | |
| 143 | + SecondAuthMethodLogVO logVO) { | |
| 144 | + try { | |
| 145 | + LoginVO user = getAuthenticatedUser(); | |
| 146 | + logVO.setMberId(user.getId()); | |
| 147 | + | |
| 148 | + PaginationInfo paginationInfo = PaginationUtil.init(logVO); | |
| 149 | + List<SecondAuthMethodLogVO> list = secondAuthMethodLogService.selectSecondAuthMethodLogList(logVO); | |
| 150 | + int totalCount = secondAuthMethodLogService.selectSecondAuthMethodLogCnt(logVO); | |
| 151 | + paginationInfo.setTotalRecordCount(totalCount); | |
| 152 | + | |
| 153 | + return ApiResponse.success(PageResponse.withList(list, paginationInfo)); | |
| 154 | + } catch (Exception e) { | |
| 155 | + return ApiResponse.fail(e.getMessage()); | |
| 156 | + } | |
| 157 | + } | |
| 158 | + | |
| 159 | + private LoginVO getAuthenticatedUser() { | |
| 160 | + if (!EgovUserDetailsHelper.isAuthenticated()) { | |
| 161 | + throw new IllegalStateException("로그인 후 이용해 주세요."); | |
| 162 | + } | |
| 163 | + | |
| 164 | + LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); | |
| 165 | + if (user == null || user.getId() == null || user.getId().isEmpty()) { | |
| 166 | + throw new IllegalStateException("로그인 정보를 확인할 수 없습니다."); | |
| 167 | + } | |
| 168 | + return user; | |
| 169 | + } | |
| 170 | + | |
| 171 | + private int parseApplyCnt(String applyCnt) { | |
| 172 | + try { | |
| 173 | + int value = Integer.parseInt(applyCnt); | |
| 174 | + if (value < 1) { | |
| 175 | + throw new NumberFormatException(); | |
| 176 | + } | |
| 177 | + return value; | |
| 178 | + } catch (Exception e) { | |
| 179 | + throw new IllegalArgumentException("종사자 수를 1명 이상 입력해 주세요."); | |
| 180 | + } | |
| 181 | + } | |
| 182 | + | |
| 183 | + private Map<String, MultipartFile> validateEmployeeCertFiles(Map<String, MultipartFile> requestFiles) { | |
| 184 | + Map<String, MultipartFile> files = new LinkedHashMap<String, MultipartFile>(); | |
| 185 | + if (requestFiles != null) { | |
| 186 | + for (Map.Entry<String, MultipartFile> entry : requestFiles.entrySet()) { | |
| 187 | + MultipartFile file = entry.getValue(); | |
| 188 | + if (file != null && !file.isEmpty()) { | |
| 189 | + files.put(entry.getKey(), file); | |
| 190 | + } | |
| 191 | + } | |
| 192 | + } | |
| 193 | + | |
| 194 | + if (files.isEmpty()) { | |
| 195 | + throw new IllegalArgumentException("종사자 수를 확인할 수 있는 증빙서류를 첨부해 주세요."); | |
| 196 | + } | |
| 197 | + if (files.size() > 5) { | |
| 198 | + throw new IllegalArgumentException("증빙서류는 최대 5개까지 첨부할 수 있습니다."); | |
| 199 | + } | |
| 200 | + | |
| 201 | + long maxFileSize = 50L * 1024L * 1024L; | |
| 202 | + for (MultipartFile file : files.values()) { | |
| 203 | + String fileName = file.getOriginalFilename() == null | |
| 204 | + ? "" : file.getOriginalFilename().toLowerCase(Locale.ROOT); | |
| 205 | + if (!(fileName.endsWith(".pdf") || fileName.endsWith(".png") | |
| 206 | + || fileName.endsWith(".jpg") || fileName.endsWith(".jpeg"))) { | |
| 207 | + throw new IllegalArgumentException("PDF 또는 이미지(PNG, JPG, JPEG) 파일만 첨부할 수 있습니다."); | |
| 208 | + } | |
| 209 | + if (file.getSize() > maxFileSize) { | |
| 210 | + throw new IllegalArgumentException("파일당 최대 크기는 50MB입니다."); | |
| 211 | + } | |
| 212 | + } | |
| 213 | + return files; | |
| 214 | + } | |
| 215 | + | |
| 216 | + private void deleteSavedFiles(List<FileVO> savedFiles) { | |
| 217 | + if (savedFiles == null) { | |
| 218 | + return; | |
| 219 | + } | |
| 220 | + for (FileVO fileVO : savedFiles) { | |
| 221 | + try { | |
| 222 | + fileMngService.deleteFmsFileInf(fileVO); | |
| 223 | + } catch (Exception ignored) { | |
| 224 | + // 파일 정리 실패가 원래 신청 오류 응답을 덮지 않도록 한다. | |
| 225 | + } | |
| 226 | + } | |
| 227 | + } | |
| 228 | + | |
| 229 | + private List<MberCertPhoneVO> withAccountPhone(List<MberCertPhoneVO> phoneList, String accountPhone) { | |
| 230 | + List<MberCertPhoneVO> result = phoneList == null | |
| 231 | + ? new ArrayList<MberCertPhoneVO>() | |
| 232 | + : new ArrayList<MberCertPhoneVO>(phoneList); | |
| 233 | + String normalizedAccountPhone = normalizePhone(accountPhone); | |
| 234 | + if (normalizedAccountPhone.isEmpty()) { | |
| 235 | + return result; | |
| 236 | + } | |
| 237 | + | |
| 238 | + boolean hasBasicPhone = false; | |
| 239 | + for (MberCertPhoneVO phone : result) { | |
| 240 | + if ("BASIC".equals(phone.getPhoneType())) { | |
| 241 | + hasBasicPhone = true; | |
| 242 | + break; | |
| 243 | + } | |
| 244 | + } | |
| 245 | + if (!hasBasicPhone) { | |
| 246 | + MberCertPhoneVO basicPhone = new MberCertPhoneVO(); | |
| 247 | + basicPhone.setMbtlnum(normalizedAccountPhone); | |
| 248 | + basicPhone.setCertAlias("대표번호"); | |
| 249 | + basicPhone.setPhoneType("BASIC"); | |
| 250 | + result.add(0, basicPhone); | |
| 251 | + } | |
| 252 | + return result; | |
| 253 | + } | |
| 254 | + | |
| 255 | + private String normalizePhone(String phoneNo) { | |
| 256 | + return phoneNo == null ? "" : phoneNo.replaceAll("[^0-9]", ""); | |
| 257 | + } | |
| 258 | +} |
--- src/main/java/itn/let/uat/uia/web/EgovMypageController.java
+++ src/main/java/itn/let/uat/uia/web/EgovMypageController.java
... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 |
import java.util.Iterator; |
| 9 | 9 |
import java.util.LinkedHashMap; |
| 10 | 10 |
import java.util.List; |
| 11 |
+import java.util.Locale; |
|
| 11 | 12 |
import java.util.Map; |
| 12 | 13 |
import java.util.regex.Matcher; |
| 13 | 14 |
import java.util.regex.Pattern; |
... | ... | @@ -16,6 +17,10 @@ |
| 16 | 17 |
import javax.servlet.http.HttpServletRequest; |
| 17 | 18 |
import javax.servlet.http.HttpServletResponse; |
| 18 | 19 |
|
| 20 |
+import itn.com.utl.page.PaginationUtil; |
|
| 21 |
+import itn.let.uat.uia.service.SecondAuthLogService; |
|
| 22 |
+import itn.let.uat.uia.service.SecondAuthLogVO; |
|
| 23 |
+import itn.let.uat.uia.service.impl.SecondAuthLogDAO; |
|
| 19 | 24 |
import org.springframework.http.HttpStatus; |
| 20 | 25 |
import org.springframework.http.ResponseEntity; |
| 21 | 26 |
import org.springframework.stereotype.Controller; |
... | ... | @@ -184,7 +189,10 @@ |
| 184 | 189 |
|
| 185 | 190 |
@Resource(name = "KmcCertChecker") |
| 186 | 191 |
private KmcCertChecker kmcCertChecker; |
| 187 |
- |
|
| 192 |
+ |
|
| 193 |
+ @Resource(name = "secondAuthLogService") |
|
| 194 |
+ private SecondAuthLogService secondAuthLogService; |
|
| 195 |
+ |
|
| 188 | 196 |
/** |
| 189 | 197 |
* 마이페이지 비밀번호 변경 탭 |
| 190 | 198 |
*/ |
... | ... | @@ -1375,13 +1383,11 @@ |
| 1375 | 1383 |
public String sendNumberManage( |
| 1376 | 1384 |
@ModelAttribute MberManageVO mberManageVO |
| 1377 | 1385 |
, HttpServletRequest request |
| 1378 |
- , ModelMap model, RedirectAttributes redirectAttributes) throws Exception {
|
|
| 1379 |
- /*LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();*/ |
|
| 1386 |
+ , ModelMap model, RedirectAttributes redirectAttributes |
|
| 1387 |
+ ) throws Exception {
|
|
| 1380 | 1388 |
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
| 1381 | 1389 |
|
| 1382 | 1390 |
if(loginVO == null) {
|
| 1383 |
- /*model.addAttribute("message", "문자고 서비스는 로그인 후 이용 가능합니다.");*/
|
|
| 1384 |
- //redirectAttributes.addFlashAttribute("message", "문자고 서비스는 로그인 후 이용 가능합니다.");
|
|
| 1385 | 1391 |
return "redirect:/web/user/login/login.do"; |
| 1386 | 1392 |
} |
| 1387 | 1393 |
model.addAttribute("loginVO", loginVO);
|
... | ... | @@ -1390,8 +1396,7 @@ |
| 1390 | 1396 |
mberManageVO.setMberId(loginVO.getId()); |
| 1391 | 1397 |
MberManageVO userInfo = userManageService.selectUserInfo(mberManageVO); |
| 1392 | 1398 |
model.addAttribute("userInfo", userInfo);
|
| 1393 |
- |
|
| 1394 |
- |
|
| 1399 |
+ |
|
| 1395 | 1400 |
return "web/user/sendNumberManage"; |
| 1396 | 1401 |
} |
| 1397 | 1402 |
|
... | ... | @@ -1655,7 +1660,13 @@ |
| 1655 | 1660 |
ModelAndView modelAndView = new ModelAndView(); |
| 1656 | 1661 |
modelAndView.setViewName("jsonView");
|
| 1657 | 1662 |
try {
|
| 1658 |
- |
|
| 1663 |
+ LoginVO authenticatedUser = EgovUserDetailsHelper.isAuthenticated() |
|
| 1664 |
+ ? (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser() : null; |
|
| 1665 |
+ if (authenticatedUser == null) {
|
|
| 1666 |
+ throw new IllegalStateException("로그인 후 이용해 주세요.");
|
|
| 1667 |
+ } |
|
| 1668 |
+ mjonMsgVO.setUserId(authenticatedUser.getId()); |
|
| 1669 |
+ |
|
| 1659 | 1670 |
//발신번호 차단 리스트 체크(아이디 상관없이 모든 번호에 대한 차단번호 체크 20220616) |
| 1660 | 1671 |
int sendBlockNumberCheck = 0; |
| 1661 | 1672 |
sendBlockNumberCheck = mjonMsgService.selectSendBlockPhonNumCheck(mjonMsgVO); |
... | ... | @@ -1677,6 +1688,14 @@ |
| 1677 | 1688 |
modelAndView.addObject("message", message);
|
| 1678 | 1689 |
modelAndView.addObject("result", "fail");
|
| 1679 | 1690 |
}else {
|
| 1691 |
+ MjPhoneMemberVO availabilityVO = new MjPhoneMemberVO(); |
|
| 1692 |
+ availabilityVO.setUserId(authenticatedUser.getId()); |
|
| 1693 |
+ availabilityVO.setPhoneNumber(mjonMsgVO.getCallFrom()); |
|
| 1694 |
+ mjonMsgService.validateUserSendNumberAvailability(availabilityVO); |
|
| 1695 |
+ modelAndView.addObject("phmLineType", availabilityVO.getPhmLineType());
|
|
| 1696 |
+ modelAndView.addObject("sendNumberStatus",
|
|
| 1697 |
+ mjonMsgService.selectSendNumberStatus(authenticatedUser.getId())); |
|
| 1698 |
+ |
|
| 1680 | 1699 |
//System.out.println(mjonMsgVO.getPhmAuthType() + " : ***********************************************"); |
| 1681 | 1700 |
//if(mjonMsgVO.getPhmAuthType().equals("01") || mjonMsgVO.getPhmAuthType() == "01") { // phone
|
| 1682 | 1701 |
//System.out.println("휴대폰 인증 ***********************************************");
|
... | ... | @@ -1723,7 +1742,8 @@ |
| 1723 | 1742 |
modelAndView.addObject("result", "success");
|
| 1724 | 1743 |
} |
| 1725 | 1744 |
}catch (Exception e) {
|
| 1726 |
- modelAndView.addObject("message", "다시 시도 부탁드립니다.");
|
|
| 1745 |
+ modelAndView.addObject("message", StringUtil.isNotEmpty(e.getMessage())
|
|
| 1746 |
+ ? e.getMessage() : "다시 시도 부탁드립니다."); |
|
| 1727 | 1747 |
modelAndView.addObject("result", "fail");
|
| 1728 | 1748 |
} |
| 1729 | 1749 |
|
... | ... | @@ -1888,7 +1908,7 @@ |
| 1888 | 1908 |
mjPhoneMemberVO.setPhoneNumber(kmcVO.getPhoneNo()); |
| 1889 | 1909 |
mjPhoneMemberVO.setUserName(kmcVO.getName()); |
| 1890 | 1910 |
mjPhoneMemberVO.setAuthYn("Y");
|
| 1891 |
- mjonMsgService.insertSendNumber(mjPhoneMemberVO); |
|
| 1911 |
+ mjonMsgService.insertUserSendNumber(mjPhoneMemberVO); |
|
| 1892 | 1912 |
|
| 1893 | 1913 |
|
| 1894 | 1914 |
model.addAttribute("kmcVO", kmcVO);
|
... | ... | @@ -1917,7 +1937,7 @@ |
| 1917 | 1937 |
mjPhoneMemberVO.setPhoneNumber(certVO.getSentPhoneNumber()); // 발송 전화번호 |
| 1918 | 1938 |
mjPhoneMemberVO.setUserName(loginVO.getName()); |
| 1919 | 1939 |
mjPhoneMemberVO.setAuthYn("Y");
|
| 1920 |
- mjonMsgService.insertSendNumber(mjPhoneMemberVO); |
|
| 1940 |
+ mjonMsgService.insertUserSendNumber(mjPhoneMemberVO); |
|
| 1921 | 1941 |
modelAndView.addObject("result", "success");
|
| 1922 | 1942 |
|
| 1923 | 1943 |
}catch (Exception e) {
|
... | ... | @@ -1947,9 +1967,36 @@ |
| 1947 | 1967 |
|
| 1948 | 1968 |
// 발신번호 서류관리 등록 [시작] |
| 1949 | 1969 |
try {
|
| 1970 |
+ if (loginVO == null) {
|
|
| 1971 |
+ throw new IllegalStateException("로그인 후 이용해 주세요.");
|
|
| 1972 |
+ } |
|
| 1973 |
+ certVO.setDept(loginVO.getDept()); |
|
| 1974 |
+ String requestedPhoneNumber = StringUtil.isNotEmpty(certVO.getSendPhoneNumber()) |
|
| 1975 |
+ ? certVO.getSendPhoneNumber() : certVO.getSentPhoneNumber(); |
|
| 1976 |
+ |
|
| 1977 |
+ MjPhoneMemberVO availabilityVO = new MjPhoneMemberVO(); |
|
| 1978 |
+ availabilityVO.setUserId(loginVO.getId()); |
|
| 1979 |
+ availabilityVO.setPhoneNumber(requestedPhoneNumber); |
|
| 1980 |
+ mjonMsgService.validateUserSendNumberAvailability(availabilityVO); |
|
| 1981 |
+ |
|
| 1982 |
+ MjonMsgVO numberCheckVO = new MjonMsgVO(); |
|
| 1983 |
+ numberCheckVO.setUserId(loginVO.getId()); |
|
| 1984 |
+ numberCheckVO.setCallFrom(requestedPhoneNumber); |
|
| 1985 |
+ if (mjonMsgService.selectSendBlockPhonNumCheck(numberCheckVO) != 0) {
|
|
| 1986 |
+ throw new IllegalStateException("입력하신 발신번호는 차단된 발신번호입니다.");
|
|
| 1987 |
+ } |
|
| 1988 |
+ if (mjonMsgService.selectSendPhonNumCheck(numberCheckVO) != 0) {
|
|
| 1989 |
+ throw new IllegalStateException("이미 등록되어 있는 발신번호입니다.");
|
|
| 1990 |
+ } |
|
| 1991 |
+ |
|
| 1950 | 1992 |
String atchFileId = ""; |
| 1951 | 1993 |
String isThumbFile = ""; |
| 1952 |
- final Map<String, MultipartFile> files = multiRequest.getFileMap(); |
|
| 1994 |
+ boolean documentRequired = !("p".equalsIgnoreCase(loginVO.getDept())
|
|
| 1995 |
+ && "5".equals(certVO.getNameType()) && "01".equals(certVO.getCertType())) |
|
| 1996 |
+ && !("c".equalsIgnoreCase(loginVO.getDept())
|
|
| 1997 |
+ && "2".equals(certVO.getNameType()) && "01".equals(certVO.getCertType())); |
|
| 1998 |
+ final Map<String, MultipartFile> files = validateSendNumberDocumentFiles( |
|
| 1999 |
+ multiRequest.getFileMap(), documentRequired); |
|
| 1953 | 2000 |
if (!files.isEmpty()){
|
| 1954 | 2001 |
List<FileVO> result = fileUtil.parseFileInf(files, "CERT_", 0, atchFileId , "", isThumbFile); |
| 1955 | 2002 |
atchFileId = fileMngService.insertFileInfs(result); |
... | ... | @@ -1970,10 +2017,7 @@ |
| 1970 | 2017 |
mjPhoneMemberVO.setPhmAuthType(certVO.getCertType()); //번호 인증 타입 01:휴대폰인증, 03: 서류인증 |
| 1971 | 2018 |
mjPhoneMemberVO.setFrstRegisterId(loginVO.getId()); |
| 1972 | 2019 |
mjPhoneMemberVO.setLastUpdusrId(loginVO.getId()); |
| 1973 |
- mjPhoneMemberVO.setPhoneNumber(certVO.getSentPhoneNumber()); // 발송 전화번호 |
|
| 1974 |
- if(!"".equals(certVO.getSendPhoneNumber()) && certVO.getSendPhoneNumber() != null) { //230530 추가 - 고객이 인증 후 입력 한 발신번호를 수정하면, 수정 한 발신번호가 등록되어서 인증했을 경우 인증한 번호로 발신번호 등록하게끔 추가
|
|
| 1975 |
- mjPhoneMemberVO.setPhoneNumber(certVO.getSendPhoneNumber()); |
|
| 1976 |
- } |
|
| 2020 |
+ mjPhoneMemberVO.setPhoneNumber(requestedPhoneNumber); // 최종 확인된 발신번호 |
|
| 1977 | 2021 |
mjPhoneMemberVO.setUserName(loginVO.getName()); |
| 1978 | 2022 |
mjPhoneMemberVO.setSendPhoneNumber(certVO.getSendPhoneNumber()); // 확인 전화번호 |
| 1979 | 2023 |
mjPhoneMemberVO.setPhmValue(certVO.getPhmValue()); //비고 |
... | ... | @@ -2004,7 +2048,7 @@ |
| 2004 | 2048 |
}else {
|
| 2005 | 2049 |
mjPhoneMemberVO.setAuthYn("H");
|
| 2006 | 2050 |
} |
| 2007 |
- mjonMsgService.insertSendNumber(mjPhoneMemberVO); |
|
| 2051 |
+ mjonMsgService.insertUserSendNumber(mjPhoneMemberVO); |
|
| 2008 | 2052 |
// 발신번호 등록 [끝] |
| 2009 | 2053 |
|
| 2010 | 2054 |
// 즉시승인이 아닌경우 관리자에게 이메일 발송 |
... | ... | @@ -2016,10 +2060,12 @@ |
| 2016 | 2060 |
|
| 2017 | 2061 |
modelAndView.addObject("result", "success");
|
| 2018 | 2062 |
}catch (Exception e) {
|
| 2019 |
- System.out.println("발신번호 등록 오류 아이디 : " + loginVO.getId());
|
|
| 2063 |
+ System.out.println("발신번호 등록 오류 아이디 : "
|
|
| 2064 |
+ + (loginVO == null ? "" : loginVO.getId())); |
|
| 2020 | 2065 |
System.out.println("발신번호 등록 오류 내용 : " + e.getMessage());
|
| 2021 | 2066 |
|
| 2022 |
- modelAndView.addObject("message", "다시 시도 부탁드립니다.");
|
|
| 2067 |
+ modelAndView.addObject("message", StringUtil.isNotEmpty(e.getMessage())
|
|
| 2068 |
+ ? e.getMessage() : "다시 시도 부탁드립니다."); |
|
| 2023 | 2069 |
modelAndView.addObject("result", "fail");
|
| 2024 | 2070 |
|
| 2025 | 2071 |
return modelAndView; |
... | ... | @@ -2298,120 +2344,62 @@ |
| 2298 | 2344 |
* 회원탈퇴 본인인증 화면 |
| 2299 | 2345 |
*/ |
| 2300 | 2346 |
@RequestMapping(value="/web/user/mberSecureLogin.do") |
| 2301 |
- public String secureLogin(@ModelAttribute("mberCertLoginLogVO") MberCertLoginLogVO mberCertLoginLogVO
|
|
| 2302 |
- , ModelMap model, HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
|
|
| 2347 |
+ public String secureLogin(@ModelAttribute("secondAuthLogVO") SecondAuthLogVO secondAuthLogVO, ModelMap model, HttpServletRequest request) throws Exception {
|
|
| 2303 | 2348 |
|
| 2304 | 2349 |
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
| 2305 | 2350 |
if(loginVO == null) {
|
| 2306 | 2351 |
return "redirect:/web/user/login/login.do"; |
| 2307 | 2352 |
} |
| 2308 | 2353 |
|
| 2309 |
- |
|
| 2310 |
- try {
|
|
| 2311 |
- System.out.println("test Try +++ ");
|
|
| 2312 |
- |
|
| 2313 |
- // secuLoginFlag 값을 Model에 추가 |
|
| 2314 |
- if(mberCertLoginLogVO == null) {
|
|
| 2315 |
- model.addAttribute("secuLoginFlag", "");
|
|
| 2316 |
- }else {
|
|
| 2317 |
- model.addAttribute("secuLoginFlag", mberCertLoginLogVO.getSecuLoginFlag());
|
|
| 2318 |
- } |
|
| 2354 |
+ String loginId = loginVO.getId(); |
|
| 2355 |
+ //로그인 권한정보 불러오기 |
|
| 2356 |
+ String userId = EgovStringUtil.isNullToString(loginId); |
|
| 2319 | 2357 |
|
| 2320 |
- } catch (Exception e) {
|
|
| 2321 |
- e.printStackTrace(); |
|
| 2322 |
- // TODO: handle exception |
|
| 2323 |
- } |
|
| 2358 |
+ // 접속 IP |
|
| 2359 |
+ String cennectIP = EgovClntInfo.getClntIP(request); |
|
| 2360 |
+ model.addAttribute("cennectIP", cennectIP);
|
|
| 2324 | 2361 |
|
| 2325 |
- //로그인 권한정보 불러오기 |
|
| 2326 |
- String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 2327 |
- |
|
| 2328 |
- |
|
| 2329 |
- /** pageing */ |
|
| 2330 |
- PaginationInfo paginationInfo = new PaginationInfo(); |
|
| 2331 |
- paginationInfo.setCurrentPageNo(mberCertLoginLogVO.getPageIndex()); |
|
| 2332 |
- paginationInfo.setRecordCountPerPage(mberCertLoginLogVO.getPageUnit()); |
|
| 2333 |
- paginationInfo.setPageSize(mberCertLoginLogVO.getPageSize()); |
|
| 2334 |
- |
|
| 2335 |
- mberCertLoginLogVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
|
| 2336 |
- mberCertLoginLogVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
|
| 2337 |
- mberCertLoginLogVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
|
| 2338 |
- if("".equals(mberCertLoginLogVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
|
| 2339 |
- mberCertLoginLogVO.setSearchSortCnd("LOGIN_DT");
|
|
| 2340 |
- mberCertLoginLogVO.setSearchSortOrd("desc");
|
|
| 2341 |
- } |
|
| 2342 |
- |
|
| 2343 |
- |
|
| 2344 |
- mberCertLoginLogVO.setLoginId(userId); |
|
| 2345 |
- //전체 발송 리스트 불러오기 |
|
| 2346 |
- List<MberCertLoginLogVO> resultList = certLoginLogService.findAllCertLoginLogVO(mberCertLoginLogVO); |
|
| 2347 |
- model.addAttribute("resultList", resultList);
|
|
| 2348 |
- model.addAttribute("resultListCnt", resultList.size());
|
|
| 2349 |
- |
|
| 2350 |
- |
|
| 2351 |
- paginationInfo.setTotalRecordCount( resultList.size()> 0 ? resultList.get(0).getTotCnt() : 0); |
|
| 2352 |
- model.addAttribute("paginationInfo", paginationInfo);
|
|
| 2353 |
- |
|
| 2354 |
- |
|
| 2355 |
- |
|
| 2356 |
- |
|
| 2357 |
- // 접속 IP |
|
| 2358 |
- String cennectIP = EgovClntInfo.getClntIP(request); |
|
| 2359 |
- model.addAttribute("cennectIP", cennectIP);
|
|
| 2360 |
- |
|
| 2361 |
- // 접속 IP가 등록되어있는지 확인 |
|
| 2362 |
- MberCertIpVO mberCertIpVO = new MberCertIpVO(); |
|
| 2363 |
- mberCertIpVO.setCertIp(cennectIP); |
|
| 2364 |
- mberCertIpVO.setMberId(userId); |
|
| 2365 |
- model.addAttribute("chkcertRegIP", certIpService.checkRegCertIp(mberCertIpVO));
|
|
| 2366 |
- |
|
| 2367 |
- |
|
| 2368 |
- |
|
| 2369 |
- |
|
| 2370 |
- |
|
| 2371 |
- {
|
|
| 2372 |
- /** |
|
| 2373 |
- * 보안인증 본인인증 기능추가 |
|
| 2374 |
- * 20241120 원영현 과장 추가 |
|
| 2375 |
- * */ |
|
| 2376 |
-// KmcCertChecker kmcCertCheck = new KmcCertChecker(); |
|
| 2377 |
-// |
|
| 2378 |
-// //kmc 본인인증 실/개발 서버 구분 |
|
| 2379 |
-// String serverNm = ""; |
|
| 2380 |
-// if(request.getServerName().contains("192.168.0.60") || request.getServerName().contains("localhost")) {
|
|
| 2381 |
-// serverNm = request.getScheme() + "://192.168.0.60:8085"; |
|
| 2382 |
-// }else{
|
|
| 2383 |
-// serverNm = request.getScheme() + "://www.munjaon.co.kr"; |
|
| 2384 |
-// } |
|
| 2385 |
-// |
|
| 2386 |
-// System.out.println("@@@ serverNm : " + serverNm);
|
|
| 2387 |
- |
|
| 2388 |
- MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
|
| 2389 |
- mberCertPhoneVO.setTrUrl("/web/user/selectSecurityAuthn.do");
|
|
| 2390 |
- mberCertPhoneVO.setPlusInfo(loginVO.getId()); |
|
| 2391 |
- |
|
| 2392 |
- AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
|
| 2393 |
- |
|
| 2394 |
- model.addAttribute("certVO", certVO);
|
|
| 2395 |
- } |
|
| 2396 |
- |
|
| 2397 |
- MberManageVO mberManageVO = new MberManageVO(); |
|
| 2398 |
- mberManageVO.setMberId(loginVO.getId()); |
|
| 2399 |
- |
|
| 2400 |
- model.addAttribute("mberManageVO", userManageService.selectUserInfo(mberManageVO));
|
|
| 2401 |
- |
|
| 2402 |
- // 탭 하이라이트 |
|
| 2403 |
- model.addAttribute("pageTab", "mberSecureLogin");
|
|
| 2404 |
- |
|
| 2405 |
- |
|
| 2406 |
- //디비 테이블에 저장하기ㅣ |
|
| 2407 |
- AuthCertVO authCertVO = new AuthCertVO(); |
|
| 2408 |
- authCertVO.setMberId(userId); |
|
| 2409 |
- authCertVO.setCertType("secureLoginOFF");
|
|
| 2410 |
- String certLogRegDate = mberManageService.findTopByregDateFromCertLog(authCertVO); |
|
| 2411 |
- |
|
| 2412 |
- |
|
| 2413 |
- // 탭 하이라이트 |
|
| 2414 |
- model.addAttribute("certLogRegDate", certLogRegDate);
|
|
| 2362 |
+ // 접속 IP가 등록되어있는지 확인 |
|
| 2363 |
+ MberCertIpVO mberCertIpVO = new MberCertIpVO(); |
|
| 2364 |
+ mberCertIpVO.setCertIp(cennectIP); |
|
| 2365 |
+ mberCertIpVO.setMberId(userId); |
|
| 2366 |
+ |
|
| 2367 |
+ MberCertPhoneVO mberCertPhoneVO = new MberCertPhoneVO(); |
|
| 2368 |
+ mberCertPhoneVO.setTrUrl("/web/user/selectSecurityAuthn.do");
|
|
| 2369 |
+ mberCertPhoneVO.setPlusInfo(loginId); |
|
| 2370 |
+ |
|
| 2371 |
+ MberManageVO mberManageVO = new MberManageVO(); |
|
| 2372 |
+ mberManageVO.setMberId(loginId); |
|
| 2373 |
+ |
|
| 2374 |
+ //디비 테이블에 저장하기ㅣ |
|
| 2375 |
+ AuthCertVO authCertVO = new AuthCertVO(); |
|
| 2376 |
+ authCertVO.setMberId(userId); |
|
| 2377 |
+ authCertVO.setCertType("secureLoginOFF");
|
|
| 2378 |
+ |
|
| 2379 |
+ /** pageing */ |
|
| 2380 |
+ PaginationInfo paginationInfo = PaginationUtil.initWithSort(secondAuthLogVO, "LOG_ID", "DESC"); |
|
| 2381 |
+ |
|
| 2382 |
+ secondAuthLogVO.setTryLoginId(userId); |
|
| 2383 |
+ //전체 발송 리스트 불러오기 |
|
| 2384 |
+ List<SecondAuthLogVO> resultList = secondAuthLogService.selectSecondAuthLogList(secondAuthLogVO); |
|
| 2385 |
+ int totCnt = secondAuthLogService.selectSecondAuthLogCnt(secondAuthLogVO); |
|
| 2386 |
+ |
|
| 2387 |
+ paginationInfo.setTotalRecordCount(totCnt); |
|
| 2388 |
+ |
|
| 2389 |
+ AuthCertVO certVO = kmcCertChecker.authCertCheck(mberCertPhoneVO, request); |
|
| 2390 |
+ String certLogRegDate = mberManageService.findTopByregDateFromCertLog(authCertVO); |
|
| 2391 |
+ |
|
| 2392 |
+ model.addAttribute("resultList", resultList);
|
|
| 2393 |
+ model.addAttribute("resultListCnt", resultList.size());
|
|
| 2394 |
+ model.addAttribute("paginationInfo", paginationInfo);
|
|
| 2395 |
+ |
|
| 2396 |
+ model.addAttribute("chkcertRegIP", certIpService.checkRegCertIp(mberCertIpVO));
|
|
| 2397 |
+ model.addAttribute("certVO", certVO);
|
|
| 2398 |
+ model.addAttribute("mberManageVO", userManageService.selectUserInfo(mberManageVO));
|
|
| 2399 |
+ // 탭 하이라이트 |
|
| 2400 |
+ model.addAttribute("pageTab", "mberSecureLogin");
|
|
| 2401 |
+ // 탭 하이라이트 |
|
| 2402 |
+ model.addAttribute("certLogRegDate", certLogRegDate);
|
|
| 2415 | 2403 |
|
| 2416 | 2404 |
return "web/user/mberSecureLogin"; |
| 2417 | 2405 |
} |
... | ... | @@ -2843,5 +2831,40 @@ |
| 2843 | 2831 |
return new ResponseEntity<>("fail", HttpStatus.OK);
|
| 2844 | 2832 |
} |
| 2845 | 2833 |
} |
| 2846 |
- |
|
| 2834 |
+ |
|
| 2835 |
+ private Map<String, MultipartFile> validateSendNumberDocumentFiles( |
|
| 2836 |
+ Map<String, MultipartFile> requestFiles, boolean required) {
|
|
| 2837 |
+ Map<String, MultipartFile> files = new LinkedHashMap<String, MultipartFile>(); |
|
| 2838 |
+ if (requestFiles != null) {
|
|
| 2839 |
+ for (Map.Entry<String, MultipartFile> entry : requestFiles.entrySet()) {
|
|
| 2840 |
+ MultipartFile file = entry.getValue(); |
|
| 2841 |
+ if (file != null && !file.isEmpty()) {
|
|
| 2842 |
+ files.put(entry.getKey(), file); |
|
| 2843 |
+ } |
|
| 2844 |
+ } |
|
| 2845 |
+ } |
|
| 2846 |
+ |
|
| 2847 |
+ if (required && files.isEmpty()) {
|
|
| 2848 |
+ throw new IllegalArgumentException("필수 제출 서류를 첨부해 주세요.");
|
|
| 2849 |
+ } |
|
| 2850 |
+ if (files.size() > 5) {
|
|
| 2851 |
+ throw new IllegalArgumentException("첨부파일은 최대 5개까지 등록할 수 있습니다.");
|
|
| 2852 |
+ } |
|
| 2853 |
+ |
|
| 2854 |
+ long maxFileSize = 50L * 1024L * 1024L; |
|
| 2855 |
+ for (MultipartFile file : files.values()) {
|
|
| 2856 |
+ String fileName = file.getOriginalFilename() == null |
|
| 2857 |
+ ? "" : file.getOriginalFilename().toLowerCase(Locale.ROOT); |
|
| 2858 |
+ if (!(fileName.endsWith(".pdf") || fileName.endsWith(".png")
|
|
| 2859 |
+ || fileName.endsWith(".jpg") || fileName.endsWith(".jpeg"))) {
|
|
| 2860 |
+ throw new IllegalArgumentException( |
|
| 2861 |
+ "PDF 또는 이미지(PNG, JPG, JPEG) 파일만 첨부할 수 있습니다."); |
|
| 2862 |
+ } |
|
| 2863 |
+ if (file.getSize() > maxFileSize) {
|
|
| 2864 |
+ throw new IllegalArgumentException("파일당 최대 크기는 50MB입니다.");
|
|
| 2865 |
+ } |
|
| 2866 |
+ } |
|
| 2867 |
+ return files; |
|
| 2868 |
+ } |
|
| 2869 |
+ |
|
| 2847 | 2870 |
} |
--- src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java
+++ src/main/java/itn/let/uat/uia/web/EgovMypageRESTAPIController.java
... | ... | @@ -3,13 +3,19 @@ |
| 3 | 3 |
import java.text.ParseException; |
| 4 | 4 |
import java.util.ArrayList; |
| 5 | 5 |
import java.util.List; |
| 6 |
+import java.util.Map; |
|
| 6 | 7 |
|
| 7 | 8 |
import javax.annotation.Resource; |
| 8 | 9 |
|
| 10 |
+import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; |
|
| 11 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 12 |
+import itn.let.mjo.reservmsg.service.MjonResvMsgVO; |
|
| 9 | 13 |
import org.apache.commons.lang3.StringUtils; |
| 14 |
+import org.springframework.beans.factory.annotation.Autowired; |
|
| 10 | 15 |
import org.springframework.stereotype.Controller; |
| 11 | 16 |
import org.springframework.ui.Model; |
| 12 | 17 |
import org.springframework.ui.ModelMap; |
| 18 |
+import org.springframework.web.bind.annotation.ModelAttribute; |
|
| 13 | 19 |
import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | 20 |
import org.springframework.web.bind.annotation.RequestParam; |
| 15 | 21 |
import org.springframework.web.servlet.ModelAndView; |
... | ... | @@ -22,6 +28,7 @@ |
| 22 | 28 |
import itn.let.mjo.apikey.service.ApiKeyMngService; |
| 23 | 29 |
import itn.let.mjo.apikey.service.ApiKeyVO; |
| 24 | 30 |
import itn.let.utl.user.service.SecuKeyUtil; |
| 31 |
+import org.springframework.web.servlet.mvc.support.RedirectAttributes; |
|
| 25 | 32 |
|
| 26 | 33 |
/** |
| 27 | 34 |
* 일반 로그인, 인증서 로그인을 처리하는 컨트롤러 클래스 |
... | ... | @@ -51,7 +58,7 @@ |
| 51 | 58 |
//api call info 정보 |
| 52 | 59 |
@Resource(name = "apiCallInfoMngService") |
| 53 | 60 |
private ApiCallInfoMngService apiCallInfoMngService; |
| 54 |
- |
|
| 61 |
+ |
|
| 55 | 62 |
/** |
| 56 | 63 |
* 비밀번호 변경 페이지 |
| 57 | 64 |
*/ |
... | ... | @@ -293,7 +300,106 @@ |
| 293 | 300 |
|
| 294 | 301 |
return "web/api/examDown"; |
| 295 | 302 |
} |
| 296 |
- |
|
| 297 |
- |
|
| 303 |
+ |
|
| 304 |
+ @RequestMapping(value="/web/api/approvalList.do") |
|
| 305 |
+ public String approveList(@ModelAttribute("searchVO") MjonMsgSentVO mjonMsgSentVO, ModelMap model)
|
|
| 306 |
+ throws Exception {
|
|
| 307 |
+ |
|
| 308 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 309 |
+ |
|
| 310 |
+ if(loginVO == null) {
|
|
| 311 |
+ return "redirect:/web/user/login/login.do"; |
|
| 312 |
+ } |
|
| 313 |
+ // 검색 리스트 불러오기 |
|
| 314 |
+ if(mjonMsgSentVO.getPageUnit() != 10) {
|
|
| 315 |
+ mjonMsgSentVO.setPageUnit(mjonMsgSentVO.getPageUnit()); |
|
| 316 |
+ } |
|
| 317 |
+ |
|
| 318 |
+ model.addAttribute("loginVO", loginVO);
|
|
| 319 |
+ return "web/api/approvalList"; |
|
| 320 |
+ } |
|
| 321 |
+ |
|
| 322 |
+ /** |
|
| 323 |
+ * API 발송내역관리 탭 리스트 화면 |
|
| 324 |
+ * @param mjonMsgSentVO |
|
| 325 |
+ * @param model |
|
| 326 |
+ * @throws Exception |
|
| 327 |
+ */ |
|
| 328 |
+ @RequestMapping(value= {"/web/api/selectApiMsgSentListViewAjax.do"})
|
|
| 329 |
+ public String selectApiMsgSentListViewAjax(@ModelAttribute("searchVO") MjonMsgSentVO mjonMsgSentVO, ModelMap model) throws Exception{
|
|
| 330 |
+ |
|
| 331 |
+ try {
|
|
| 332 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 333 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 334 |
+ |
|
| 335 |
+ mjonMsgSentVO.setUserId(userId); |
|
| 336 |
+ |
|
| 337 |
+ /** pageing */ |
|
| 338 |
+ PaginationInfo paginationInfo = new PaginationInfo(); |
|
| 339 |
+ paginationInfo.setCurrentPageNo(mjonMsgSentVO.getPageIndex()); |
|
| 340 |
+ paginationInfo.setRecordCountPerPage(mjonMsgSentVO.getPageUnit()); |
|
| 341 |
+ paginationInfo.setPageSize(mjonMsgSentVO.getPageSize()); |
|
| 342 |
+ |
|
| 343 |
+ mjonMsgSentVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); |
|
| 344 |
+ mjonMsgSentVO.setLastIndex(paginationInfo.getLastRecordIndex()); |
|
| 345 |
+ mjonMsgSentVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); |
|
| 346 |
+ |
|
| 347 |
+ //전체 발송 리스트 불러오기 |
|
| 348 |
+ Map<String, Object> resultMap = apiKeyMngService.selectApiMsgSentList(mjonMsgSentVO); |
|
| 349 |
+ int totalCnt = apiKeyMngService.selectCountApiMsgSentList(mjonMsgSentVO); |
|
| 350 |
+ resultMap.put("totalCnt", totalCnt);
|
|
| 351 |
+ |
|
| 352 |
+ model.addAttribute("resultAllSentList", resultMap.get("resultList"));
|
|
| 353 |
+ paginationInfo.setTotalRecordCount(totalCnt); |
|
| 354 |
+ model.addAttribute("paginationInfo", paginationInfo);
|
|
| 355 |
+ model.addAttribute("totalRecordCount", paginationInfo.getTotalRecordCount());
|
|
| 356 |
+ |
|
| 357 |
+ model.addAttribute("mjonMsgSentVO", mjonMsgSentVO);
|
|
| 358 |
+ |
|
| 359 |
+ } catch (Exception e) {
|
|
| 360 |
+ e.printStackTrace(); |
|
| 361 |
+ // TODO: handle exception |
|
| 362 |
+ } |
|
| 363 |
+ |
|
| 364 |
+ return "web/api/ApiSentApprovalListAjax"; |
|
| 365 |
+ } |
|
| 366 |
+ |
|
| 367 |
+ @RequestMapping(value= {"/web/api/updateApproveDataAjax.do"})
|
|
| 368 |
+ public ModelAndView updateApproveDataAjax(@ModelAttribute("searchVO") MjonMsgSentVO mjonMsgSentVO, ModelMap model) throws Exception{
|
|
| 369 |
+ |
|
| 370 |
+ ModelAndView modelAndView = new ModelAndView(); |
|
| 371 |
+ modelAndView.setViewName("jsonView");
|
|
| 372 |
+ try {
|
|
| 373 |
+ |
|
| 374 |
+ LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null; |
|
| 375 |
+ String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getId()); |
|
| 376 |
+ |
|
| 377 |
+ if(!userId.equals("")) {
|
|
| 378 |
+ mjonMsgSentVO.setUserId(userId); |
|
| 379 |
+ }else {
|
|
| 380 |
+ modelAndView.addObject("message", "로그인 실패");
|
|
| 381 |
+ modelAndView.addObject("result", "fail");
|
|
| 382 |
+ |
|
| 383 |
+ return modelAndView; |
|
| 384 |
+ } |
|
| 385 |
+ |
|
| 386 |
+ int resultSts = apiKeyMngService.updateApproveApiMsg(mjonMsgSentVO); |
|
| 387 |
+ |
|
| 388 |
+ if(resultSts > 0) {
|
|
| 389 |
+ modelAndView.addObject("message", "성공");
|
|
| 390 |
+ modelAndView.addObject("result", "success");
|
|
| 391 |
+ }else {
|
|
| 392 |
+ modelAndView.addObject("message", "실패");
|
|
| 393 |
+ modelAndView.addObject("result", "fail");
|
|
| 394 |
+ } |
|
| 395 |
+ |
|
| 396 |
+ } catch (Exception e) {
|
|
| 397 |
+ e.printStackTrace(); |
|
| 398 |
+ // TODO: handle exception |
|
| 399 |
+ } |
|
| 400 |
+ |
|
| 401 |
+ return modelAndView; |
|
| 402 |
+ |
|
| 403 |
+ } |
|
| 298 | 404 |
|
| 299 | 405 |
} |
--- src/main/java/itn/let/uat/uia/web/KmcCertChecker.java
+++ src/main/java/itn/let/uat/uia/web/KmcCertChecker.java
... | ... | @@ -47,6 +47,10 @@ |
| 47 | 47 |
) {
|
| 48 | 48 |
//url 세팅 |
| 49 | 49 |
mberCertPhoneVO = setMberCertPhoneVO(request, mberCertPhoneVO); |
| 50 |
+ if (mberCertPhoneVO.getUrlCode() == null |
|
| 51 |
+ || mberCertPhoneVO.getUrlCode().trim().length() == 0) {
|
|
| 52 |
+ return new AuthCertVO(); |
|
| 53 |
+ } |
|
| 50 | 54 |
|
| 51 | 55 |
//kmc step 01 데이터 |
| 52 | 56 |
//reqNum은 최대 40byte 까지 사용 가능 |
... | ... | @@ -155,8 +159,10 @@ |
| 155 | 159 |
//----------------------------------------------------------------------------------------------------------------- |
| 156 | 160 |
try{
|
| 157 | 161 |
// Parameter 수신 -------------------------------------------------------------------- |
| 158 |
- api_token = request.getParameter("apiToken").trim();
|
|
| 159 |
- api_certNum = request.getParameter("certNum");
|
|
| 162 |
+ String apiTokenParameter = request.getParameter("apiToken");
|
|
| 163 |
+ String certNumParameter = request.getParameter("certNum");
|
|
| 164 |
+ api_token = apiTokenParameter == null ? "" : apiTokenParameter.trim(); |
|
| 165 |
+ api_certNum = certNumParameter == null ? "" : certNumParameter.trim(); |
|
| 160 | 166 |
|
| 161 | 167 |
// 파라미터 유효성 검증 |
| 162 | 168 |
if( api_token.length() == 0 ){
|
... | ... | @@ -319,7 +325,7 @@ |
| 319 | 325 |
msgChk="Y"; |
| 320 | 326 |
} |
| 321 | 327 |
|
| 322 |
- if(msgChk.equals("N")){
|
|
| 328 |
+ if(!"Y".equals(msgChk)){
|
|
| 323 | 329 |
goErrorPage("비정상적인 접근입니다.!!", request, response);
|
| 324 | 330 |
return kmcVO; |
| 325 | 331 |
} |
+++ src/main/java/itn/let/uat/uia/web/SecondAuthLogRestController.java
... | ... | @@ -0,0 +1,37 @@ |
| 1 | +package itn.let.uat.uia.web; | |
| 2 | + | |
| 3 | +import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; | |
| 4 | +import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; | |
| 5 | +import itn.com.cmm.LoginVO; | |
| 6 | +import itn.com.utl.page.PaginationUtil; | |
| 7 | +import itn.com.utl.response.ApiResponse; | |
| 8 | +import itn.com.utl.response.PageResponse; | |
| 9 | +import itn.let.uat.uia.service.SecondAuthLogService; | |
| 10 | +import itn.let.uat.uia.service.SecondAuthLogVO; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RestController; | |
| 13 | + | |
| 14 | +import javax.annotation.Resource; | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 17 | +@RestController | |
| 18 | +public class SecondAuthLogRestController { | |
| 19 | + @Resource(name = "secondAuthLogService") | |
| 20 | + private SecondAuthLogService secondAuthLogService; | |
| 21 | + | |
| 22 | + @RequestMapping(value = "/web/log/selectSecondAuthLog.do") | |
| 23 | + public ApiResponse<PageResponse<SecondAuthLogVO>> selectLoginHistory(SecondAuthLogVO logVO) { | |
| 24 | + try { | |
| 25 | + LoginVO user = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser(); | |
| 26 | + logVO.setTryLoginId(user.getId()); | |
| 27 | + PaginationInfo paginationInfo = PaginationUtil.initWithSort(logVO, "FRST_REGIST_PNTTM", "desc"); | |
| 28 | + List<SecondAuthLogVO> list = secondAuthLogService.selectSecondAuthLogList(logVO); | |
| 29 | + int totalCount = secondAuthLogService.selectSecondAuthLogCnt(logVO); | |
| 30 | + paginationInfo.setTotalRecordCount(totalCount); | |
| 31 | + PageResponse<SecondAuthLogVO> page = PageResponse.withAll(list, null, paginationInfo); | |
| 32 | + return ApiResponse.success(page); | |
| 33 | + } catch (Exception e) { | |
| 34 | + return ApiResponse.fail(e.getMessage()); | |
| 35 | + } | |
| 36 | + } | |
| 37 | +} |
--- src/main/java/itn/let/uss/umt/service/EgovMberManageService.java
+++ src/main/java/itn/let/uss/umt/service/EgovMberManageService.java
... | ... | @@ -256,4 +256,6 @@ |
| 256 | 256 |
|
| 257 | 257 |
//사용자 헤더 정보(단가, 이벤트 활성화 기간) |
| 258 | 258 |
public MberManageVO selectMberHeaderInfo(String mberId) throws Exception; |
| 259 |
+ |
|
| 260 |
+ public boolean isCompanyRegistrationPendingOrRejected(String mberId) throws Exception; |
|
| 259 | 261 |
}(No newline at end of file) |
--- src/main/java/itn/let/uss/umt/service/MberManageVO.java
+++ src/main/java/itn/let/uss/umt/service/MberManageVO.java
... | ... | @@ -558,8 +558,26 @@ |
| 558 | 558 |
private int headerPicture3Cnt; |
| 559 | 559 |
private int headerKakaoAtCnt; |
| 560 | 560 |
private int headerKakaoFtCnt; |
| 561 |
- private int headerFaxCnt; |
|
| 562 |
- |
|
| 561 |
+ private int headerFaxCnt; |
|
| 562 |
+ |
|
| 563 |
+ public String getPhoneNumber() {
|
|
| 564 |
+ return phoneNumber; |
|
| 565 |
+ } |
|
| 566 |
+ |
|
| 567 |
+ public void setPhoneNumber(String phoneNumber) {
|
|
| 568 |
+ this.phoneNumber = phoneNumber; |
|
| 569 |
+ } |
|
| 570 |
+ |
|
| 571 |
+ public String getPhmLineType() {
|
|
| 572 |
+ return phmLineType; |
|
| 573 |
+ } |
|
| 574 |
+ |
|
| 575 |
+ public void setPhmLineType(String phmLineType) {
|
|
| 576 |
+ this.phmLineType = phmLineType; |
|
| 577 |
+ } |
|
| 578 |
+ |
|
| 579 |
+ private String phoneNumber; |
|
| 580 |
+ private String phmLineType; |
|
| 563 | 581 |
public String getSmsCode() {
|
| 564 | 582 |
return smsCode; |
| 565 | 583 |
} |
--- src/main/java/itn/let/uss/umt/service/UserDefaultVO.java
+++ src/main/java/itn/let/uss/umt/service/UserDefaultVO.java
... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 |
|
| 3 | 3 |
import java.io.Serializable; |
| 4 | 4 |
|
| 5 |
+import itn.com.utl.page.PageableVO; |
|
| 5 | 6 |
import org.apache.commons.lang3.builder.ToStringBuilder; |
| 6 | 7 |
|
| 7 | 8 |
import lombok.Getter; |
--- src/main/java/itn/web/MainController.java
+++ src/main/java/itn/web/MainController.java
... | ... | @@ -12,9 +12,6 @@ |
| 12 | 12 |
import java.security.PublicKey; |
| 13 | 13 |
import java.security.spec.RSAPublicKeySpec; |
| 14 | 14 |
import java.text.SimpleDateFormat; |
| 15 |
-import java.time.LocalDate; |
|
| 16 |
-import java.time.format.DateTimeFormatter; |
|
| 17 |
-import java.time.temporal.ChronoUnit; |
|
| 18 | 15 |
import java.util.ArrayList; |
| 19 | 16 |
import java.util.Arrays; |
| 20 | 17 |
import java.util.Collections; |
... | ... | @@ -48,12 +45,11 @@ |
| 48 | 45 |
import javax.servlet.http.HttpServletResponse; |
| 49 | 46 |
import javax.servlet.http.HttpSession; |
| 50 | 47 |
|
| 51 |
-import itn.com.cmm.RestResponse; |
|
| 48 |
+import itn.let.mjo.apikey.service.ApiKeyMngService; |
|
| 49 |
+import itn.let.mjo.msgsent.service.MjonMsgSentVO; |
|
| 52 | 50 |
import org.json.simple.JSONArray; |
| 53 | 51 |
import org.json.simple.JSONObject; |
| 54 | 52 |
import org.springframework.beans.factory.annotation.Value; |
| 55 |
-import org.springframework.http.HttpStatus; |
|
| 56 |
-import org.springframework.http.ResponseEntity; |
|
| 57 | 53 |
import org.springframework.stereotype.Controller; |
| 58 | 54 |
import org.springframework.ui.Model; |
| 59 | 55 |
import org.springframework.ui.ModelMap; |
... | ... | @@ -108,7 +104,6 @@ |
| 108 | 104 |
import itn.let.mjo.addr.service.AddrTransHistService; |
| 109 | 105 |
import itn.let.mjo.addr.service.AddrTransHistVO; |
| 110 | 106 |
import itn.let.mjo.event.service.MjonEventService; |
| 111 |
-import itn.let.mjo.event.service.MjonEventVO; |
|
| 112 | 107 |
import itn.let.mjo.kisa.service.KisaService; |
| 113 | 108 |
import itn.let.mjo.kisa.service.KisaVO; |
| 114 | 109 |
import itn.let.mjo.mjocommon.MjonForienIpChk; |
... | ... | @@ -133,7 +128,6 @@ |
| 133 | 128 |
import itn.let.sym.prm.service.EgovProgrmManageService; |
| 134 | 129 |
import itn.let.sym.prm.service.ProgrmManageVO; |
| 135 | 130 |
import itn.let.sym.site.service.EgovSiteManagerService; |
| 136 |
-import itn.let.sym.site.service.JoinSettingVO; |
|
| 137 | 131 |
import itn.let.sym.site.service.MetaTagVO; |
| 138 | 132 |
import itn.let.sym.site.service.SiteManagerVO; |
| 139 | 133 |
import itn.let.uss.umt.service.EgovMberManageService; |
... | ... | @@ -276,6 +270,9 @@ |
| 276 | 270 |
/** 메인팝업 service */ |
| 277 | 271 |
@Resource(name = "mainPopupManageService") |
| 278 | 272 |
private MainPopupManageService mainPopupManageService; |
| 273 |
+ |
|
| 274 |
+ @Resource(name = "apiKeyMngService") |
|
| 275 |
+ private ApiKeyMngService apiKeyMngService; |
|
| 279 | 276 |
|
| 280 | 277 |
|
| 281 | 278 |
@Value("#{globalSettings['Globals.email.host']}")
|
... | ... | @@ -718,6 +715,18 @@ |
| 718 | 715 |
System.out.println("===================mainPopupList");
|
| 719 | 716 |
|
| 720 | 717 |
} |
| 718 |
+ |
|
| 719 |
+ {//API 미확인 발송 내역 안내 팝업
|
|
| 720 |
+ String userId = user == null ? "" : EgovStringUtil.isNullToString(user.getId()); |
|
| 721 |
+ int apiApprovalN = 0; |
|
| 722 |
+ if(StringUtil.isNotEmpty(userId)) {
|
|
| 723 |
+ MjonMsgSentVO mjonMsgSentVO = new MjonMsgSentVO(); |
|
| 724 |
+ mjonMsgSentVO.setUserId(userId); |
|
| 725 |
+ mjonMsgSentVO.setApiAprvYn("N");
|
|
| 726 |
+ apiApprovalN = apiKeyMngService.selectCountApiMsgSentList(mjonMsgSentVO); |
|
| 727 |
+ } |
|
| 728 |
+ model.addAttribute("apiApprovalN", apiApprovalN);
|
|
| 729 |
+ } |
|
| 721 | 730 |
|
| 722 | 731 |
return "web/main/mainPage"; |
| 723 | 732 |
} |
--- src/main/resources/egovframework/egovProps/globals.properties
+++ src/main/resources/egovframework/egovProps/globals.properties
... | ... | @@ -98,3 +98,7 @@ |
| 98 | 98 |
#MOBILE |
| 99 | 99 |
Globals.pay.kgm.mobile.mcSvcid=170622040674 |
| 100 | 100 |
Globals.pay.kgm.mobile.payMode=00 |
| 101 |
+ |
|
| 102 |
+# GeoIP Country DB |
|
| 103 |
+Globals.geoip.database.path=egovframework/geoip/GeoLite2-Country.mmdb |
|
| 104 |
+ |
--- src/main/resources/egovframework/egovProps/globals_dev.properties
+++ src/main/resources/egovframework/egovProps/globals_dev.properties
... | ... | @@ -122,4 +122,7 @@ |
| 122 | 122 |
#valkey |
| 123 | 123 |
Globals.valkey.ip=192.168.0.60 |
| 124 | 124 |
Globals.valkey.port=6379 |
| 125 |
-Globals.valkey.password=itntest123(No newline at end of file) |
|
| 125 |
+Globals.valkey.password=itntest123 |
|
| 126 |
+ |
|
| 127 |
+# GeoIP Country DB |
|
| 128 |
+Globals.geoip.database.path=egovframework/geoip/GeoLite2-Country.mmdb(No newline at end of file) |
--- src/main/resources/egovframework/egovProps/globals_local.properties
+++ src/main/resources/egovframework/egovProps/globals_local.properties
... | ... | @@ -131,3 +131,6 @@ |
| 131 | 131 |
Globals.valkey.ip=192.168.0.60 |
| 132 | 132 |
Globals.valkey.port=6379 |
| 133 | 133 |
Globals.valkey.password=itntest123 |
| 134 |
+ |
|
| 135 |
+# GeoIP Country DB |
|
| 136 |
+Globals.geoip.database.path=egovframework/geoip/GeoLite2-Country.mmdb(No newline at end of file) |
--- src/main/resources/egovframework/egovProps/globals_prod.properties
+++ src/main/resources/egovframework/egovProps/globals_prod.properties
... | ... | @@ -104,10 +104,13 @@ |
| 104 | 104 |
Globals.pay.kgm.mobile.payMode=10 |
| 105 | 105 |
|
| 106 | 106 |
#Slack |
| 107 |
-Globals.slack.hooks.url=https://hooks.slack.com/services/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 |
|
| 107 |
+Globals.slack.hooks.url=https://hooks.slack.com/services/B0C1F1ZGKGV/not0LrYlEzcnS3uUw1C0tlzt |
|
| 108 | 108 |
Globals.slack.channel.name=\uD14C\uC2A4\uD2B8-\uBB38\uC790\uACE0-message |
| 109 | 109 |
|
| 110 | 110 |
#valkey |
| 111 |
-Globals.valkey.ip=1.201.116.193 |
|
| 111 |
+Globals.valkey.ip=10.12.107.9 |
|
| 112 | 112 |
Globals.valkey.port=6379 |
| 113 | 113 |
Globals.valkey.password=itntest123 |
| 114 |
+ |
|
| 115 |
+# GeoIP Country DB |
|
| 116 |
+Globals.geoip.database.path=egovframework/geoip/GeoLite2-Country.mmdb(No newline at end of file) |
+++ src/main/resources/egovframework/geoip/GeoLite2-Country.mmdb
| Binary file is not shown |
--- src/main/resources/egovframework/spring/com/context-idgen.xml
+++ src/main/resources/egovframework/spring/com/context-idgen.xml
... | ... | @@ -2407,6 +2407,23 @@ |
| 2407 | 2407 |
<property name="fillChar" value="0" /> |
| 2408 | 2408 |
</bean> |
| 2409 | 2409 |
|
| 2410 |
+ <!-- 종사자 수 인증 이력 ID Generation Strategy Config --> |
|
| 2411 |
+ <bean name="egovEmployeeCertHstryIdGnrService" |
|
| 2412 |
+ class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" |
|
| 2413 |
+ destroy-method="destroy"> |
|
| 2414 |
+ <property name="dataSource" ref="dataSource" /> |
|
| 2415 |
+ <property name="strategy" ref="employeeCertHstryIdStrategy" /> |
|
| 2416 |
+ <property name="blockSize" value="10" /> |
|
| 2417 |
+ <property name="table" value="IDS" /> |
|
| 2418 |
+ <property name="tableName" value="EMP_CERT_HSTRY_ID" /> |
|
| 2419 |
+ </bean> |
|
| 2420 |
+ <bean name="employeeCertHstryIdStrategy" |
|
| 2421 |
+ class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl"> |
|
| 2422 |
+ <property name="prefix" value="ECHID_" /> |
|
| 2423 |
+ <property name="cipers" value="14" /> |
|
| 2424 |
+ <property name="fillChar" value="0" /> |
|
| 2425 |
+ </bean> |
|
| 2426 |
+ |
|
| 2410 | 2427 |
<!-- 문자고 전화번호 ID Generation Strategy Config --> |
| 2411 | 2428 |
<bean name="egovPhoneMemberIdGnrService" |
| 2412 | 2429 |
class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" |
... | ... | @@ -2944,4 +2961,45 @@ |
| 2944 | 2961 |
<property name="fillChar" value="0" /> |
| 2945 | 2962 |
</bean> |
| 2946 | 2963 |
|
| 2964 |
+ |
|
| 2965 |
+ <!-- 사용자 접근 로그 ID Generation Strategy Config --> |
|
| 2966 |
+ <bean name="egovSecondAuthLogIdGnrService" |
|
| 2967 |
+ class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" |
|
| 2968 |
+ destroy-method="destroy"> |
|
| 2969 |
+ |
|
| 2970 |
+ <property name="dataSource" ref="dataSource" /> |
|
| 2971 |
+ <property name="strategy" ref="secondAuthLogStrategy" /> |
|
| 2972 |
+ |
|
| 2973 |
+ <property name="blockSize" value="12" /> |
|
| 2974 |
+ <property name="table" value="IDS" /> |
|
| 2975 |
+ <property name="tableName" value="SECOND_AUTH_LOG_ID" /> |
|
| 2976 |
+ </bean> |
|
| 2977 |
+ |
|
| 2978 |
+ <bean name="secondAuthLogStrategy" |
|
| 2979 |
+ class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl"> |
|
| 2980 |
+ |
|
| 2981 |
+ <property name="prefix" value="SAL_" /> |
|
| 2982 |
+ <property name="cipers" value="12" /> |
|
| 2983 |
+ <property name="fillChar" value="0" /> |
|
| 2984 |
+ </bean> |
|
| 2985 |
+ |
|
| 2986 |
+ <bean name="egovUserAccessLogIdGnrService" |
|
| 2987 |
+ class="egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrServiceImpl" |
|
| 2988 |
+ destroy-method="destroy"> |
|
| 2989 |
+ |
|
| 2990 |
+ <property name="dataSource" ref="dataSource" /> |
|
| 2991 |
+ <property name="strategy" ref="userAccessLogStrategy" /> |
|
| 2992 |
+ |
|
| 2993 |
+ <property name="blockSize" value="12" /> |
|
| 2994 |
+ <property name="table" value="IDS" /> |
|
| 2995 |
+ <property name="tableName" value="USER_ACCESS_LOG_ID" /> |
|
| 2996 |
+ </bean> |
|
| 2997 |
+ |
|
| 2998 |
+ <bean name="userAccessLogStrategy" |
|
| 2999 |
+ class="egovframework.rte.fdl.idgnr.impl.strategy.EgovIdGnrStrategyImpl"> |
|
| 3000 |
+ |
|
| 3001 |
+ <property name="prefix" value="UAL_" /> |
|
| 3002 |
+ <property name="cipers" value="12" /> |
|
| 3003 |
+ <property name="fillChar" value="0" /> |
|
| 3004 |
+ </bean> |
|
| 2947 | 3005 |
</beans> |
+++ src/main/resources/egovframework/sqlmap/config/mysql/sql-map-config-mysql-sym-log-access.xml
... | ... | @@ -0,0 +1,7 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" | |
| 3 | + "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> | |
| 4 | + | |
| 5 | +<sqlMapConfig> | |
| 6 | + <sqlMap resource="egovframework/sqlmap/let/sym/log/access/UserAccessLog_SQL_Mysql.xml"/> | |
| 7 | +</sqlMapConfig> |
--- src/main/resources/egovframework/sqlmap/config/mysql/sql-map-config-mysql-uat.xml
+++ src/main/resources/egovframework/sqlmap/config/mysql/sql-map-config-mysql-uat.xml
... | ... | @@ -4,4 +4,6 @@ |
| 4 | 4 |
|
| 5 | 5 |
<sqlMapConfig> |
| 6 | 6 |
<sqlMap resource="egovframework/sqlmap/let/uat/uia/EgovLoginUsr_SQL_Mysql.xml"/> |
| 7 |
+ <sqlMap resource="egovframework/sqlmap/let/uat/uia/SecondAuthLog_SQL_Mysql.xml"/> |
|
| 8 |
+ <sqlMap resource="egovframework/sqlmap/let/uat/uia/SecondAuthMethodLog_SQL_Mysql.xml"/> |
|
| 7 | 9 |
</sqlMapConfig> |
--- src/main/resources/egovframework/sqlmap/let/cert/MjonCertPhone_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/cert/MjonCertPhone_SQL_mysql.xml
... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 |
MBTLNUM AS mbtlnum |
| 15 | 15 |
, '-' AS certMemo |
| 16 | 16 |
, '대표번호' AS certAlias |
| 17 |
+ , 'BASIC' AS phoneType |
|
| 17 | 18 |
, '-' AS frstRegistPnttm |
| 18 | 19 |
FROM |
| 19 | 20 |
lettngnrlmber |
... | ... | @@ -23,11 +24,85 @@ |
| 23 | 24 |
MBTLNUM AS mbtlnum |
| 24 | 25 |
, CERT_MEMO AS certMemo |
| 25 | 26 |
, CERT_ALIAS AS certAlias |
| 27 |
+ , 'ADDITIONAL' AS phoneType |
|
| 26 | 28 |
, FRST_REGIST_PNTTM AS frstRegistPnttm |
| 27 | 29 |
FROM |
| 28 | 30 |
lettngnrlmber_cert_phone |
| 29 | 31 |
WHERE MBER_ID = #userId# |
| 30 | 32 |
AND CERT_USE_YN = 'Y' |
| 33 |
+ </select> |
|
| 34 |
+ |
|
| 35 |
+ <select id="mberCertPhoneVO.selectEligibleCertPhoneList" parameterClass="String" resultClass="mberCertPhoneVO"> |
|
| 36 |
+ SELECT DISTINCT |
|
| 37 |
+ REPLACE(A.PHONE_NUMBER, '-', '') AS mbtlnum, |
|
| 38 |
+ '승인 발신번호' AS certAlias, |
|
| 39 |
+ 'CANDIDATE' AS phoneType |
|
| 40 |
+ FROM MJ_PHONE_MEMBER A |
|
| 41 |
+ WHERE A.USER_ID = #userId# |
|
| 42 |
+ AND A.PHM_TYPE = '01' |
|
| 43 |
+ AND A.AUTH_YN = 'Y' |
|
| 44 |
+ AND A.DEL_FLAG = 'N' |
|
| 45 |
+ AND REPLACE(A.PHONE_NUMBER, '-', '') LIKE '01%' |
|
| 46 |
+ AND REPLACE(A.PHONE_NUMBER, '-', '') NOT REGEXP '[^0-9]' |
|
| 47 |
+ AND CHAR_LENGTH(REPLACE(A.PHONE_NUMBER, '-', '')) IN (10, 11) |
|
| 48 |
+ AND NOT EXISTS ( |
|
| 49 |
+ SELECT 1 FROM LETTNGNRLMBER M |
|
| 50 |
+ WHERE M.MBER_ID = A.USER_ID |
|
| 51 |
+ AND REPLACE(M.MBTLNUM, '-', '') = REPLACE(A.PHONE_NUMBER, '-', '') |
|
| 52 |
+ ) |
|
| 53 |
+ AND NOT EXISTS ( |
|
| 54 |
+ SELECT 1 FROM LETTNGNRLMBER_CERT_PHONE P |
|
| 55 |
+ WHERE P.MBER_ID = A.USER_ID |
|
| 56 |
+ AND P.CERT_USE_YN = 'Y' |
|
| 57 |
+ AND REPLACE(P.MBTLNUM, '-', '') = REPLACE(A.PHONE_NUMBER, '-', '') |
|
| 58 |
+ ) |
|
| 59 |
+ ORDER BY mbtlnum |
|
| 60 |
+ </select> |
|
| 61 |
+ |
|
| 62 |
+ <select id="mberCertPhoneVO.countRegisteredAuthPhone" parameterClass="mberCertPhoneVO" resultClass="int"> |
|
| 63 |
+ SELECT COUNT(*) |
|
| 64 |
+ FROM ( |
|
| 65 |
+ SELECT REPLACE(MBTLNUM, '-', '') AS PHONE_NO |
|
| 66 |
+ FROM LETTNGNRLMBER |
|
| 67 |
+ WHERE MBER_ID = #mberId# |
|
| 68 |
+ UNION ALL |
|
| 69 |
+ SELECT REPLACE(MBTLNUM, '-', '') AS PHONE_NO |
|
| 70 |
+ FROM LETTNGNRLMBER_CERT_PHONE |
|
| 71 |
+ WHERE MBER_ID = #mberId# |
|
| 72 |
+ AND CERT_USE_YN = 'Y' |
|
| 73 |
+ ) P |
|
| 74 |
+ WHERE P.PHONE_NO = REPLACE(#mbtlnum#, '-', '') |
|
| 75 |
+ </select> |
|
| 76 |
+ |
|
| 77 |
+ <select id="mberCertPhoneVO.countEligibleCertPhone" parameterClass="mberCertPhoneVO" resultClass="int"> |
|
| 78 |
+ SELECT COUNT(*) |
|
| 79 |
+ FROM MJ_PHONE_MEMBER A |
|
| 80 |
+ WHERE A.USER_ID = #mberId# |
|
| 81 |
+ AND A.PHM_TYPE = '01' |
|
| 82 |
+ AND A.AUTH_YN = 'Y' |
|
| 83 |
+ AND A.DEL_FLAG = 'N' |
|
| 84 |
+ AND REPLACE(A.PHONE_NUMBER, '-', '') = REPLACE(#mbtlnum#, '-', '') |
|
| 85 |
+ AND REPLACE(A.PHONE_NUMBER, '-', '') LIKE '01%' |
|
| 86 |
+ AND REPLACE(A.PHONE_NUMBER, '-', '') NOT REGEXP '[^0-9]' |
|
| 87 |
+ AND CHAR_LENGTH(REPLACE(A.PHONE_NUMBER, '-', '')) IN (10, 11) |
|
| 88 |
+ AND NOT EXISTS ( |
|
| 89 |
+ SELECT 1 FROM LETTNGNRLMBER M |
|
| 90 |
+ WHERE M.MBER_ID = A.USER_ID |
|
| 91 |
+ AND REPLACE(M.MBTLNUM, '-', '') = REPLACE(A.PHONE_NUMBER, '-', '') |
|
| 92 |
+ ) |
|
| 93 |
+ AND NOT EXISTS ( |
|
| 94 |
+ SELECT 1 FROM LETTNGNRLMBER_CERT_PHONE P |
|
| 95 |
+ WHERE P.MBER_ID = A.USER_ID |
|
| 96 |
+ AND P.CERT_USE_YN = 'Y' |
|
| 97 |
+ AND REPLACE(P.MBTLNUM, '-', '') = REPLACE(A.PHONE_NUMBER, '-', '') |
|
| 98 |
+ ) |
|
| 99 |
+ </select> |
|
| 100 |
+ |
|
| 101 |
+ <select id="mberCertPhoneVO.countAdditionalCertPhone" parameterClass="String" resultClass="int"> |
|
| 102 |
+ SELECT COUNT(*) |
|
| 103 |
+ FROM LETTNGNRLMBER_CERT_PHONE |
|
| 104 |
+ WHERE MBER_ID = #userId# |
|
| 105 |
+ AND CERT_USE_YN = 'Y' |
|
| 31 | 106 |
</select> |
| 32 | 107 |
|
| 33 | 108 |
|
... | ... | @@ -73,6 +148,7 @@ |
| 73 | 148 |
, MBTLNUM |
| 74 | 149 |
, CERT_ALIAS |
| 75 | 150 |
, CERT_MEMO |
| 151 |
+ , CERT_USE_YN |
|
| 76 | 152 |
, FRST_REGIST_PNTTM |
| 77 | 153 |
, FRST_REGISTER_ID |
| 78 | 154 |
) |
... | ... | @@ -82,9 +158,15 @@ |
| 82 | 158 |
, #mbtlnum# |
| 83 | 159 |
, #certAlias# |
| 84 | 160 |
, #certMemo# |
| 161 |
+ , 'Y' |
|
| 85 | 162 |
, now() |
| 86 | 163 |
, #frstRegisterId# |
| 87 | 164 |
) |
| 165 |
+ ON DUPLICATE KEY UPDATE |
|
| 166 |
+ CERT_ALIAS = VALUES(CERT_ALIAS), |
|
| 167 |
+ CERT_MEMO = VALUES(CERT_MEMO), |
|
| 168 |
+ CERT_USE_YN = 'Y', |
|
| 169 |
+ LAST_UPDUSR_ID = VALUES(FRST_REGISTER_ID) |
|
| 88 | 170 |
</insert> |
| 89 | 171 |
|
| 90 | 172 |
|
... | ... | @@ -163,7 +245,13 @@ |
| 163 | 245 |
); |
| 164 | 246 |
|
| 165 | 247 |
</insert> |
| 248 |
+ |
|
| 249 |
+ <update id="certPhoneDAO.resetMemberPhone" parameterClass="mberCertPhoneVO"> |
|
| 250 |
+ UPDATE LETTNGNRLMBER |
|
| 251 |
+ SET MBTLNUM = #mbtlnum# |
|
| 252 |
+ WHERE MBER_ID = #mberId# |
|
| 253 |
+ </update> |
|
| 166 | 254 |
|
| 167 | 255 |
|
| 168 | 256 |
|
| 169 |
-</sqlMap>(No newline at end of file) |
|
| 257 |
+</sqlMap> |
--- src/main/resources/egovframework/sqlmap/let/mjo/apikey/ApiKeyMng_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/apikey/ApiKeyMng_SQL_Mysql.xml
... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 |
<sqlMap namespace="ApiKeyMng"> |
| 5 | 5 |
|
| 6 | 6 |
<typeAlias alias="apiKeyVO" type = "itn.let.mjo.apikey.service.ApiKeyVO"/> |
| 7 |
+ <typeAlias alias="mjonMsgSentVO" type="itn.let.mjo.msgsent.service.MjonMsgSentVO"/> |
|
| 7 | 8 |
|
| 8 | 9 |
<select id="ApiKeyMngDAO.selectMberApiKeyList" parameterClass="apiKeyVO" resultClass="apiKeyVO" remapResults="true"> |
| 9 | 10 |
SELECT |
... | ... | @@ -211,5 +212,129 @@ |
| 211 | 212 |
and b.USE_YN != 'N' |
| 212 | 213 |
LIMIT 1 |
| 213 | 214 |
|
| 214 |
- </select> |
|
| 215 |
+ </select> |
|
| 216 |
+ |
|
| 217 |
+ |
|
| 218 |
+ <select id="ApiKeyMngDAO.selectApiMsgSentList" parameterClass="mjonMsgSentVO" resultClass="mjonMsgSentVO"> |
|
| 219 |
+ /* MjonMsgSentDAO.selectApiMsgSentList */ |
|
| 220 |
+ SELECT |
|
| 221 |
+ B.USER_ID as userId |
|
| 222 |
+ , B.MSG_GROUP_ID as msgGroupId |
|
| 223 |
+ , B.MSG_GROUP_CNT as msgGroupCnt |
|
| 224 |
+ , B.SMS_TXT as smsTxt |
|
| 225 |
+ , B.SUBJECT as subject |
|
| 226 |
+ , B.SUBJECT_CHK_YN as subjectChkYn |
|
| 227 |
+ , B.FILE_CNT as fileCnt |
|
| 228 |
+ , CAST(DATE_FORMAT(B.REQ_DATE, '%Y-%m-%d %H:%i') AS CHAR) AS reqDate |
|
| 229 |
+ , ( |
|
| 230 |
+ CASE |
|
| 231 |
+ WHEN B.DELAY_YN = 'Y' AND B.DELAY_COMPLETE_YN = 'N' THEN DATE_ADD(B.REQ_DATE, INTERVAL -30 MINUTE) |
|
| 232 |
+ ELSE B.REQ_DATE |
|
| 233 |
+ END |
|
| 234 |
+ ) AS delayOrgTime |
|
| 235 |
+ , B.MSG_TYPE as msgType |
|
| 236 |
+ , B.DELAY_YN as delayYn |
|
| 237 |
+ , B.DELAY_COMPLETE_YN as delayCompleteYn |
|
| 238 |
+ , B.API_APRV_YN as apiAprvYn |
|
| 239 |
+ , CAST(DATE_FORMAT(B.API_APRV_DT, '%Y-%m-%d %H:%i') AS CHAR) AS apiAprvDt |
|
| 240 |
+ FROM MJ_MSG_DATA A |
|
| 241 |
+ JOIN MJ_MSG_GROUP_DATA B ON A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 242 |
+ WHERE |
|
| 243 |
+ (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL) |
|
| 244 |
+ AND A.DEL_FLAG = 'N' |
|
| 245 |
+ AND B.USER_ID = #userId# |
|
| 246 |
+ <isEmpty property="msgType"> |
|
| 247 |
+ AND B.MSG_TYPE in ('4', '6', '8')
|
|
| 248 |
+ </isEmpty> |
|
| 249 |
+ <isNotEmpty property="msgType"> |
|
| 250 |
+ <isEqual property="msgType" compareValue="M" > |
|
| 251 |
+ AND B.MSG_TYPE in ('4', '6')
|
|
| 252 |
+ </isEqual> |
|
| 253 |
+ <isEqual property="msgType" compareValue="K" > |
|
| 254 |
+ AND B.MSG_TYPE in ('8')
|
|
| 255 |
+ </isEqual> |
|
| 256 |
+ </isNotEmpty> |
|
| 257 |
+ <isNotEmpty property="apiAprvYn"> |
|
| 258 |
+ <isEqual property="apiAprvYn" compareValue="N" > |
|
| 259 |
+ AND (B.API_APRV_YN = 'N' or B.API_APRV_YN is null) |
|
| 260 |
+ </isEqual> |
|
| 261 |
+ <isEqual property="apiAprvYn" compareValue="Y" > |
|
| 262 |
+ AND B.API_APRV_YN = 'Y' |
|
| 263 |
+ </isEqual> |
|
| 264 |
+ </isNotEmpty> |
|
| 265 |
+ AND (B.REQ_DATE >= DATE_SUB(NOW(), INTERVAL 1 YEAR) AND B.REQ_DATE >= '2025-08-21') /* todo 임시날짜 */ |
|
| 266 |
+ AND B.SEND_KIND = 'A' |
|
| 267 |
+ AND |
|
| 268 |
+ ( |
|
| 269 |
+ (A.AGENT_CODE = '01' AND A.RSLT_CODE = '100' AND A.RSLT_CODE2 = '0') |
|
| 270 |
+ OR (A.AGENT_CODE = '02' AND A.RSLT_CODE = '0') |
|
| 271 |
+ OR (A.AGENT_CODE = '03' AND A.RSLT_CODE IN ('100', '101', '110', '800'))
|
|
| 272 |
+ OR (A.AGENT_CODE = '04' AND A.RSLT_CODE IN ('4100', '6600', '7000'))
|
|
| 273 |
+ OR (A.AGENT_CODE = '05' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 274 |
+ OR (A.AGENT_CODE = '07' AND A.RSLT_CODE IN ('6', '1000'))
|
|
| 275 |
+ OR (A.AGENT_CODE = '08' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 276 |
+ OR (A.AGENT_CODE = '09' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 277 |
+ ) |
|
| 278 |
+ GROUP BY B.MSG_GROUP_ID |
|
| 279 |
+ ORDER BY 1=1, B.REQ_DATE desc |
|
| 280 |
+ LIMIT #recordCountPerPage# OFFSET #firstIndex# |
|
| 281 |
+ </select> |
|
| 282 |
+ |
|
| 283 |
+ <select id="ApiKeyMngDAO.selectCountApiMsgSentList" parameterClass="mjonMsgSentVO" resultClass="int"> |
|
| 284 |
+ /* MjonMsgSentDAO.countAllApiMsgSentList */ |
|
| 285 |
+ select |
|
| 286 |
+ COUNT(DISTINCT B.MSG_GROUP_ID) as totalGroupCount |
|
| 287 |
+ from |
|
| 288 |
+ MJ_MSG_DATA A |
|
| 289 |
+ join MJ_MSG_GROUP_DATA B on |
|
| 290 |
+ A.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 291 |
+ WHERE |
|
| 292 |
+ (B.DEL_FLAG = 'N' OR B.DEL_FLAG IS NULL) |
|
| 293 |
+ AND A.DEL_FLAG = 'N' |
|
| 294 |
+ AND B.USER_ID = #userId# |
|
| 295 |
+ <isEmpty property="msgType"> |
|
| 296 |
+ AND B.MSG_TYPE in ('4', '6', '8')
|
|
| 297 |
+ </isEmpty> |
|
| 298 |
+ <isNotEmpty property="msgType"> |
|
| 299 |
+ <isEqual property="msgType" compareValue="M" > |
|
| 300 |
+ AND B.MSG_TYPE in ('4', '6')
|
|
| 301 |
+ </isEqual> |
|
| 302 |
+ <isEqual property="msgType" compareValue="K" > |
|
| 303 |
+ AND B.MSG_TYPE in ('8')
|
|
| 304 |
+ </isEqual> |
|
| 305 |
+ </isNotEmpty> |
|
| 306 |
+ <isNotEmpty property="apiAprvYn"> |
|
| 307 |
+ <isEqual property="apiAprvYn" compareValue="N" > |
|
| 308 |
+ AND (B.API_APRV_YN = 'N' or B.API_APRV_YN is null) |
|
| 309 |
+ </isEqual> |
|
| 310 |
+ <isEqual property="apiAprvYn" compareValue="Y" > |
|
| 311 |
+ AND B.API_APRV_YN = 'Y' |
|
| 312 |
+ </isEqual> |
|
| 313 |
+ </isNotEmpty> |
|
| 314 |
+ AND (B.REQ_DATE >= DATE_SUB(NOW(), INTERVAL 1 YEAR) AND B.REQ_DATE >= '2025-08-21') /* todo 임시날짜 */ |
|
| 315 |
+ AND B.SEND_KIND = 'A' |
|
| 316 |
+ AND |
|
| 317 |
+ ( |
|
| 318 |
+ (A.AGENT_CODE = '01' AND A.RSLT_CODE = '100' AND A.RSLT_CODE2 = '0') |
|
| 319 |
+ OR (A.AGENT_CODE = '02' AND A.RSLT_CODE = '0') |
|
| 320 |
+ OR (A.AGENT_CODE = '03' AND A.RSLT_CODE IN ('100', '101', '110', '800'))
|
|
| 321 |
+ OR (A.AGENT_CODE = '04' AND A.RSLT_CODE IN ('4100', '6600', '7000'))
|
|
| 322 |
+ OR (A.AGENT_CODE = '05' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 323 |
+ OR (A.AGENT_CODE = '07' AND A.RSLT_CODE IN ('6', '1000'))
|
|
| 324 |
+ OR (A.AGENT_CODE = '08' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 325 |
+ OR (A.AGENT_CODE = '09' AND A.RSLT_CODE IN ('1000', '1001'))
|
|
| 326 |
+ ) |
|
| 327 |
+ </select> |
|
| 328 |
+ |
|
| 329 |
+ <update id="ApiKeyMngDAO.updateApproveApiMsg" parameterClass="mjonMsgSentVO"> |
|
| 330 |
+ UPDATE MJ_MSG_GROUP_DATA |
|
| 331 |
+ SET API_APRV_DT = now() |
|
| 332 |
+ , API_APRV_YN = #apiAprvYn# |
|
| 333 |
+ WHERE |
|
| 334 |
+ USER_ID = #userId# |
|
| 335 |
+ <iterate prepend="AND MSG_GROUP_ID IN" open="(" close=")" conjunction="," property="msgGroupIdList">
|
|
| 336 |
+ #msgGroupIdList[]# |
|
| 337 |
+ </iterate> |
|
| 338 |
+ </update> |
|
| 339 |
+ |
|
| 215 | 340 |
</sqlMap> |
--- src/main/resources/egovframework/sqlmap/let/mjo/block/Block_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/block/Block_SQL_Mysql.xml
... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 |
<sqlMap namespace="Block"> |
| 4 | 4 |
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/> |
| 5 | 5 |
<typeAlias alias="blockVO" type="itn.let.mjo.block.service.MjonBlockVO"/> |
| 6 |
+ <typeAlias alias="geoIpBlockVO" type="itn.let.mjo.block.service.GeoIpBlockLogVO"/> |
|
| 6 | 7 |
|
| 7 | 8 |
<!-- 차단 목록 조회 --> |
| 8 | 9 |
<select id="MjonBlockDAO.selectBlockList" parameterClass="blockVO" resultClass="blockVO"> |
... | ... | @@ -225,6 +226,27 @@ |
| 225 | 226 |
<!-- 주소록 삭제 --> |
| 226 | 227 |
<delete id="MjonBlockDAO.deleteBlockAddr" parameterClass="blockVO"> |
| 227 | 228 |
DELETE FROM MJ_ADDR WHERE ADDR_PHONE_NO IN (SELECT PHONE FROM MJ_BLOCK WHERE BLOCK_ID = #blockId#) |
| 228 |
- </delete> |
|
| 229 |
+ </delete> |
|
| 230 |
+ |
|
| 231 |
+ <!-- 해외접근 IP 차단 로그 등록 --> |
|
| 232 |
+ <insert id="MjonBlockDAO.insertGeoIpBlockLog" parameterClass="geoIpBlockVO"> |
|
| 233 |
+ INSERT INTO MJ_ACCESS_BLOCK_LOG ( |
|
| 234 |
+ ACCESS_IP, |
|
| 235 |
+ REQUEST_URI, |
|
| 236 |
+ COUNTRY_CODE, |
|
| 237 |
+ COUNTRY_NAME, |
|
| 238 |
+ BLOCK_YN |
|
| 239 |
+ ) VALUES ( |
|
| 240 |
+ #accessIp#, |
|
| 241 |
+ #requestUri#, |
|
| 242 |
+ #countryCode#, |
|
| 243 |
+ #countryName#, |
|
| 244 |
+ #blockYn# |
|
| 245 |
+ ) |
|
| 246 |
+ </insert> |
|
| 247 |
+ |
|
| 248 |
+ <select id="MjonBlockDAO.selectGeoIpBlockYn" resultClass="String"> |
|
| 249 |
+ select ACCESS_IP_BLOCK_YN from SITEMANAGER |
|
| 250 |
+ </select> |
|
| 229 | 251 |
|
| 230 | 252 |
</sqlMap> |
--- src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/mjo/kakao/KakaoSent_SQL_Mysql.xml
... | ... | @@ -1453,12 +1453,12 @@ |
| 1453 | 1453 |
AND B.SMS_TXT like CONCAT('%', #searchKeyword#, '%')
|
| 1454 | 1454 |
</isEqual> |
| 1455 | 1455 |
<isEqual property="searchCondition" compareValue="4" > |
| 1456 |
- AND EXISTS ( |
|
| 1457 |
- SELECT 1 FROM MJ_MSG_DATA MD |
|
| 1458 |
- WHERE MD.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 1459 |
- AND MD.DEL_FLAG = 'N' |
|
| 1460 |
- AND REPLACE(MD.CALL_TO, '-', '') LIKE CONCAT('%', REPLACE(#searchKeyword#, '-', ''), '%')
|
|
| 1461 |
- ) |
|
| 1456 |
+ AND EXISTS ( |
|
| 1457 |
+ SELECT 1 FROM MJ_MSG_DATA MD |
|
| 1458 |
+ WHERE MD.MSG_GROUP_ID = B.MSG_GROUP_ID |
|
| 1459 |
+ AND MD.DEL_FLAG = 'N' |
|
| 1460 |
+ AND REPLACE(MD.CALL_TO, '-', '') LIKE CONCAT('%', REPLACE(#searchKeyword#, '-', ''), '%')
|
|
| 1461 |
+ ) |
|
| 1462 | 1462 |
</isEqual> |
| 1463 | 1463 |
</isNotEmpty> |
| 1464 | 1464 |
GROUP BY B.MSG_GROUP_ID |
--- src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/msg/MjonMsgData_SQL_mysql.xml
... | ... | @@ -21,6 +21,8 @@ |
| 21 | 21 |
<typeAlias alias="mjonSwearWordVO" type="itn.let.mjo.msg.service.MjonSwearWordVO"/> |
| 22 | 22 |
<typeAlias alias="mjonMsgResvVO" type="itn.let.mjo.reservmsg.service.MjonResvMsgVO"/> |
| 23 | 23 |
<typeAlias alias="mjonMsgStatVO" type="itn.let.mjo.msg.service.MjonMsgStatVO"/> |
| 24 |
+ <typeAlias alias="sendNumberStatusVO" type="itn.let.mjo.msg.service.SendNumberStatusVO"/> |
|
| 25 |
+ <typeAlias alias="mjEmployeeCertVO" type="itn.let.mjo.msg.service.MjEmployeeCertVO"/> |
|
| 24 | 26 |
<typeAlias alias="mjonMsgStatVO" type="itn.let.mjo.msg.service.MjonMsgStatVO"/> |
| 25 | 27 |
|
| 26 | 28 |
|
... | ... | @@ -1622,6 +1624,7 @@ |
| 1622 | 1624 |
, LM.MANAGER_NM AS managerNm |
| 1623 | 1625 |
, (SELECT FN_GETNAMEBYID(APH.ADM_ID) FROM MJ_ADM_PROC_HSTRY APH WHERE A.PHM_ID = APH.PHM_ID ORDER BY APH.ADM_PROC_HSTRY_SEQ DESC LIMIT 1 ) AS admNm |
| 1624 | 1626 |
, A.OWNER_NAME AS ownerName |
| 1627 |
+ , A.PHM_LINE_TYPE AS phmLineType |
|
| 1625 | 1628 |
FROM |
| 1626 | 1629 |
MJ_PHONE_MEMBER A |
| 1627 | 1630 |
INNER JOIN LETTNGNRLMBER LM |
... | ... | @@ -1733,6 +1736,139 @@ |
| 1733 | 1736 |
</isNotEmpty> |
| 1734 | 1737 |
LIMIT #recordCountPerPage# OFFSET #firstIndex# |
| 1735 | 1738 |
</select> |
| 1739 |
+ |
|
| 1740 |
+ <insert id="mjonMsgDAO.insertEmployeeCertBase" parameterClass="mjEmployeeCertVO"> |
|
| 1741 |
+ /* mjonMsgDAO.insertEmployeeCertBase */ |
|
| 1742 |
+ INSERT IGNORE INTO MJ_EMPLOYEE_CERT ( |
|
| 1743 |
+ MBER_ID |
|
| 1744 |
+ , CERT_CNT |
|
| 1745 |
+ , LAST_HSTRY_SEQ |
|
| 1746 |
+ , AUTH_HSTRY_SEQ |
|
| 1747 |
+ , LAST_AUTH_PNTTM |
|
| 1748 |
+ , FRST_REGIST_PNTTM |
|
| 1749 |
+ , FRST_REGISTER_ID |
|
| 1750 |
+ , LAST_UPDT_PNTTM |
|
| 1751 |
+ , LAST_UPDUSR_ID |
|
| 1752 |
+ ) VALUES ( |
|
| 1753 |
+ #mberId# |
|
| 1754 |
+ , NULL |
|
| 1755 |
+ , NULL |
|
| 1756 |
+ , NULL |
|
| 1757 |
+ , NULL |
|
| 1758 |
+ , NOW() |
|
| 1759 |
+ , #frstRegisterId# |
|
| 1760 |
+ , NOW() |
|
| 1761 |
+ , #lastUpdusrId# |
|
| 1762 |
+ ) |
|
| 1763 |
+ </insert> |
|
| 1764 |
+ |
|
| 1765 |
+ <select id="mjonMsgDAO.selectEmployeeCertForUpdate" parameterClass="mjEmployeeCertVO" resultClass="mjEmployeeCertVO"> |
|
| 1766 |
+ /* mjonMsgDAO.selectEmployeeCertForUpdate */ |
|
| 1767 |
+ SELECT |
|
| 1768 |
+ EC.MBER_ID AS mberId |
|
| 1769 |
+ , EC.CERT_CNT AS certCnt |
|
| 1770 |
+ , EC.LAST_HSTRY_SEQ AS lastHstrySeq |
|
| 1771 |
+ , EC.AUTH_HSTRY_SEQ AS authHstrySeq |
|
| 1772 |
+ , EH.AUTH_YN AS authYn |
|
| 1773 |
+ FROM MJ_EMPLOYEE_CERT EC |
|
| 1774 |
+ LEFT JOIN MJ_EMPLOYEE_CERT_HSTRY EH |
|
| 1775 |
+ ON EC.MBER_ID = EH.MBER_ID |
|
| 1776 |
+ AND EC.LAST_HSTRY_SEQ = EH.EMPLOYEE_CERT_HSTRY_SEQ |
|
| 1777 |
+ WHERE EC.MBER_ID = #mberId# |
|
| 1778 |
+ FOR UPDATE |
|
| 1779 |
+ </select> |
|
| 1780 |
+ |
|
| 1781 |
+ <insert id="mjonMsgDAO.insertEmployeeCertHstry" parameterClass="mjEmployeeCertVO"> |
|
| 1782 |
+ /* mjonMsgDAO.insertEmployeeCertHstry */ |
|
| 1783 |
+ INSERT INTO MJ_EMPLOYEE_CERT_HSTRY ( |
|
| 1784 |
+ EMPLOYEE_CERT_HSTRY_SEQ |
|
| 1785 |
+ , MBER_ID |
|
| 1786 |
+ , APPLY_CNT |
|
| 1787 |
+ , AUTH_YN |
|
| 1788 |
+ , REJECT_CODE |
|
| 1789 |
+ , REJECT_REASON |
|
| 1790 |
+ , ATCH_FILE_ID |
|
| 1791 |
+ , AGREE_YN |
|
| 1792 |
+ , AGREE_PNTTM |
|
| 1793 |
+ , FRST_REGIST_PNTTM |
|
| 1794 |
+ , FRST_REGISTER_ID |
|
| 1795 |
+ , LAST_UPDT_PNTTM |
|
| 1796 |
+ , LAST_UPDUSR_ID |
|
| 1797 |
+ ) VALUES ( |
|
| 1798 |
+ #employeeCertHstrySeq# |
|
| 1799 |
+ , #mberId# |
|
| 1800 |
+ , #applyCnt# |
|
| 1801 |
+ , 'N' |
|
| 1802 |
+ , NULL |
|
| 1803 |
+ , NULL |
|
| 1804 |
+ , #atchFileId# |
|
| 1805 |
+ , 'Y' |
|
| 1806 |
+ , NOW() |
|
| 1807 |
+ , NOW() |
|
| 1808 |
+ , #frstRegisterId# |
|
| 1809 |
+ , NOW() |
|
| 1810 |
+ , #lastUpdusrId# |
|
| 1811 |
+ ) |
|
| 1812 |
+ </insert> |
|
| 1813 |
+ |
|
| 1814 |
+ <update id="mjonMsgDAO.updateEmployeeCertLastHstry" parameterClass="mjEmployeeCertVO"> |
|
| 1815 |
+ /* mjonMsgDAO.updateEmployeeCertLastHstry */ |
|
| 1816 |
+ UPDATE MJ_EMPLOYEE_CERT |
|
| 1817 |
+ SET LAST_HSTRY_SEQ = #employeeCertHstrySeq# |
|
| 1818 |
+ , LAST_UPDT_PNTTM = NOW() |
|
| 1819 |
+ , LAST_UPDUSR_ID = #lastUpdusrId# |
|
| 1820 |
+ WHERE MBER_ID = #mberId# |
|
| 1821 |
+ </update> |
|
| 1822 |
+ |
|
| 1823 |
+ <select id="mjonMsgDAO.selectSendNumberStatus" parameterClass="sendNumberStatusVO" resultClass="sendNumberStatusVO"> |
|
| 1824 |
+ /* mjonMsgDAO.selectSendNumberStatus */ |
|
| 1825 |
+ SELECT |
|
| 1826 |
+ U.USER_ID AS userId |
|
| 1827 |
+ , LM.DEPT AS dept |
|
| 1828 |
+ , LM.NATIONALITY AS nationality |
|
| 1829 |
+ , IFNULL(P.MOBILE_CNT, 0) AS mobileCnt |
|
| 1830 |
+ , CASE |
|
| 1831 |
+ WHEN LOWER(IFNULL(LM.DEPT, 'p')) = 'c' THEN 4 |
|
| 1832 |
+ WHEN IFNULL(LM.NATIONALITY, '0') != '0' THEN 2 |
|
| 1833 |
+ ELSE 3 |
|
| 1834 |
+ END AS mobileMaxCnt |
|
| 1835 |
+ , IFNULL(P.WIRED_CNT, 0) AS wiredCnt |
|
| 1836 |
+ , CASE |
|
| 1837 |
+ WHEN LOWER(IFNULL(LM.DEPT, 'p')) = 'c' THEN EC.CERT_CNT |
|
| 1838 |
+ ELSE 5 |
|
| 1839 |
+ END AS wiredMaxCnt |
|
| 1840 |
+ , EC.CERT_CNT AS certCnt |
|
| 1841 |
+ , EH.EMPLOYEE_CERT_HSTRY_SEQ AS employeeCertHstrySeq |
|
| 1842 |
+ , EH.APPLY_CNT AS applyCnt |
|
| 1843 |
+ , EH.AUTH_YN AS authYn |
|
| 1844 |
+ , CD.CODE_NM AS authYnTxt |
|
| 1845 |
+ , EH.REJECT_CODE AS rejectCode |
|
| 1846 |
+ , EH.REJECT_REASON AS rejectReason |
|
| 1847 |
+ , DATE_FORMAT(EH.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i') AS applyPnttm |
|
| 1848 |
+ FROM (SELECT #userId# AS USER_ID) U |
|
| 1849 |
+ LEFT JOIN LETTNGNRLMBER LM |
|
| 1850 |
+ ON U.USER_ID = LM.MBER_ID |
|
| 1851 |
+ LEFT JOIN ( |
|
| 1852 |
+ SELECT |
|
| 1853 |
+ USER_ID |
|
| 1854 |
+ , SUM(CASE WHEN PHM_LINE_TYPE = 'M' THEN 1 ELSE 0 END) AS MOBILE_CNT |
|
| 1855 |
+ , SUM(CASE WHEN PHM_LINE_TYPE IN ('L', 'R') THEN 1 ELSE 0 END) AS WIRED_CNT
|
|
| 1856 |
+ FROM MJ_PHONE_MEMBER |
|
| 1857 |
+ WHERE USER_ID = #userId# |
|
| 1858 |
+ AND PHM_TYPE = '01' |
|
| 1859 |
+ AND DEL_FLAG = 'N' |
|
| 1860 |
+ GROUP BY USER_ID |
|
| 1861 |
+ ) P ON U.USER_ID = P.USER_ID |
|
| 1862 |
+ LEFT JOIN MJ_EMPLOYEE_CERT EC |
|
| 1863 |
+ ON U.USER_ID = EC.MBER_ID |
|
| 1864 |
+ LEFT JOIN MJ_EMPLOYEE_CERT_HSTRY EH |
|
| 1865 |
+ ON EC.MBER_ID = EH.MBER_ID |
|
| 1866 |
+ AND EC.LAST_HSTRY_SEQ = EH.EMPLOYEE_CERT_HSTRY_SEQ |
|
| 1867 |
+ LEFT JOIN LETTCCMMNDETAILCODE CD |
|
| 1868 |
+ ON CD.CODE_ID = 'ITN028' |
|
| 1869 |
+ AND CD.USE_AT = 'Y' |
|
| 1870 |
+ AND EH.AUTH_YN = CD.CODE |
|
| 1871 |
+ </select> |
|
| 1736 | 1872 |
|
| 1737 | 1873 |
<select id="mjonMsgDAO.selectSendPhoneNumberByPhmId" parameterClass="String" resultClass="mjPhoneMemberVO"> |
| 1738 | 1874 |
|
... | ... | @@ -1749,6 +1885,7 @@ |
| 1749 | 1885 |
PHM_VALUE AS phmValue, |
| 1750 | 1886 |
NAME_TYPE AS nameType, |
| 1751 | 1887 |
DEPT AS dept, |
| 1888 |
+ PHM_LINE_TYPE AS phmLineType, |
|
| 1752 | 1889 |
REJECT_REASON AS rejectReason |
| 1753 | 1890 |
FROM mj_phone_member a |
| 1754 | 1891 |
WHERE a.PHM_ID = #phmId# |
... | ... | @@ -1792,8 +1929,9 @@ |
| 1792 | 1929 |
A.PHM_DENY_TYPE AS phmDenyType , |
| 1793 | 1930 |
F.CODE_NM AS phmDenyTypeTxt, |
| 1794 | 1931 |
A.REJECT_REASON AS rejectReason, |
| 1795 |
- A.NAME_TYPE AS nameType, |
|
| 1796 |
- LM.DEPT AS dept, |
|
| 1932 |
+ A.NAME_TYPE AS nameType, |
|
| 1933 |
+ A.PHM_LINE_TYPE AS phmLineType, |
|
| 1934 |
+ LM.DEPT AS dept, |
|
| 1797 | 1935 |
LM.MBTLNUM AS mbtlNum |
| 1798 | 1936 |
FROM MJ_PHONE_MEMBER A |
| 1799 | 1937 |
INNER JOIN LETTNGNRLMBER LM |
... | ... | @@ -1856,6 +1994,7 @@ |
| 1856 | 1994 |
, OWNER_NAME |
| 1857 | 1995 |
, CI |
| 1858 | 1996 |
, BIRTH_DAY |
| 1997 |
+ , PHM_LINE_TYPE |
|
| 1859 | 1998 |
) |
| 1860 | 1999 |
VALUES |
| 1861 | 2000 |
( |
... | ... | @@ -1878,6 +2017,7 @@ |
| 1878 | 2017 |
, #ownerName# |
| 1879 | 2018 |
, #CI# |
| 1880 | 2019 |
, #birthDay# |
| 2020 |
+ , #phmLineType# |
|
| 1881 | 2021 |
) |
| 1882 | 2022 |
</insert> |
| 1883 | 2023 |
|
... | ... | @@ -2117,7 +2257,20 @@ |
| 2117 | 2257 |
</iterate> |
| 2118 | 2258 |
|
| 2119 | 2259 |
</delete> |
| 2120 |
- |
|
| 2260 |
+ |
|
| 2261 |
+ <select id="mjonMsgDAO.selectSendPhonNumAndPhmLineTypeList" parameterClass="String" resultClass="mberManageVO"> |
|
| 2262 |
+ /* mjonMsgDAO.selectSendPhonNumAndPhmLineTypeList */ |
|
| 2263 |
+ SELECT |
|
| 2264 |
+ PHONE_NUMBER AS phoneNumber |
|
| 2265 |
+ , PHM_LINE_TYPE AS phmLineType |
|
| 2266 |
+ FROM MJ_PHONE_MEMBER |
|
| 2267 |
+ WHERE USER_ID = #userId# |
|
| 2268 |
+ AND AUTH_YN = 'Y' |
|
| 2269 |
+ AND PHM_TYPE = '01' |
|
| 2270 |
+ ORDER BY BASE_YN DESC |
|
| 2271 |
+ |
|
| 2272 |
+ </select> |
|
| 2273 |
+ |
|
| 2121 | 2274 |
<select id="mjonMsgDAO.selectSendPhonNumList" parameterClass="String" resultClass="String"> |
| 2122 | 2275 |
|
| 2123 | 2276 |
/* mjonMsgDAO.selectSendPhonNumList */ |
... | ... | @@ -3819,7 +3972,7 @@ |
| 3819 | 3972 |
and b.MBTLNUM=a.RECEIVE |
| 3820 | 3973 |
and a.CHECK_NO=#checkNo# |
| 3821 | 3974 |
|
| 3822 |
- and DATE_FORMAT(a.FRST_SEND_PNTTM, '%Y%m%d%H%i%s') > DATE_FORMAT( date_add(now(),interval -300 second), '%Y%m%d%H%i%s') |
|
| 3975 |
+ and DATE_FORMAT(a.FRST_SEND_PNTTM, '%Y%m%d%H%i%s') > DATE_FORMAT( date_add(now(),interval -180 second), '%Y%m%d%H%i%s') |
|
| 3823 | 3976 |
|
| 3824 | 3977 |
ORDER BY a.FRST_SEND_PNTTM DESC, a.SEND_ID DESC |
| 3825 | 3978 |
LIMIT 1 |
+++ src/main/resources/egovframework/sqlmap/let/sym/log/access/UserAccessLog_SQL_Mysql.xml
... | ... | @@ -0,0 +1,37 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> | |
| 3 | + | |
| 4 | +<sqlMap namespace="userAccessLogVO"> | |
| 5 | + | |
| 6 | + <typeAlias alias="userAccessLogVO" type="itn.let.sym.log.access.UserAccessLogVO"/> | |
| 7 | + <resultMap id="userAccessLogResultMap" class="userAccessLogVO"> | |
| 8 | + <result property="logId" column="LOG_ID"/> | |
| 9 | + <result property="userId" column="USER_ID"/> | |
| 10 | + <result property="accessIp" column="ACCESS_IP"/> | |
| 11 | + <result property="uri" column="URI"/> | |
| 12 | + <result property="menuNm" column="MENU_NM"/> | |
| 13 | + <result property="result" column="RESULT"/> | |
| 14 | + <result property="frstRegistPnttm" column="FRST_REGIST_PNTTM"/> | |
| 15 | + </resultMap> | |
| 16 | + <insert id="userAccessLogDAO.insertUserAccessLog" parameterClass="userAccessLogVO"> | |
| 17 | + | |
| 18 | + INSERT INTO USER_ACCESS_LOG ( | |
| 19 | + LOG_ID, | |
| 20 | + USER_ID, | |
| 21 | + ACCESS_IP, | |
| 22 | + URI, | |
| 23 | + MENU_NM, | |
| 24 | + RESULT, | |
| 25 | + FRST_REGIST_PNTTM | |
| 26 | + ) VALUES ( | |
| 27 | + #logId#, | |
| 28 | + #userId#, | |
| 29 | + #accessIp#, | |
| 30 | + #uri#, | |
| 31 | + #menuNm#, | |
| 32 | + #result#, | |
| 33 | + CURRENT_TIMESTAMP | |
| 34 | + ) | |
| 35 | + | |
| 36 | + </insert> | |
| 37 | +</sqlMap>(No newline at end of file) |
--- src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/sym/mnu/mpm/EgovMenuManage_SQL_Mysql.xml
... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
-<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> |
|
| 2 |
+<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> |
|
| 3 | 3 |
|
| 4 | 4 |
<sqlMap namespace="MenuManage"> |
| 5 | 5 |
<typeAlias alias="egovMap" type="egovframework.rte.psl.dataaccess.util.EgovMap"/> |
... | ... | @@ -99,6 +99,21 @@ |
| 99 | 99 |
</isNotEmpty> |
| 100 | 100 |
LIMIT 1 |
| 101 | 101 |
</select> |
| 102 |
+ |
|
| 103 |
+ <!-- log 용 Menu 조회 --> |
|
| 104 |
+ <select id="menuManageDAO.selectAnonymousMenuNmByUrl" parameterClass="string" resultClass="string"> |
|
| 105 |
+ SELECT A.MENU_NM |
|
| 106 |
+ FROM LETTNMENUINFO A |
|
| 107 |
+ INNER JOIN LETTNMENUCREATDTLS B |
|
| 108 |
+ ON A.MENU_NO = B.MENU_NO |
|
| 109 |
+ INNER JOIN LETTNPROGRMLIST C |
|
| 110 |
+ ON A.PROGRM_FILE_NM = C.PROGRM_FILE_NM |
|
| 111 |
+ WHERE B.AUTHOR_CODE = 'ROLE_ANONYMOUS' |
|
| 112 |
+ AND C.URL = #value# |
|
| 113 |
+ AND A.MENU_NM IS NOT NULL |
|
| 114 |
+ AND TRIM(A.MENU_NM) != '' |
|
| 115 |
+ LIMIT 1 |
|
| 116 |
+ </select> |
|
| 102 | 117 |
|
| 103 | 118 |
<!-- 만족도 관리를 위한 조회 --> |
| 104 | 119 |
<select id="menuManageDAO.selectMenuManage_Satis" parameterClass="menuManageVO" resultClass="menuManageVO"> |
--- src/main/resources/egovframework/sqlmap/let/sym/site/EgovSiteManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/sym/site/EgovSiteManage_SQL_Mysql.xml
... | ... | @@ -50,8 +50,12 @@ |
| 50 | 50 |
C.CODE_DC AS sessionTimeCdText, |
| 51 | 51 |
D.CODE_DC AS sessionTimeUserCdTxt, |
| 52 | 52 |
A.SYS_MAINTENANCE AS sysMaintenance, |
| 53 |
- A.SYS_MAINTENANCE_IP AS sysMaintenanceIp |
|
| 54 |
- FROM SITEMANAGER A |
|
| 53 |
+ A.SYS_MAINTENANCE_IP AS sysMaintenanceIp, |
|
| 54 |
+ A.OPERATION_START_TIME AS operationStartTime, |
|
| 55 |
+ A.OPERATION_END_TIME AS operationEndTime, |
|
| 56 |
+ A.LUNCH_START_TIME AS lunchStartTime, |
|
| 57 |
+ A.LUNCH_END_TIME AS lunchEndTime |
|
| 58 |
+ FROM SITEMANAGER A |
|
| 55 | 59 |
LEFT JOIN LETTNFILEDETAIL B ON A.FAVICON_FILE_ID = B.ATCH_FILE_ID |
| 56 | 60 |
LEFT JOIN ( |
| 57 | 61 |
SELECT CODE_NM , CODE , CODE_DC |
... | ... | @@ -66,7 +70,7 @@ |
| 66 | 70 |
AND CODE_ID = 'ITN014' |
| 67 | 71 |
) |
| 68 | 72 |
D ON A.SESSION_TIME_USER_CD = D.CODE |
| 69 |
- |
|
| 73 |
+ LIMIT 1 |
|
| 70 | 74 |
</select> |
| 71 | 75 |
|
| 72 | 76 |
<insert id="siteManagerDAO.insertSiteManager" parameterClass="siteManagerVO" > |
+++ src/main/resources/egovframework/sqlmap/let/uat/uia/SecondAuthLog_SQL_Mysql.xml
... | ... | @@ -0,0 +1,213 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> | |
| 3 | + | |
| 4 | +<sqlMap namespace="secondAuthLogDAO"> | |
| 5 | + | |
| 6 | + <typeAlias alias="secondAuthLogVO" type="itn.let.uat.uia.service.SecondAuthLogVO"/> | |
| 7 | + | |
| 8 | + <resultMap id="secondAuthLogResult" class="secondAuthLogVO"> | |
| 9 | + <result property="logId" column="LOG_ID"/> | |
| 10 | + <result property="loginResult" column="LOGIN_RESULT"/> | |
| 11 | + <result property="authStep" column="AUTH_STEP"/> | |
| 12 | + <result property="tryLoginId" column="TRY_LOGIN_ID"/> | |
| 13 | + <result property="reason" column="REASON"/> | |
| 14 | + <result property="accessIp" column="ACCESS_IP"/> | |
| 15 | + <result property="userAgent" column="USER_AGENT"/> | |
| 16 | + <result property="msgId" column="MSG_ID"/> | |
| 17 | + <result property="resultCode" column="RESULT_CODE"/> | |
| 18 | + <result property="frstRegistPnttm" column="FRST_REGIST_PNTTM"/> | |
| 19 | + <result property="receive" column="RECEIVE"/> | |
| 20 | + </resultMap> | |
| 21 | + | |
| 22 | + <insert id="secondAuthLogDAO.insertSecondAuthLog" parameterClass="secondAuthLogVO"> | |
| 23 | + | |
| 24 | + INSERT INTO SECOND_AUTH_LOG (LOG_ID, | |
| 25 | + LOGIN_RESULT, | |
| 26 | + AUTH_STEP, | |
| 27 | + TRY_LOGIN_ID, | |
| 28 | + REASON, | |
| 29 | + ACCESS_IP, | |
| 30 | + USER_AGENT, | |
| 31 | + MSG_ID, | |
| 32 | + RESULT_CODE, | |
| 33 | + FRST_REGIST_PNTTM) | |
| 34 | + VALUES (#logId#, | |
| 35 | + #loginResult#, | |
| 36 | + #authStep#, | |
| 37 | + #tryLoginId#, | |
| 38 | + #reason#, | |
| 39 | + #accessIp#, | |
| 40 | + #userAgent#, | |
| 41 | + #msgId#, | |
| 42 | + #resultCode#, | |
| 43 | + CURRENT_TIMESTAMP) | |
| 44 | + | |
| 45 | + </insert> | |
| 46 | + | |
| 47 | + <delete id="secondAuthLogDAO.deleteSecondAuthLog" parameterClass="secondAuthLogVO"> | |
| 48 | + DELETE | |
| 49 | + FROM SECOND_AUTH_LOG | |
| 50 | + WHERE LOG_ID = #logId# | |
| 51 | + </delete> | |
| 52 | + | |
| 53 | + <select id="secondAuthLogDAO.selectSecondAuthLog" parameterClass="secondAuthLogVO" resultMap="secondAuthLogResult"> | |
| 54 | + SELECT LOG_ID, | |
| 55 | + LOGIN_RESULT, | |
| 56 | + AUTH_STEP, | |
| 57 | + TRY_LOGIN_ID, | |
| 58 | + REASON, | |
| 59 | + ACCESS_IP, | |
| 60 | + USER_AGENT, | |
| 61 | + MSG_ID, | |
| 62 | + RESULT_CODE, | |
| 63 | + FRST_REGIST_PNTTM | |
| 64 | + FROM SECOND_AUTH_LOG | |
| 65 | + WHERE LOG_ID = #logId# | |
| 66 | + | |
| 67 | + </select> | |
| 68 | + | |
| 69 | + <select id="secondAuthLogDAO.selectSecondAuthLogCnt" parameterClass="secondAuthLogVO" | |
| 70 | + resultClass="java.lang.Integer"> | |
| 71 | + | |
| 72 | + SELECT COUNT(*) | |
| 73 | + FROM SECOND_AUTH_LOG | |
| 74 | + WHERE 1 = 1 | |
| 75 | + | |
| 76 | + <isNotEmpty property="logId"> | |
| 77 | + AND LOG_ID = #logId# | |
| 78 | + </isNotEmpty> | |
| 79 | + | |
| 80 | + <isNotEmpty property="loginResult"> | |
| 81 | + AND LOGIN_RESULT = #loginResult# | |
| 82 | + </isNotEmpty> | |
| 83 | + | |
| 84 | + <isNotEmpty property="authStep"> | |
| 85 | + AND AUTH_STEP = #authStep# | |
| 86 | + </isNotEmpty> | |
| 87 | + | |
| 88 | + <isNotEmpty property="tryLoginId"> | |
| 89 | + AND TRY_LOGIN_ID = #tryLoginId# | |
| 90 | + </isNotEmpty> | |
| 91 | + | |
| 92 | + <isNotEmpty property="reason"> | |
| 93 | + AND REASON = #reason# | |
| 94 | + </isNotEmpty> | |
| 95 | + | |
| 96 | + <isNotEmpty property="accessIp"> | |
| 97 | + AND ACCESS_IP = #accessIp# | |
| 98 | + </isNotEmpty> | |
| 99 | + | |
| 100 | + <isNotEmpty property="msgId"> | |
| 101 | + AND MSG_ID = #msgId# | |
| 102 | + </isNotEmpty> | |
| 103 | + | |
| 104 | + <isNotEmpty property="resultCode"> | |
| 105 | + AND RESULT_CODE = #resultCode# | |
| 106 | + </isNotEmpty> | |
| 107 | + | |
| 108 | + </select> | |
| 109 | + | |
| 110 | + <select id="secondAuthLogDAO.selectSecondAuthLogList" parameterClass="secondAuthLogVO" resultMap="secondAuthLogResult"> | |
| 111 | + SELECT | |
| 112 | + A.LOG_ID, | |
| 113 | + CASE WHEN A.LOGIN_RESULT = 'SUCCESS' THEN '성공' | |
| 114 | + WHEN A.LOGIN_RESULT = 'FAIL' THEN '실패' | |
| 115 | + ELSE A.LOGIN_RESULT | |
| 116 | + END AS LOGIN_RESULT, | |
| 117 | + A.AUTH_STEP, | |
| 118 | + A.TRY_LOGIN_ID, | |
| 119 | + A.REASON, | |
| 120 | + A.ACCESS_IP, | |
| 121 | + A.USER_AGENT, | |
| 122 | + A.MSG_ID, | |
| 123 | + A.RESULT_CODE, | |
| 124 | + S.RECEIVE AS RECEIVE, | |
| 125 | + DATE_FORMAT(A.FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%s') AS FRST_REGIST_PNTTM | |
| 126 | + FROM SECOND_AUTH_LOG A | |
| 127 | + LEFT JOIN MJ_SYSTEM_SEND S | |
| 128 | + ON S.SEND_ID = A.MSG_ID | |
| 129 | + WHERE 1 = 1 | |
| 130 | + AND TRY_LOGIN_ID = #tryLoginId# | |
| 131 | + <isNotEmpty property="loginResult"> | |
| 132 | + AND A.LOGIN_RESULT = #loginResult# | |
| 133 | + </isNotEmpty> | |
| 134 | + <isNotEmpty property="searchStartDate"> | |
| 135 | + AND A.FRST_REGIST_PNTTM <![CDATA[ >= ]]> CONCAT(#searchStartDate#, ' 00:00:00') | |
| 136 | + </isNotEmpty> | |
| 137 | + <isNotEmpty property="searchEndDate"> | |
| 138 | + AND A.FRST_REGIST_PNTTM <![CDATA[ < ]]> DATE_ADD(CONCAT(#searchEndDate#, ' 00:00:00'), INTERVAL 1 DAY) | |
| 139 | + </isNotEmpty> | |
| 140 | + <isNotEmpty property="searchKeyword"> | |
| 141 | + <isEqual property="searchCondition" compareValue="accessIp"> | |
| 142 | + AND ACCESS_IP LIKE CONCAT('%', #searchKeyword#, '%') | |
| 143 | + </isEqual> | |
| 144 | + <isEqual property="searchCondition" compareValue="receive"> | |
| 145 | + AND REPLACE(S.RECEIVE, '-', '') | |
| 146 | + LIKE CONCAT('%', REPLACE(#searchKeyword#, '-', ''), '%') | |
| 147 | + </isEqual> | |
| 148 | + </isNotEmpty> | |
| 149 | + <isNotEmpty property="searchSortCnd"> | |
| 150 | + ORDER BY $searchSortCnd$ | |
| 151 | + <isNotEmpty property="searchSortOrd"> | |
| 152 | + $searchSortOrd$ | |
| 153 | + </isNotEmpty> | |
| 154 | + </isNotEmpty> | |
| 155 | + | |
| 156 | + LIMIT #firstIndex#, #recordCountPerPage# | |
| 157 | + </select> | |
| 158 | + | |
| 159 | + <select id="secondAuthLogDAO.selectFailureCountSinceReset" parameterClass="secondAuthLogVO" | |
| 160 | + resultClass="java.lang.Integer"> | |
| 161 | + SELECT COUNT(*) | |
| 162 | + FROM SECOND_AUTH_LOG A | |
| 163 | + WHERE A.TRY_LOGIN_ID = #tryLoginId# | |
| 164 | + AND A.AUTH_STEP = 'SECONDARY' | |
| 165 | + AND A.LOGIN_RESULT = 'FAIL' | |
| 166 | + AND A.REASON <![CDATA[ <> ]]> 'SECOND_AUTH_LOCK' | |
| 167 | + AND A.FRST_REGIST_PNTTM <![CDATA[ > ]]> DATE_SUB(NOW(), INTERVAL 10 MINUTE) | |
| 168 | + AND A.FRST_REGIST_PNTTM <![CDATA[ > ]]> | |
| 169 | + COALESCE( | |
| 170 | + ( | |
| 171 | + SELECT MAX(B.FRST_REGIST_PNTTM) | |
| 172 | + FROM SECOND_AUTH_LOG B | |
| 173 | + WHERE B.TRY_LOGIN_ID = #tryLoginId# | |
| 174 | + AND B.AUTH_STEP = 'SECONDARY' | |
| 175 | + AND (B.LOGIN_RESULT = 'SUCCESS' OR B.REASON = 'SECOND_AUTH_LOCK') | |
| 176 | + ), | |
| 177 | + '1970-01-01 00:00:00' | |
| 178 | + ) | |
| 179 | + </select> | |
| 180 | + | |
| 181 | + <select id="secondAuthLogDAO.selectActiveSecondAuthLockCount" parameterClass="secondAuthLogVO" | |
| 182 | + resultClass="java.lang.Integer"> | |
| 183 | + SELECT COUNT(*) | |
| 184 | + FROM SECOND_AUTH_LOG | |
| 185 | + WHERE TRY_LOGIN_ID = #tryLoginId# | |
| 186 | + AND AUTH_STEP = 'SECONDARY' | |
| 187 | + AND LOGIN_RESULT = 'FAIL' | |
| 188 | + AND REASON = 'SECOND_AUTH_LOCK' | |
| 189 | + AND FRST_REGIST_PNTTM <![CDATA[ > ]]> DATE_SUB(NOW(), INTERVAL 5 MINUTE) | |
| 190 | + </select> | |
| 191 | + | |
| 192 | + <select id="secondAuthLogDAO.selectSecondAuthLockRemainingSeconds" parameterClass="secondAuthLogVO" | |
| 193 | + resultClass="java.lang.Integer"> | |
| 194 | + SELECT COALESCE( | |
| 195 | + GREATEST( | |
| 196 | + 0, | |
| 197 | + TIMESTAMPDIFF( | |
| 198 | + SECOND, | |
| 199 | + NOW(), | |
| 200 | + DATE_ADD(MAX(FRST_REGIST_PNTTM), INTERVAL 5 MINUTE) | |
| 201 | + ) | |
| 202 | + ), | |
| 203 | + 0 | |
| 204 | + ) | |
| 205 | + FROM SECOND_AUTH_LOG | |
| 206 | + WHERE TRY_LOGIN_ID = #tryLoginId# | |
| 207 | + AND AUTH_STEP = 'SECONDARY' | |
| 208 | + AND LOGIN_RESULT = 'FAIL' | |
| 209 | + AND REASON = 'SECOND_AUTH_LOCK' | |
| 210 | + AND FRST_REGIST_PNTTM <![CDATA[ > ]]> DATE_SUB(NOW(), INTERVAL 5 MINUTE) | |
| 211 | + </select> | |
| 212 | + | |
| 213 | +</sqlMap> |
+++ src/main/resources/egovframework/sqlmap/let/uat/uia/SecondAuthMethodLog_SQL_Mysql.xml
... | ... | @@ -0,0 +1,85 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> | |
| 3 | + | |
| 4 | +<sqlMap namespace="secondAuthMethodLogDAO"> | |
| 5 | + | |
| 6 | + <typeAlias alias="secondAuthMethodLogVO" type="itn.let.uat.uia.service.SecondAuthMethodLogVO"/> | |
| 7 | + | |
| 8 | + <resultMap id="secondAuthMethodLogResult" class="secondAuthMethodLogVO"> | |
| 9 | + <result property="logId" column="LOG_ID"/> | |
| 10 | + <result property="mberId" column="MBER_ID"/> | |
| 11 | + <result property="actionType" column="ACTION_TYPE"/> | |
| 12 | + <result property="phoneNo" column="PHONE_NO"/> | |
| 13 | + <result property="verifyType" column="VERIFY_TYPE"/> | |
| 14 | + <result property="accessIp" column="ACCESS_IP"/> | |
| 15 | + <result property="frstRegistPnttm" column="FRST_REGIST_PNTTM"/> | |
| 16 | + </resultMap> | |
| 17 | + | |
| 18 | + <insert id="secondAuthMethodLogDAO.insertSecondAuthMethodLog" parameterClass="secondAuthMethodLogVO"> | |
| 19 | + INSERT INTO SECOND_AUTH_METHOD_LOG ( | |
| 20 | + MBER_ID, | |
| 21 | + ACTION_TYPE, | |
| 22 | + PHONE_NO, | |
| 23 | + VERIFY_TYPE, | |
| 24 | + ACCESS_IP, | |
| 25 | + FRST_REGIST_PNTTM | |
| 26 | + ) VALUES ( | |
| 27 | + #mberId#, | |
| 28 | + #actionType#, | |
| 29 | + #phoneNo#, | |
| 30 | + #verifyType#, | |
| 31 | + #accessIp#, | |
| 32 | + CURRENT_TIMESTAMP | |
| 33 | + ) | |
| 34 | + </insert> | |
| 35 | + | |
| 36 | + <select id="secondAuthMethodLogDAO.selectSecondAuthMethodLogCnt" | |
| 37 | + parameterClass="secondAuthMethodLogVO" | |
| 38 | + resultClass="java.lang.Integer"> | |
| 39 | + SELECT COUNT(*) | |
| 40 | + FROM SECOND_AUTH_METHOD_LOG | |
| 41 | + WHERE MBER_ID = #mberId# | |
| 42 | + AND FRST_REGIST_PNTTM <![CDATA[ >= ]]> DATE_SUB(NOW(), INTERVAL 1 YEAR) | |
| 43 | + <isNotEmpty property="actionType"> | |
| 44 | + AND ACTION_TYPE = #actionType# | |
| 45 | + </isNotEmpty> | |
| 46 | + <isNotEmpty property="searchStartDate"> | |
| 47 | + AND FRST_REGIST_PNTTM <![CDATA[ >= ]]> CONCAT(#searchStartDate#, ' 00:00:00') | |
| 48 | + </isNotEmpty> | |
| 49 | + <isNotEmpty property="searchEndDate"> | |
| 50 | + AND FRST_REGIST_PNTTM <![CDATA[ < ]]> DATE_ADD(CONCAT(#searchEndDate#, ' 00:00:00'), INTERVAL 1 DAY) | |
| 51 | + </isNotEmpty> | |
| 52 | + </select> | |
| 53 | + | |
| 54 | + <select id="secondAuthMethodLogDAO.selectSecondAuthMethodLogList" | |
| 55 | + parameterClass="secondAuthMethodLogVO" | |
| 56 | + resultMap="secondAuthMethodLogResult"> | |
| 57 | + SELECT LOG_ID, | |
| 58 | + MBER_ID, | |
| 59 | + ACTION_TYPE, | |
| 60 | + PHONE_NO, | |
| 61 | + VERIFY_TYPE, | |
| 62 | + ACCESS_IP, | |
| 63 | + DATE_FORMAT(FRST_REGIST_PNTTM, '%Y-%m-%d %H:%i:%s') AS FRST_REGIST_PNTTM | |
| 64 | + FROM SECOND_AUTH_METHOD_LOG | |
| 65 | + WHERE MBER_ID = #mberId# | |
| 66 | + AND FRST_REGIST_PNTTM <![CDATA[ >= ]]> DATE_SUB(NOW(), INTERVAL 1 YEAR) | |
| 67 | + <isNotEmpty property="actionType"> | |
| 68 | + AND ACTION_TYPE = #actionType# | |
| 69 | + </isNotEmpty> | |
| 70 | + <isNotEmpty property="searchStartDate"> | |
| 71 | + AND FRST_REGIST_PNTTM <![CDATA[ >= ]]> CONCAT(#searchStartDate#, ' 00:00:00') | |
| 72 | + </isNotEmpty> | |
| 73 | + <isNotEmpty property="searchEndDate"> | |
| 74 | + AND FRST_REGIST_PNTTM <![CDATA[ < ]]> DATE_ADD(CONCAT(#searchEndDate#, ' 00:00:00'), INTERVAL 1 DAY) | |
| 75 | + </isNotEmpty> | |
| 76 | + ORDER BY FRST_REGIST_PNTTM DESC, LOG_ID DESC | |
| 77 | + LIMIT #firstIndex#, #recordCountPerPage# | |
| 78 | + </select> | |
| 79 | + | |
| 80 | + <delete id="secondAuthMethodLogDAO.deleteExpiredSecondAuthMethodLogs"> | |
| 81 | + DELETE FROM SECOND_AUTH_METHOD_LOG | |
| 82 | + WHERE FRST_REGIST_PNTTM <![CDATA[ < ]]> DATE_SUB(NOW(), INTERVAL 1 YEAR) | |
| 83 | + </delete> | |
| 84 | + | |
| 85 | +</sqlMap> |
--- src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml
+++ src/main/resources/egovframework/sqlmap/let/uss/umt/EgovUserManage_SQL_Mysql.xml
... | ... | @@ -1,6 +1,5 @@ |
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
-<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> |
|
| 3 |
- |
|
| 2 |
+<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> |
|
| 4 | 3 |
<sqlMap namespace="User"> |
| 5 | 4 |
|
| 6 | 5 |
<typeAlias alias="egovMap" type = "egovframework.rte.psl.dataaccess.util.EgovMap"/> |
... | ... | @@ -1216,7 +1215,7 @@ |
| 1216 | 1215 |
, A.EMAIL_YN AS emailYN |
| 1217 | 1216 |
, A.SMS_YN AS smsYN |
| 1218 | 1217 |
, A.SECU_LOGIN_FLAG AS secuLoginFlag |
| 1219 |
- |
|
| 1218 |
+ |
|
| 1220 | 1219 |
FROM |
| 1221 | 1220 |
LETTNGNRLMBER A |
| 1222 | 1221 |
WHERE 1=1 |
--- src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-interceptor-servlet.xml
+++ src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-interceptor-servlet.xml
... | ... | @@ -8,6 +8,19 @@ |
| 8 | 8 |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> |
| 9 | 9 |
|
| 10 | 10 |
<interceptors> |
| 11 |
+ <!-- 해외 IP 차단 --> |
|
| 12 |
+ <interceptor> |
|
| 13 |
+ <mapping path="/**"/> |
|
| 14 |
+ <exclude-mapping path="/cmm/**"/> |
|
| 15 |
+ <exclude-mapping path="/js/**"/> |
|
| 16 |
+ <exclude-mapping path="/css/**"/> |
|
| 17 |
+ <exclude-mapping path="/images/**"/> |
|
| 18 |
+ <exclude-mapping path="/publish/**"/> |
|
| 19 |
+ <exclude-mapping path="/favicon.ico"/> |
|
| 20 |
+ |
|
| 21 |
+ <beans:bean class="itn.com.cmm.interceptor.GeoIpBlockInterceptor"/> |
|
| 22 |
+ </interceptor> |
|
| 23 |
+ |
|
| 11 | 24 |
<interceptor> |
| 12 | 25 |
<mapping path="/web/**"/> |
| 13 | 26 |
<exclude-mapping path="/web/main/mainPage.do"/> |
... | ... | @@ -29,6 +42,16 @@ |
| 29 | 42 |
<mapping path="/web/user/login/**"/> |
| 30 | 43 |
<beans:bean class="itn.com.cmm.interceptor.ipCheck.IPCheckInterceptor"/> |
| 31 | 44 |
</interceptor> --> |
| 45 |
+ <interceptor> |
|
| 46 |
+ <mapping path="/**"/> |
|
| 47 |
+ <exclude-mapping path="/cmm/**"/> |
|
| 48 |
+ <exclude-mapping path="/js/**"/> |
|
| 49 |
+ <exclude-mapping path="/css/**"/> |
|
| 50 |
+ <exclude-mapping path="/images/**"/> |
|
| 51 |
+ <exclude-mapping path="/publish/**"/> |
|
| 52 |
+ |
|
| 53 |
+ <beans:bean class="itn.com.cmm.interceptor.UserAccessLogInterceptor"/> |
|
| 54 |
+ </interceptor> |
|
| 32 | 55 |
</interceptors> |
| 33 | 56 |
|
| 34 | 57 |
</beans:beans>(No newline at end of file) |
--- src/main/webapp/WEB-INF/decorators.xml
+++ src/main/webapp/WEB-INF/decorators.xml
... | ... | @@ -131,6 +131,7 @@ |
| 131 | 131 |
<pattern>/*Ajax.do</pattern> |
| 132 | 132 |
<pattern>/*Ajax_advc.do</pattern> |
| 133 | 133 |
<pattern>/*AjaxView.do</pattern> |
| 134 |
+ <pattern>/web/cert/resetPhone.do</pattern><!-- KMC 휴대폰번호 변경 callback --> |
|
| 134 | 135 |
<pattern>/itn/mail/intSendMailForm.do</pattern> |
| 135 | 136 |
<pattern>/uss/umt/user/EgovGnrlselectedUserView.do</pattern> |
| 136 | 137 |
<pattern>/uss/umt/user/EgovGnrlselectedUserViewPopup.do</pattern> |
... | ... | @@ -193,4 +194,4 @@ |
| 193 | 194 |
<decorator name="weblayout" page="/WEB-INF/jsp/layout/siteCheck.jsp"> |
| 194 | 195 |
<pattern>*</pattern> |
| 195 | 196 |
</decorator> |
| 196 |
-</decorators>(No newline at end of file) |
|
| 197 |
+</decorators> |
--- src/main/webapp/WEB-INF/jsp/layout/adminLayout.jsp
+++ src/main/webapp/WEB-INF/jsp/layout/adminLayout.jsp
... | ... | @@ -21,8 +21,10 @@ |
| 21 | 21 |
<script type="text/javascript" src="<c:url value='/js/EgovCalPopup.js'/>"></script> |
| 22 | 22 |
<c:if test="${!empty loginId}">
|
| 23 | 23 |
<!-- 자동완성 START--> |
| 24 |
- <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
|
| 25 |
- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> |
|
| 24 |
+ <!-- <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> |
|
| 25 |
+ <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> --> |
|
| 26 |
+ <link rel="stylesheet" href="/publish/css/jquery-ui.css"> |
|
| 27 |
+ <script type="text/javascript" src="/publish/js/jquery-ui.min.js"></script> |
|
| 26 | 28 |
<script src="<c:url value='/js/recent_search.js' />"></script> |
| 27 | 29 |
<!-- 자동완성 END --> |
| 28 | 30 |
</c:if> |
--- src/main/webapp/WEB-INF/jsp/layout/include/defaultResource.jsp
+++ src/main/webapp/WEB-INF/jsp/layout/include/defaultResource.jsp
... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 |
<meta name="theme-color" content="#ffffff"> |
| 23 | 23 |
<meta property="og:image" content="/publish/images/kakao.jpg"> |
| 24 | 24 |
|
| 25 |
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap"> |
|
| 25 |
+ <!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap"> --> |
|
| 26 | 26 |
<link rel="stylesheet" href="/publish/css/reset.css"> |
| 27 | 27 |
<link rel="stylesheet" href="/publish/css/jquery.mCustomScrollbar.css"> |
| 28 | 28 |
<link rel="stylesheet" href="/publish/css/common.css"> |
... | ... | @@ -81,7 +81,8 @@ |
| 81 | 81 |
<script type="text/javascript" src="/js/fileupload/jquery.iframe-transport.js"></script> |
| 82 | 82 |
<script type="text/javascript" src="/js/fileupload/jquery.fileupload.js"></script> |
| 83 | 83 |
|
| 84 |
- <script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> |
|
| 84 |
+ <!-- <script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> --> |
|
| 85 |
+ <script type="text/javascript" src="/publish/js/jquery-ui.min.js"></script> |
|
| 85 | 86 |
<script type="text/javascript" src="/js/MJUtill.js?date=202401291830"></script> |
| 86 | 87 |
|
| 87 | 88 |
<!-- Uncaught TypeError: e.widget is not a function로 인해 가장 마지막에 선언_이준호_220510 --> |
--- src/main/webapp/WEB-INF/jsp/layout/popWebLayout.jsp
+++ src/main/webapp/WEB-INF/jsp/layout/popWebLayout.jsp
... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 12 | 12 |
<title>문자고</title> |
| 13 | 13 |
|
| 14 |
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet"> |
|
| 14 |
+ <!-- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100;300;400;500;700;900&display=swap" rel="stylesheet"> --> |
|
| 15 | 15 |
<link rel="stylesheet" href="/publish/css/reset.css"> |
| 16 | 16 |
<link rel="stylesheet" href="/publish/css/jquery.mCustomScrollbar.css"> |
| 17 | 17 |
<link rel="stylesheet" href="/publish/css/common.css"> |
+++ src/main/webapp/WEB-INF/jsp/web/api/ApiSentApprovalListAjax.jsp
... | ... | @@ -0,0 +1,220 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | +<%@ taglib prefix="ec" uri="/WEB-INF/tld/ecnet_tld.tld"%> | |
| 7 | +<%@ page import="itn.com.cmm.LoginVO" %> | |
| 8 | +<script src="/src/main/webapp/publish/js/content.js"></script> | |
| 9 | +<script src="/src/main/webapp/publish/js/popupLayer.js"></script> | |
| 10 | +<script type="text/javascript"> | |
| 11 | + | |
| 12 | +function fn_sentDetailView(msgGroupId, msgType) { | |
| 13 | + $("#searchForm #msgGroupId").val(msgGroupId); | |
| 14 | + let url = "/web/mjon/msgsent/msgSentDetailView.do"; | |
| 15 | + if(msgType == "8"){ | |
| 16 | + url = "/web/kakao/sent/selectKakaoSentDetailView.do"; | |
| 17 | + } | |
| 18 | + | |
| 19 | + $("#searchForm").attr("action", url); | |
| 20 | + $("#searchForm").submit(); | |
| 21 | +} | |
| 22 | + | |
| 23 | + | |
| 24 | +function fnApprove(msgGroupId){ | |
| 25 | + | |
| 26 | + var form = document.detailForm; | |
| 27 | + var loginVO = '${LoginVO}'; | |
| 28 | + form.msgGroupIdList.value = msgGroupId; | |
| 29 | + | |
| 30 | + if(loginVO == "" || loginVO == null){ | |
| 31 | + alert("로그인 후 이용이 가능합니다."); | |
| 32 | + return false; | |
| 33 | + } | |
| 34 | + | |
| 35 | + var data = new FormData(form); | |
| 36 | + | |
| 37 | + url = "/web/api/updateApproveDataAjax.do"; | |
| 38 | + | |
| 39 | + $.ajax({ | |
| 40 | + type: "POST", | |
| 41 | + url: url, | |
| 42 | + data: data, | |
| 43 | + dataType:'json', | |
| 44 | + async: true, | |
| 45 | + processData: false, | |
| 46 | + contentType: false, | |
| 47 | + cache: false, | |
| 48 | + success: function (returnData, status) { | |
| 49 | + if(status == 'success'){ | |
| 50 | + if("fail"==returnData.result){ | |
| 51 | + | |
| 52 | + alert(returnData.message); | |
| 53 | + return false; | |
| 54 | + } | |
| 55 | + linkPage(1); | |
| 56 | + } else if(status== 'fail'){ | |
| 57 | + alert(returnData.message); | |
| 58 | + } | |
| 59 | + }, | |
| 60 | + error: function (e) { | |
| 61 | + alert("승인이 실패하였습니다."); console.log("ERROR : ", e); | |
| 62 | + } | |
| 63 | + }); | |
| 64 | + | |
| 65 | +} | |
| 66 | + | |
| 67 | + | |
| 68 | +</script> | |
| 69 | + <div class="list_info"> | |
| 70 | + <p>총 <span class="c_e40000"><c:out value="${totalRecordCount}"/></span>건</p> | |
| 71 | + <div> | |
| 72 | + <select id="pageUnitS" class="selType2"> | |
| 73 | + <option value="10" <c:if test="${paginationInfo.recordCountPerPage == '10'}">selected</c:if> >10개보기</option> | |
| 74 | + <option value="20" <c:if test="${paginationInfo.recordCountPerPage == '20'}">selected</c:if> >20개보기</option> | |
| 75 | + <option value="30" <c:if test="${paginationInfo.recordCountPerPage == '30'}">selected</c:if> >30개보기</option> | |
| 76 | + <option value="100" <c:if test="${paginationInfo.recordCountPerPage == '100'}">selected</c:if> >100개보기</option> | |
| 77 | + </select> | |
| 78 | + </div> | |
| 79 | + </div> | |
| 80 | + | |
| 81 | + <div class="tb_wrap"> | |
| 82 | + <table class="tType4"> | |
| 83 | + <colgroup> | |
| 84 | + <col style="widht:40px;"/> | |
| 85 | + <col style="width:15%;"/> | |
| 86 | + <col style="width:8%;"/> | |
| 87 | + <col style="width:40%;"/> | |
| 88 | + <col style="width:8%;"/> | |
| 89 | + <col style="width:8%;"/> | |
| 90 | + <col style="width:15%"/> | |
| 91 | + </colgroup> | |
| 92 | + | |
| 93 | + <thead> | |
| 94 | + <tr> | |
| 95 | + <th> | |
| 96 | + <label for="allCheck" class="label">전체 선택</label> | |
| 97 | + <input type="checkbox" id="allCheck" name="allCheck"> | |
| 98 | + </th> | |
| 99 | + <th>발송일시</th> | |
| 100 | + <th>발송구분</th> | |
| 101 | + <th>내용</th> | |
| 102 | + <th>발송건수</th> | |
| 103 | + <th>승인상태</th> | |
| 104 | + <th>관리</th> | |
| 105 | + </tr> | |
| 106 | + </thead> | |
| 107 | + <tbody> | |
| 108 | + <c:choose> | |
| 109 | + <c:when test="${not empty resultAllSentList}"> | |
| 110 | + <c:forEach var="result" items="${resultAllSentList}" varStatus="status"> | |
| 111 | + <tr> | |
| 112 | + <td> | |
| 113 | + <label for="msgApproveChk${status.count}" class="label">선택</label> | |
| 114 | + <c:choose> | |
| 115 | + <c:when test="${result.apiAprvYn eq 'Y'}"> | |
| 116 | + <input type="checkbox" disabled> | |
| 117 | + </c:when> | |
| 118 | + <c:otherwise> | |
| 119 | + <input type="checkbox" id="msgApproveChk${status.count}" name="msgApproveChk" value="${result.msgGroupId}"> | |
| 120 | + </c:otherwise> | |
| 121 | + </c:choose> | |
| 122 | + </td> | |
| 123 | + <td> | |
| 124 | + <c:choose> | |
| 125 | + <c:when test="${result.delayYn eq 'Y' && result.delayCompleteYn eq 'N'}"> | |
| 126 | + <c:choose> | |
| 127 | + <c:when test="${result.curState eq '0'}"> | |
| 128 | + <p>${result.delayOrgTime}</p> | |
| 129 | + </c:when> | |
| 130 | + <c:otherwise> | |
| 131 | + <p>${result.reqDate}</p> | |
| 132 | + </c:otherwise> | |
| 133 | + </c:choose> | |
| 134 | + | |
| 135 | + </c:when> | |
| 136 | + <c:otherwise> | |
| 137 | + <p>${result.reqDate}</p> | |
| 138 | + </c:otherwise> | |
| 139 | + </c:choose> | |
| 140 | + </td> | |
| 141 | + <td> | |
| 142 | + <c:choose> | |
| 143 | + <c:when test="${result.msgType eq '4' || result.msgType eq '6'}"> | |
| 144 | + 문자 | |
| 145 | + </c:when> | |
| 146 | + <c:when test="${result.msgType eq '8'}"> | |
| 147 | + 알림톡 | |
| 148 | + </c:when> | |
| 149 | + <c:otherwise> | |
| 150 | + 문자 | |
| 151 | + </c:otherwise> | |
| 152 | + </c:choose> | |
| 153 | + </td> | |
| 154 | + <td> | |
| 155 | + <p class="tLeft"> | |
| 156 | + <a href="#none" onclick="fn_sentDetailView('${result.msgGroupId}','${result.msgType}')"> | |
| 157 | + <c:choose> | |
| 158 | + <c:when test="${result.subjectChkYn eq 'Y' }"> | |
| 159 | + <c:out value="${result.subject }" /> | |
| 160 | + </c:when> | |
| 161 | + <c:otherwise> | |
| 162 | + <c:out value="${result.smsTxt}" /> | |
| 163 | + </c:otherwise> | |
| 164 | + </c:choose> | |
| 165 | + </a> | |
| 166 | + </p> | |
| 167 | + </td> | |
| 168 | + <td> | |
| 169 | + <fmt:formatNumber value="${result.msgGroupCnt}" type="number" groupingUsed="true" /> | |
| 170 | + </td> | |
| 171 | + <c:choose> | |
| 172 | + <c:when test="${result.apiAprvYn eq 'N' || result.apiAprvYn eq null}"> | |
| 173 | + <td class="c_e40000 fwMd">미승인</td> | |
| 174 | + </c:when> | |
| 175 | + <c:when test="${result.apiAprvYn eq 'Y'}"> | |
| 176 | + <td class="c_002c9a fwMd">승인완료</td> | |
| 177 | + </c:when> | |
| 178 | + <c:otherwise> | |
| 179 | + <td class="c_e40000 fwMd">미승인</td> | |
| 180 | + </c:otherwise> | |
| 181 | + </c:choose> | |
| 182 | + <td> | |
| 183 | + <c:choose> | |
| 184 | + <c:when test="${result.apiAprvYn eq 'N' || result.apiAprvYn eq null}"> | |
| 185 | + <button type="button" class="btnType btnType5" onclick="fnApprove('${result.msgGroupId}')">승인</button> | |
| 186 | + </c:when> | |
| 187 | + <c:when test="${result.apiAprvYn eq 'Y' && result.apiAprvDt ne null}"> | |
| 188 | + <p>${result.apiAprvDt}</p> | |
| 189 | + </c:when> | |
| 190 | + <c:otherwise> | |
| 191 | + <button type="button" class="btnType btnType5" onclick="fnApprove('${result.msgGroupId}')">승인</button> | |
| 192 | + </c:otherwise> | |
| 193 | + </c:choose> | |
| 194 | + | |
| 195 | + </td> | |
| 196 | + </tr> | |
| 197 | + </c:forEach> | |
| 198 | + </c:when> | |
| 199 | + <c:otherwise> | |
| 200 | + <tr> | |
| 201 | + <td colspan="7">발송 내역이 없습니다.</td> | |
| 202 | + </tr> | |
| 203 | + </c:otherwise> | |
| 204 | + </c:choose> | |
| 205 | + </tbody> | |
| 206 | + </table> | |
| 207 | + </div> | |
| 208 | + | |
| 209 | + <div class="table_btn clearfix"> | |
| 210 | + <div class="table_btn_left"> | |
| 211 | + <button id="btnApprove" type="button" class="btnType btnType2" data-tooltip="approve_popup">선택승인</button> | |
| 212 | + </div> | |
| 213 | + | |
| 214 | + <c:if test="${!empty resultAllSentList}"> | |
| 215 | + <ul class="pagination"> | |
| 216 | + <ui:pagination paginationInfo = "${paginationInfo}" type="imageWeb" jsFunction="linkPage" /> | |
| 217 | + </ul> | |
| 218 | + </c:if> | |
| 219 | + | |
| 220 | + </div>(No newline at end of file) |
+++ src/main/webapp/WEB-INF/jsp/web/api/approvalList.jsp
... | ... | @@ -0,0 +1,248 @@ |
| 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> | |
| 4 | +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> | |
| 5 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | |
| 6 | +<%@ page import="itn.com.cmm.LoginVO" %> | |
| 7 | + | |
| 8 | +<script type="text/javascript"> | |
| 9 | + $(document).ready(function(){ | |
| 10 | + linkPage($('#searchForm #pageIndex').val()); | |
| 11 | + | |
| 12 | + fn_setActiveTab($('#searchForm #msgType').val()) | |
| 13 | + fn_activateTab($('#searchForm #apiAprvYn').val()) | |
| 14 | + | |
| 15 | + $(document).on('click', 'button[name="btnApprvYn"]', function (){ | |
| 16 | + fn_activateTab($(this).data('info')); | |
| 17 | + linkPage(1); | |
| 18 | + }); | |
| 19 | + | |
| 20 | + $(document).on('change','#pageUnitS', function(){ | |
| 21 | + setPageUnit($(this).val()); | |
| 22 | + linkPage(1); | |
| 23 | + }); | |
| 24 | + | |
| 25 | + $(document).on('change', '#allCheck', function () { | |
| 26 | + var checked = $(this).prop('checked'); | |
| 27 | + $('#approveListCont input[name="msgApproveChk"]:not(:disabled)').prop('checked', checked); | |
| 28 | + }); | |
| 29 | + | |
| 30 | + $(document).on('click', '#btnApprove', function (e){ | |
| 31 | + var $checked = $('#approveListCont input[name="msgApproveChk"]:checked:not(:disabled)'); | |
| 32 | + $('#approvePopup .title_text b').text($checked.length); | |
| 33 | + }); | |
| 34 | + | |
| 35 | + }); | |
| 36 | + | |
| 37 | + function setPageUnit(val){ | |
| 38 | + $('#pageUnit').val(val); | |
| 39 | + } | |
| 40 | + | |
| 41 | + function fn_activateTab(tabInfo) { | |
| 42 | + // 1. data-info 값을 가진 버튼 요소 찾기 | |
| 43 | + var $button = $('button[name="btnApprvYn"][data-info="' + tabInfo + '"]'); | |
| 44 | + | |
| 45 | + // 2. 해당 버튼이 속한 탭 활성화 처리 | |
| 46 | + $button.closest('ul').find('.tab').removeClass('active'); | |
| 47 | + $button.closest('.tab').addClass('active'); | |
| 48 | + | |
| 49 | + // 3. hidden input 요소에 값 설정 | |
| 50 | + $('#apiAprvYn').val(tabInfo); | |
| 51 | + } | |
| 52 | + | |
| 53 | + function linkPage(pageNo){ | |
| 54 | + var form = document.searchForm; | |
| 55 | + form.pageIndex.value = pageNo; | |
| 56 | + | |
| 57 | + var sendData = $(document.searchForm).serializeArray(); | |
| 58 | + $("#approveListCont").html('<div class="list_info"><table class="tType4"><tbody><tr><td colspan="12">LOADING...</td></tr></tbody></table></div>'); | |
| 59 | + $("#approveListCont").load("/web/api/selectApiMsgSentListViewAjax.do", sendData ,function(response, status, xhr){ | |
| 60 | + }); | |
| 61 | + | |
| 62 | + } | |
| 63 | + | |
| 64 | + function fnTabLoad(tabType){ | |
| 65 | + fn_activateTab(''); | |
| 66 | + setPageUnit('10'); | |
| 67 | + | |
| 68 | + fn_setActiveTab(tabType); | |
| 69 | + linkPage(1); | |
| 70 | + } | |
| 71 | + | |
| 72 | + function fn_setActiveTab(tabType) { | |
| 73 | + var $tabs = $(".list_tab_wrap2 li"); | |
| 74 | + $tabs.removeClass("active").find("button").removeAttr("title"); | |
| 75 | + | |
| 76 | + $tabs.each(function() { | |
| 77 | + var buttonText = $(this).find("button").text(); | |
| 78 | + if ((tabType === '' && buttonText === "전체") || | |
| 79 | + (tabType === 'M' && buttonText === "문자") || | |
| 80 | + (tabType === 'K' && buttonText === "알림톡")) { | |
| 81 | + $(this).addClass("active").find("button").attr("title", "선택됨"); | |
| 82 | + } | |
| 83 | + }); | |
| 84 | + | |
| 85 | + $('#msgType').val(tabType); | |
| 86 | + } | |
| 87 | + | |
| 88 | + function fnApproveAll() { | |
| 89 | + | |
| 90 | + var $checked = $('#approveListCont input[name="msgApproveChk"]:checked:not(:disabled)'); | |
| 91 | + | |
| 92 | + if ($checked.length === 0) { | |
| 93 | + alert("한 개 이상의 승인건을 선택하세요."); | |
| 94 | + $('#approvePopup .tooltip-close[data-focus="approve_popup-close"]').first().trigger('click'); | |
| 95 | + return false; | |
| 96 | + } | |
| 97 | + | |
| 98 | + var msgId = []; | |
| 99 | + | |
| 100 | + $checked.each(function () { | |
| 101 | + msgId.push($(this).val()); | |
| 102 | + }); | |
| 103 | + | |
| 104 | + console.log("일괄 승인 대상:", msgId); | |
| 105 | + | |
| 106 | + var loginVO = '${LoginVO}'; | |
| 107 | + | |
| 108 | + if (loginVO == "" || loginVO == null) { | |
| 109 | + alert("로그인 후 이용이 가능합니다."); | |
| 110 | + return false; | |
| 111 | + } | |
| 112 | + | |
| 113 | + // 기존 form 사용 | |
| 114 | + var form = document.detailForm; | |
| 115 | + | |
| 116 | + // msgGroupId들을 comma로 전달 | |
| 117 | + form.msgGroupIdList.value = msgId.join(","); | |
| 118 | + | |
| 119 | + var data = new FormData(form); | |
| 120 | + | |
| 121 | + $.ajax({ | |
| 122 | + type: "POST", | |
| 123 | + url: "/web/api/updateApproveDataAjax.do", | |
| 124 | + data: data, | |
| 125 | + dataType: "json", | |
| 126 | + async: true, | |
| 127 | + processData: false, | |
| 128 | + contentType: false, | |
| 129 | + cache: false, | |
| 130 | + | |
| 131 | + success: function (returnData, status) { | |
| 132 | + | |
| 133 | + if (status === "success") { | |
| 134 | + if (returnData.result === "fail") { | |
| 135 | + alert(returnData.message); | |
| 136 | + return false; | |
| 137 | + } | |
| 138 | + // 목록 새로고침 | |
| 139 | + linkPage(1); | |
| 140 | + } else { | |
| 141 | + alert("승인이 실패하였습니다."); | |
| 142 | + } | |
| 143 | + $('#approvePopup .tooltip-close[data-focus="approve_popup-close"]').first().trigger('click'); | |
| 144 | + }, | |
| 145 | + | |
| 146 | + error: function (e) { | |
| 147 | + console.log("ERROR : ", e); | |
| 148 | + alert("승인이 실패하였습니다."); | |
| 149 | + $('#approvePopup .tooltip-close[data-focus="approve_popup-close"]').first().trigger('click'); | |
| 150 | + } | |
| 151 | + }); | |
| 152 | + | |
| 153 | + return false; | |
| 154 | + } | |
| 155 | + | |
| 156 | +</script> | |
| 157 | +<style> | |
| 158 | + | |
| 159 | + .padding_add > p.padding_add > p | |
| 160 | + { | |
| 161 | + padding-left: 30px; | |
| 162 | + padding-bottom: 8px; | |
| 163 | + } | |
| 164 | + | |
| 165 | + .padding_add > div > p | |
| 166 | + { | |
| 167 | + padding-left: 60px; | |
| 168 | + padding-bottom: 8px; | |
| 169 | + } | |
| 170 | +</style> | |
| 171 | +<!-- 발송내역 승인 --> | |
| 172 | +<!-- //발송내역 승인 --> | |
| 173 | +<!-- content 영역 --> | |
| 174 | +<div class="inner"> | |
| 175 | + <!-- send top --> | |
| 176 | + <div class="send_top"> | |
| 177 | + | |
| 178 | + <c:import url="./top_tepMenu.jsp" /> | |
| 179 | + | |
| 180 | + <div class="api_guide_cont api_send_cont current"> | |
| 181 | + <div class="heading"> | |
| 182 | + <h2>발송내역관리</h2> | |
| 183 | + </div> | |
| 184 | + | |
| 185 | + <ul class="info"> | |
| 186 | + <li>- API를 통해 발송된 내역을 확인하고 사후 승인할 수 있습니다.</li> | |
| 187 | + <li>- 미승인 건은 여러 건을 선택하여 일괄 승인할 수 있습니다.</li> | |
| 188 | + <li>- 미승인 건은 로그인 시 반복 안내됩니다.</li> | |
| 189 | + </ul> | |
| 190 | + | |
| 191 | + <form id="searchForm" name="searchForm" method="post"> | |
| 192 | + <input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value="${searchVO.pageIndex}" />" /> | |
| 193 | + <input type="hidden" id="pageUnit" name="pageUnit" value="<c:out value="${searchVO.pageUnit}" />" /> | |
| 194 | + <input type="hidden" id="msgGroupId" name="msgGroupId" value=""/> | |
| 195 | + <input type="hidden" id="msgGroupIdList" name="msgGroupIdList" value=""/> | |
| 196 | + <input type="hidden" id="msgType" name="msgType" value="${searchVO.searchCondition01}"/> | |
| 197 | + <input type="hidden" id="apiAprvYn" name="apiAprvYn" value="${searchVO.searchCondition02}"/> | |
| 198 | + | |
| 199 | + <div class="list_tab_wrap2 type2"> | |
| 200 | + <!-- tab button --> | |
| 201 | + <ul class="list_tab"> | |
| 202 | + <li class="tab active"><button type="button" onclick="fnTabLoad(''); return false;">전체</button></li> | |
| 203 | + <li class="tab"><button type="button" onclick="fnTabLoad('M'); return false;">문자</button></li> | |
| 204 | + <li class="tab"><button type="button" onclick="fnTabLoad('K'); return false;">알림톡</button></li> | |
| 205 | + </ul> | |
| 206 | + <!--// tab button --> | |
| 207 | + </div> | |
| 208 | + | |
| 209 | + <div class="table_tab_wrap"> | |
| 210 | + <!-- tab button --> | |
| 211 | + <ul> | |
| 212 | + <li class="tab ${empty searchVO.searchCondition_01 ? 'active' : ''}"><button type="button" name="btnApprvYn" type="button" data-info="">전체</button></li> | |
| 213 | + <li class="tab ${searchVO.searchCondition_01 == '0' ? 'active' : ''}"><button name="btnApprvYn" type="button" data-info="N">미승인</button></li> | |
| 214 | + <li class="tab ${searchVO.searchCondition_01 == '1' ? 'active' : ''}"><button name="btnApprvYn" type="button" data-info="Y">승인완료</button></li> | |
| 215 | + </ul> | |
| 216 | + <!--// tab button --> | |
| 217 | + </div> | |
| 218 | + | |
| 219 | + <div class="table_cont current" id="approveListCont"></div> | |
| 220 | + | |
| 221 | + </form> | |
| 222 | + | |
| 223 | + </div><!--// send top --> | |
| 224 | + </div> | |
| 225 | + | |
| 226 | + <form name="detailForm" id="detailForm" method="post"> | |
| 227 | + <input type="hidden" name="msgGroupIdList" value=""/> | |
| 228 | + <input type="hidden" name="apiAprvYn" value="Y"/> | |
| 229 | + </form> | |
| 230 | + | |
| 231 | + <div class="tooltip-wrap"> | |
| 232 | + <div class="popup-com approve_popup" id="approvePopup" data-tooltip-con="approve_popup" data-focus="approve_popup" data-focus-prev="approve_popup-close" style="width:420px;"> | |
| 233 | + <div class="popup_heading"> | |
| 234 | + <p>발송내역 승인</p> | |
| 235 | + <button type="button" class="tooltip-close" data-focus="approve_popup-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 236 | + </div> | |
| 237 | + <div class="layer_in" style="padding:40px 30px;"> | |
| 238 | + <p class="title_text">체크한 <b class="fwBold c_002c9a">3</b>건을 일괄 승인하시겠습니까?</p> | |
| 239 | + <div class="popup_btn" style="margin:30px 0 0 0;gap:8px;"> | |
| 240 | + <button type="button" class="btnType btnType2" onClick="javascript:fnApproveAll(); return false;">승인</button> | |
| 241 | + <button type="button" class="btnType fill_gray tooltip-close">취소</button> | |
| 242 | + </div> | |
| 243 | + </div> | |
| 244 | + </div> | |
| 245 | + </div> | |
| 246 | + | |
| 247 | +</div> | |
| 248 | + |
--- src/main/webapp/WEB-INF/jsp/web/api/top_tepMenu.jsp
+++ src/main/webapp/WEB-INF/jsp/web/api/top_tepMenu.jsp
... | ... | @@ -106,4 +106,5 @@ |
| 106 | 106 |
<li class="tab"><button type="button" class="goPage" id="apiSpec" data-info="<c:url value="/web/api/apiSpec.do" />">개발 가이드</button></li> |
| 107 | 107 |
<li class="tab"><button type="button" class="goPage" id="examDown" data-info="<c:url value="/web/api/examDown.do" />">예제 다운로드</button></li> |
| 108 | 108 |
<li class="tab"><button type="button" class="goPage" id="appMgmt" data-info="<c:url value="/web/api/appMgmt.do" />" >신청/관리</button></li> |
| 109 |
+ <li class="tab"><button type="button" class="goPage" id="approvalList" data-info="<c:url value="/web/api/approvalList.do" />" >발송내역관리</button></li> |
|
| 109 | 110 |
</ul> |
--- src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
+++ src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
... | ... | @@ -170,19 +170,7 @@ |
| 170 | 170 |
|
| 171 | 171 |
//등급제 시행 ON/OFF 체크(비로그인) |
| 172 | 172 |
//getMberSettingDetailByNotLogin_Header(); |
| 173 |
- |
|
| 174 |
- var secuLoginFlag = '${mberManageVO.secuLoginFlag}';
|
|
| 175 |
- |
|
| 176 |
- const $securityBox = $('.security_box');
|
|
| 177 | 173 |
|
| 178 |
- // secuLoginFlag 값에 따라 클래스 및 내용 변경 |
|
| 179 |
- $securityBox |
|
| 180 |
- .removeClass('green_box red_box')
|
|
| 181 |
- .addClass(secuLoginFlag === 'Y' ? 'green_box' : 'red_box') |
|
| 182 |
- .find('.state')
|
|
| 183 |
- .text(secuLoginFlag === 'Y' ? 'ON' : 'OFF') |
|
| 184 |
- .removeClass('on off')
|
|
| 185 |
- .addClass(secuLoginFlag === 'Y' ? 'on' : 'off'); |
|
| 186 | 174 |
}); |
| 187 | 175 |
|
| 188 | 176 |
//등급제 시행 ON/OFF 체크(비로그인) |
... | ... | @@ -401,18 +389,8 @@ |
| 401 | 389 |
dataType:'json', |
| 402 | 390 |
success : function(data) {
|
| 403 | 391 |
if (data.status=="success"){
|
| 404 |
- |
|
| 405 |
- document.loginForm.passFlag.value = data.passFlag; |
|
| 406 |
- if(data.passFlag == "Y") |
|
| 407 |
- {
|
|
| 408 |
- actionLogin_end(); |
|
| 409 |
- } |
|
| 410 |
- else |
|
| 411 |
- {
|
|
| 412 |
- goLoginPage(id.val(), pw.val(), "secure"); |
|
| 413 |
- } |
|
| 414 |
- }else if (data.status=="fail"){
|
|
| 415 |
- |
|
| 392 |
+ goLoginPage(id.val(), pw.val(), "secure"); |
|
| 393 |
+ }else if (data.status=="fail"){
|
|
| 416 | 394 |
if (data.returnType == "A"){
|
| 417 | 395 |
//휴면 회원 |
| 418 | 396 |
document.loginForm.action="<c:url value='/web/user/humanPage.do'/>"; |
... | ... | @@ -427,12 +405,9 @@ |
| 427 | 405 |
document.cmpChangeForm.action="<c:url value='/web/user/login/loginRestrictionUse.do'/>"; |
| 428 | 406 |
document.cmpChangeForm.submit(); |
| 429 | 407 |
}else{
|
| 430 |
- //로그인 실패 page이동 |
|
| 431 | 408 |
goLoginPage(id.val(), pw.val(), data.msg); |
| 432 | 409 |
} |
| 433 | 410 |
} |
| 434 |
- |
|
| 435 |
- //alert(JSON.stringify(data)); |
|
| 436 | 411 |
console.log("sucess data1 : " + JSON.stringify(data));
|
| 437 | 412 |
if (data.isSuccess == true) {
|
| 438 | 413 |
console.log("fn_click_banner_add_stat sucess data2 : " + JSON.stringify(data));
|
... | ... | @@ -1657,6 +1632,7 @@ |
| 1657 | 1632 |
<li><a href="<c:out value='/web/api/apiSpec.do'/>" >개발 가이드</a></li> |
| 1658 | 1633 |
<li><a href="<c:out value='/web/api/examDown.do'/>" >예제 다운로드</a></li> |
| 1659 | 1634 |
<li><a href="<c:out value='/web/api/appMgmt.do'/>" >신청/관리</a></li> |
| 1635 |
+ <li><a href="<c:out value='/web/api/approvalList.do'/>" >발송내역관리</a></li> |
|
| 1660 | 1636 |
</ul> |
| 1661 | 1637 |
</dd> |
| 1662 | 1638 |
</dl> --%> |
... | ... | @@ -1792,9 +1768,9 @@ |
| 1792 | 1768 |
</c:otherwise> |
| 1793 | 1769 |
</c:choose> |
| 1794 | 1770 |
</div> |
| 1795 |
- <div class="session" style="width:110px"> |
|
| 1771 |
+ <div class="session"> |
|
| 1796 | 1772 |
<div> |
| 1797 |
- <span id="ViewTimer" /> |
|
| 1773 |
+ <span id="ViewTimer"></span> |
|
| 1798 | 1774 |
</div> |
| 1799 | 1775 |
<button type="button" onclick="sessionExpend(); return false;">연장</button> |
| 1800 | 1776 |
<!-- <a href="#" onclick="sessionExpend(); return false;"> |
... | ... | @@ -1804,10 +1780,10 @@ |
| 1804 | 1780 |
<!-- <button type="button" class="btnType btnType3" onclick="location.href='/web/user/mberInfoIndex.do'">마이페이지</button> --> |
| 1805 | 1781 |
<button type="button" class="btnType btnType1" onclick="location.href='/web/uat/uia/actionLogout.do'">로그아웃</button> |
| 1806 | 1782 |
|
| 1807 |
- |
|
| 1808 |
- <div class="security_box"> |
|
| 1809 |
- <a href="<c:out value="/web/user/mberSecureLogin.do"/>" class="title">보안로그인</a><!-- 보안로그인 클릭시 보안로그인 홈페이지로 --> |
|
| 1810 |
- <a href="#" id="secuLoginFlag" class="state"></a><!-- ON/OFF 클릭시 이벤트 발생 --> |
|
| 1783 |
+ |
|
| 1784 |
+ <div class="security_box yellow_box"> |
|
| 1785 |
+ <i class="icon security"></i> |
|
| 1786 |
+ <a href="<c:out value="/web/user/mberSecureLogin.do"/>" class="title">보안로그인</a> |
|
| 1811 | 1787 |
</div> |
| 1812 | 1788 |
|
| 1813 | 1789 |
|
--- src/main/webapp/WEB-INF/jsp/web/cop/bbs/include/agree_private/agreeSelectVersion.jsp
+++ src/main/webapp/WEB-INF/jsp/web/cop/bbs/include/agree_private/agreeSelectVersion.jsp
... | ... | @@ -9,8 +9,7 @@ |
| 9 | 9 |
<p>이용약관 개정이력 보기</p> |
| 10 | 10 |
<div class="privacy_content_select_wrap"><!-- option 선택 시 해당페이지로 이동 --> |
| 11 | 11 |
<select name="termsMastNo" id="termsMastNo" class="selType2 version_change_select" onchange="getTermsOtherVersion();"> |
| 12 |
- <option value="2026" <c:if test="${termsMstNo eq '2026'}"> selected</c:if> >2026.10.15.</option>
|
|
| 13 |
- <option value="2025" <c:if test="${termsMstNo eq '2025'}"> selected</c:if> >2025.07.30 ~ 2026.10.14. 적용</option>
|
|
| 12 |
+ <option value="2025" <c:if test="${termsMstNo eq '2025'}"> selected</c:if> >2025.07.30</option>
|
|
| 14 | 13 |
<option value="2024" <c:if test="${termsMstNo eq '2024'}"> selected</c:if> >2024.11.29. ~ 2025.07.29. 적용</option>
|
| 15 | 14 |
<option value="2023" <c:if test="${termsMstNo eq '2023'}"> selected</c:if> >2023.04.26. ~ 2024.11.28. 적용</option>
|
| 16 | 15 |
<option value="2022" <c:if test="${termsMstNo eq '2022'}"> selected</c:if> >2022.08.01. ~ 2023.04.25. 적용</option>
|
--- src/main/webapp/WEB-INF/jsp/web/cop/bbs/include/bbsTabType.jsp
+++ src/main/webapp/WEB-INF/jsp/web/cop/bbs/include/bbsTabType.jsp
... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 |
|
| 9 | 9 |
<ul class="tabType4"> |
| 10 | 10 |
<li class="tab"><button type="button" onclick="TabType5(this,'1');location.href='/web/cop/bbs/NoticeList.do'">공지사항</button></li> |
| 11 |
- <li class="tab"><button type="button" onclick="TabType5(this,'2');location.href='/web/cop/bbs/TermsList.do?menuNm=02&termsMastNo=2025'">이용약관</button></li> |
|
| 11 |
+ <li class="tab"><button type="button" onclick="TabType5(this,'2');location.href='/web/cop/bbs/TermsList.do'">이용약관</button></li> |
|
| 12 | 12 |
<li class="tab"><button type="button" onclick="TabType5(this,'3');location.href='/web/cop/bbs/FaqList.do'">자주하는 질문</button></li> |
| 13 | 13 |
<li class="tab"><button type="button" onclick="TabType5(this,'4');location.href='/web/cop/bbs/QnaList.do'">1:1 문의</button></li> |
| 14 | 14 |
<li class="tab"><button type="button" onclick="TabType5(this,'5');location.href='/web/cop/bbs/SuggestList.do'">불편신고</button></li> |
--- src/main/webapp/WEB-INF/jsp/web/login/EgovLoginGnrlUsr_back_250325.jsp
+++ src/main/webapp/WEB-INF/jsp/web/login/EgovLoginGnrlUsr_back_250325.jsp
... | ... | @@ -182,15 +182,7 @@ |
| 182 | 182 |
if (data.status=="success"){
|
| 183 | 183 |
|
| 184 | 184 |
document.loginForm2.passFlag.value = data.passFlag; |
| 185 |
- if(data.passFlag == "Y") |
|
| 186 |
- {
|
|
| 187 |
- actionLogin_end(); |
|
| 188 |
- } |
|
| 189 |
- else |
|
| 190 |
- {
|
|
| 191 |
- |
|
| 192 |
- //번호인증팝업 띄우기 |
|
| 193 |
- $("#input_list_item_1").hide();
|
|
| 185 |
+ $("#input_list_item_1").hide();
|
|
| 194 | 186 |
$("#input_list_item_2").hide();
|
| 195 | 187 |
$("#input_list_item_3").hide();
|
| 196 | 188 |
$("#input_list_item_0").hide();
|
... | ... | @@ -207,9 +199,6 @@ |
| 207 | 199 |
text: item.mbtlnum+'('+item.certAlias+')' // option의 화면에 보이는 텍스트
|
| 208 | 200 |
})); |
| 209 | 201 |
}); |
| 210 |
- |
|
| 211 |
- } |
|
| 212 |
- |
|
| 213 | 202 |
}else if (data.status=="fail"){
|
| 214 | 203 |
|
| 215 | 204 |
if (data.returnType == "A"){
|
... | ... | @@ -545,7 +534,6 @@ |
| 545 | 534 |
<input type="hidden" name="goEventPay" value="${goEventPay}"/>
|
| 546 | 535 |
<input type="hidden" id="hp" name="hp"> |
| 547 | 536 |
<input type="hidden" id="num" name="num"> |
| 548 |
- <input type="hidden" id="passFlag" name="passFlag"> |
|
| 549 | 537 |
|
| 550 | 538 |
<div class="send_top"> |
| 551 | 539 |
<div class="mypage_content current"> |
+++ src/main/webapp/WEB-INF/jsp/web/login/include/credentials.jspf
... | ... | @@ -0,0 +1,207 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | +<script type="text/javascript"> | |
| 3 | + function press(event) { | |
| 4 | + if (event.keyCode === 13) {actionCredentials();} | |
| 5 | + } | |
| 6 | + | |
| 7 | + function actionCredentials() { | |
| 8 | + const $id = $("#id_text2"); | |
| 9 | + const $password = $("#password_text2"); | |
| 10 | + | |
| 11 | + const id = $.trim($id.val()); | |
| 12 | + const password = $password.val(); | |
| 13 | + | |
| 14 | + $id.val(id); | |
| 15 | + | |
| 16 | + if (!id) { | |
| 17 | + alert("아이디를 입력하세요."); | |
| 18 | + $id.focus(); | |
| 19 | + return; | |
| 20 | + } | |
| 21 | + | |
| 22 | + if (!password) { | |
| 23 | + alert("비밀번호를 입력하세요."); | |
| 24 | + $password.focus(); | |
| 25 | + return; | |
| 26 | + } | |
| 27 | + | |
| 28 | + // RSA | |
| 29 | + const rsa = new RSAKey(); | |
| 30 | + rsa.setPublic($("#RSAModulus2").val(), $("#RSAExponent2").val()); | |
| 31 | + | |
| 32 | + document.loginForm2.id.value = rsa.encrypt(id.toLowerCase()); | |
| 33 | + document.loginForm2.password.value = rsa.encrypt(password); | |
| 34 | + | |
| 35 | + $.ajax({ | |
| 36 | + type: "POST", | |
| 37 | + url: "<c:url value='/web/user/login/actionSecurityLoginBeforeHpAjax.do' />", | |
| 38 | + data: $("form[name=loginForm2]").serialize(), | |
| 39 | + dataType: "json", | |
| 40 | + | |
| 41 | + success: function (data) { | |
| 42 | + if (data.status === "success") { | |
| 43 | + if (data.data && data.data.id) { | |
| 44 | + $("#userId").val(data.data.id); | |
| 45 | + } | |
| 46 | + initVerification(data.mberCertPhoneList); | |
| 47 | + showVerification(); | |
| 48 | + return; | |
| 49 | + } | |
| 50 | + | |
| 51 | + if (data.returnType === "A") { | |
| 52 | + document.loginForm2.action = "<c:url value='/web/user/humanPage.do'/>"; | |
| 53 | + document.loginForm2.submit(); | |
| 54 | + return; | |
| 55 | + } | |
| 56 | + | |
| 57 | + if (data.returnType === "B") { | |
| 58 | + document.cmpChangeForm.mberId.value = data.mberId; | |
| 59 | + document.cmpChangeForm.action = "<c:url value='/web/user/login/membershipAttachDocBefore.do'/>"; | |
| 60 | + document.cmpChangeForm.submit(); | |
| 61 | + | |
| 62 | + return; | |
| 63 | + } | |
| 64 | + | |
| 65 | + if (data.returnType === "C") { | |
| 66 | + document.cmpChangeForm.mberId.value = data.mberId; | |
| 67 | + document.cmpChangeForm.action = "<c:url value='/web/user/login/loginRestrictionUse.do'/>"; | |
| 68 | + document.cmpChangeForm.submit(); | |
| 69 | + | |
| 70 | + return; | |
| 71 | + } | |
| 72 | + | |
| 73 | + if (data.locked) { | |
| 74 | + $("#credentials_frame .mem_btn5") | |
| 75 | + .prop("disabled", true) | |
| 76 | + .addClass("disabled"); | |
| 77 | + } | |
| 78 | + | |
| 79 | + if (data.count !== undefined && data.count <= 4) { | |
| 80 | + showCredentialsError(data.count); | |
| 81 | + return; | |
| 82 | + } | |
| 83 | + | |
| 84 | + showCredentialsError(data.msg || "아이디 또는 비밀번호가 올바르지 않습니다."); | |
| 85 | + }, | |
| 86 | + | |
| 87 | + error: function (xhr, status, error) { | |
| 88 | + console.log( | |
| 89 | + "credentials error", | |
| 90 | + xhr, | |
| 91 | + status, | |
| 92 | + error | |
| 93 | + ); | |
| 94 | + | |
| 95 | + showCredentialsError( | |
| 96 | + "로그인 처리 중 오류가 발생했습니다." | |
| 97 | + ); | |
| 98 | + } | |
| 99 | + }); | |
| 100 | + } | |
| 101 | + | |
| 102 | + function showCredentialsError(message) { | |
| 103 | + $("#credentials_error").html("<i></i><p>" + message + "</p>").show(); | |
| 104 | + } | |
| 105 | + | |
| 106 | + function fn_passView(obj) { | |
| 107 | + const $password = $("#password_text2"); | |
| 108 | + | |
| 109 | + if ($password.prop("type") === "text") { | |
| 110 | + $password.prop("type", "password"); | |
| 111 | + $(obj).find("img").attr("src", "/publish/images/content/password_protect.png"); | |
| 112 | + } else { | |
| 113 | + $password.prop("type", "text"); | |
| 114 | + | |
| 115 | + $(obj).find("img").attr("src", "/publish/images/content/password_protect2.png"); | |
| 116 | + } | |
| 117 | + } | |
| 118 | + | |
| 119 | +</script> | |
| 120 | + | |
| 121 | +<div id="credentials_frame"> | |
| 122 | + <div class="input_list_item"> | |
| 123 | + <div class="input_left">아이디</div> | |
| 124 | + | |
| 125 | + <div class="input_right"> | |
| 126 | + <label for="id_text2" class="label">아이디</label> | |
| 127 | + <input type="text" | |
| 128 | + id="id_text2" | |
| 129 | + class="list_inputType1" | |
| 130 | + placeholder="아이디를 입력해주세요" | |
| 131 | + onfocus="this.placeholder=''" | |
| 132 | + onblur="this.placeholder='아이디를 입력해주세요'" | |
| 133 | + onkeypress="press(event);" | |
| 134 | + maxlength="20"/> | |
| 135 | + </div> | |
| 136 | + | |
| 137 | + <div class="login_del"> | |
| 138 | + <button type="button" onclick="textClear('id_text2')" tabindex="-1"> | |
| 139 | + <img src="/publish/images/content/login_del.png" alt="입력 삭제"> | |
| 140 | + </button> | |
| 141 | + </div> | |
| 142 | + | |
| 143 | + </div> | |
| 144 | + | |
| 145 | + | |
| 146 | + <div class="input_list_item"> | |
| 147 | + <div class="input_left">비밀번호</div> | |
| 148 | + | |
| 149 | + <div class="input_right"> | |
| 150 | + <label for="password_text2" class="label">비밀번호 입력</label> | |
| 151 | + | |
| 152 | + <input type="password" | |
| 153 | + id="password_text2" | |
| 154 | + class="list_inputType1" | |
| 155 | + placeholder="비밀번호를 입력해주세요" | |
| 156 | + onfocus="this.placeholder=''" | |
| 157 | + onblur="this.placeholder='비밀번호를 입력해주세요'" | |
| 158 | + onkeypress="press(event);" | |
| 159 | + > | |
| 160 | + </div> | |
| 161 | + | |
| 162 | + <div class="login_del"> | |
| 163 | + | |
| 164 | + <button type="button" | |
| 165 | + onclick="fn_passView(this); return false;" | |
| 166 | + tabindex="-1"> | |
| 167 | + | |
| 168 | + <img id="passViewImg" | |
| 169 | + src="/publish/images/content/password_protect.png" | |
| 170 | + alt="비밀번호 보기"> | |
| 171 | + | |
| 172 | + </button> | |
| 173 | + | |
| 174 | + <button type="button" | |
| 175 | + onclick="textClear('password_text2')" | |
| 176 | + tabindex="-1"> | |
| 177 | + | |
| 178 | + <img src="/publish/images/content/login_del.png" | |
| 179 | + alt="입력 삭제"> | |
| 180 | + | |
| 181 | + </button> | |
| 182 | + | |
| 183 | + </div> | |
| 184 | + | |
| 185 | + </div> | |
| 186 | + | |
| 187 | + <div class="pass_no2" data-case="case01" id="credentials_error" style="display: none;"></div> | |
| 188 | + | |
| 189 | + <div class="mem_btnWrap2"> | |
| 190 | + <button type="button" class="btnType mem_btn5" data-case="case01" onclick="actionCredentials();">로그인</button> | |
| 191 | + </div> | |
| 192 | + | |
| 193 | + <div class="lgoin_bottom clearfix"> | |
| 194 | + <div> | |
| 195 | + <div class="checkbox_wrap"> | |
| 196 | + <input type="checkbox" id="checkId" name="checkId" title="아이디 저장" class="joinCheckbox type3"> | |
| 197 | + <label for="checkId">아이디 저장</label> | |
| 198 | + </div> | |
| 199 | + </div> | |
| 200 | + <ul> | |
| 201 | + <li><a href="/web/user/login/selectUserDept.do">회원가입</a></li> | |
| 202 | + <li class="SortLine"><a href="/web/user/findUserId.do">아이디찾기</a></li> | |
| 203 | + <li class="SortLine"><a href="/web/user/rePassword.do">비밀번호재설정</a></li> | |
| 204 | + </ul> | |
| 205 | + </div> | |
| 206 | + | |
| 207 | +</div> |
+++ src/main/webapp/WEB-INF/jsp/web/login/include/verification.jspf
... | ... | @@ -0,0 +1,527 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | + | |
| 3 | +<script type="text/javascript"> | |
| 4 | + const verificationState = { | |
| 5 | + sending: false, | |
| 6 | + verifying: false, | |
| 7 | + sent: false, | |
| 8 | + sentPhone: null, | |
| 9 | + resendRemaining: 3, | |
| 10 | + expireTimer: null, | |
| 11 | + cooldownTimer: null, | |
| 12 | + lockTimer: null | |
| 13 | + }; | |
| 14 | + | |
| 15 | + $(document).ready(function () { | |
| 16 | + $(".btn_auth_send").on("click", function () { | |
| 17 | + handleSendVerification($(this)); | |
| 18 | + }); | |
| 19 | + | |
| 20 | + $("#hp_text2").on("change", function () { | |
| 21 | + const phone = $(this).val(); | |
| 22 | + | |
| 23 | + if (verificationState.sent && verificationState.sentPhone !== phone) { | |
| 24 | + stopVerificationTimer(); | |
| 25 | + verificationState.sent = false; | |
| 26 | + verificationState.sentPhone = null; | |
| 27 | + | |
| 28 | + $("#num_text2").val(""); | |
| 29 | + $(".timer").hide(); | |
| 30 | + $(".cf_text").hide(); | |
| 31 | + hideVerificationError(); | |
| 32 | + } | |
| 33 | + }); | |
| 34 | + | |
| 35 | + $(".btn_kmc_phone_reset").on("click", function () { | |
| 36 | + startKmcPhoneReset($(this)); | |
| 37 | + }); | |
| 38 | + }); | |
| 39 | + | |
| 40 | + var kmcPhoneResetWindow = null; | |
| 41 | + | |
| 42 | + function startKmcPhoneReset($button) { | |
| 43 | + if ($button.prop("disabled")) { | |
| 44 | + return; | |
| 45 | + } | |
| 46 | + | |
| 47 | + kmcPhoneResetWindow = window.open( | |
| 48 | + "", | |
| 49 | + "KMCISWindow", | |
| 50 | + "width=425,height=550,resizable=0,scrollbars=no,status=0,titlebar=0,toolbar=0,left=435,top=250" | |
| 51 | + ); | |
| 52 | + | |
| 53 | + if (!kmcPhoneResetWindow) { | |
| 54 | + alert("팝업 차단을 해제한 후 다시 시도해주세요."); | |
| 55 | + return; | |
| 56 | + } | |
| 57 | + | |
| 58 | + $button.prop("disabled", true); | |
| 59 | + | |
| 60 | + $.ajax({ | |
| 61 | + url: "<c:url value='/web/cert/resetPhoneRequest.do' />", | |
| 62 | + type: "POST", | |
| 63 | + dataType: "json", | |
| 64 | + success: function (data) { | |
| 65 | + if (!data || !data.tr_cert || !data.tr_url) { | |
| 66 | + if (kmcPhoneResetWindow && !kmcPhoneResetWindow.closed) { | |
| 67 | + kmcPhoneResetWindow.close(); | |
| 68 | + } | |
| 69 | + alert(data && (data.message || data.object) | |
| 70 | + ? (data.message || data.object) | |
| 71 | + : "KMC 인증 요청 생성에 실패했습니다."); | |
| 72 | + return; | |
| 73 | + } | |
| 74 | + | |
| 75 | + var form = document.kmcPhoneResetForm; | |
| 76 | + form.tr_cert.value = data.tr_cert; | |
| 77 | + form.tr_url.value = data.tr_url; | |
| 78 | + form.tr_add.value = data.tr_add || "N"; | |
| 79 | + form.target = "KMCISWindow"; | |
| 80 | + form.action = "https://www.kmcert.com/kmcis/web/kmcisReq.jsp"; | |
| 81 | + form.submit(); | |
| 82 | + }, | |
| 83 | + error: function (xhr) { | |
| 84 | + if (kmcPhoneResetWindow && !kmcPhoneResetWindow.closed) { | |
| 85 | + kmcPhoneResetWindow.close(); | |
| 86 | + } | |
| 87 | + | |
| 88 | + var message = "KMC 인증 요청 중 오류가 발생했습니다."; | |
| 89 | + if (xhr.responseJSON && (xhr.responseJSON.message || xhr.responseJSON.object)) { | |
| 90 | + message = xhr.responseJSON.message || xhr.responseJSON.object; | |
| 91 | + } | |
| 92 | + alert(message); | |
| 93 | + }, | |
| 94 | + complete: function () { | |
| 95 | + $button.prop("disabled", false); | |
| 96 | + } | |
| 97 | + }); | |
| 98 | + } | |
| 99 | + | |
| 100 | + function completeKmcPhoneReset(success, message, phoneNo) { | |
| 101 | + if (!success) { | |
| 102 | + alert(message || "본인인증 처리에 실패했습니다."); | |
| 103 | + return; | |
| 104 | + } | |
| 105 | + | |
| 106 | + $(".change_number_popup .popup_heading .tooltip-close").trigger("click"); | |
| 107 | + | |
| 108 | + stopVerificationTimer(); | |
| 109 | + stopResendCooldown(); | |
| 110 | + verificationState.sent = false; | |
| 111 | + verificationState.sentPhone = null; | |
| 112 | + verificationState.resendRemaining = 3; | |
| 113 | + $("#num_text2").val(""); | |
| 114 | + $(".timer").hide(); | |
| 115 | + $(".btn_auth_send") | |
| 116 | + .prop("disabled", false) | |
| 117 | + .removeClass("disabled") | |
| 118 | + .text("인증번호 받기"); | |
| 119 | + | |
| 120 | + callMemberCertPhoneList($("#userId").val(), phoneNo); | |
| 121 | + hideVerificationError(); | |
| 122 | + $(".cf_text") | |
| 123 | + .show() | |
| 124 | + .html("휴대폰번호가 변경되었습니다. 변경된 번호로 인증번호를 받아 재인증해주세요.") | |
| 125 | + .removeClass("c_e40000") | |
| 126 | + .addClass("c_002c9a"); | |
| 127 | + } | |
| 128 | + | |
| 129 | + function callMemberCertPhoneList(userId, selectedPhone) { | |
| 130 | + $.ajax({ | |
| 131 | + url: "/web/cert/phoneList.do", | |
| 132 | + type: "POST", | |
| 133 | + data: { userId: userId }, | |
| 134 | + dataType: "json", | |
| 135 | + success: function (response) { | |
| 136 | + initVerification(response); | |
| 137 | + if (selectedPhone) { | |
| 138 | + $("#hp_text2").val(selectedPhone); | |
| 139 | + } | |
| 140 | + }, | |
| 141 | + error: function (request, status, error) { | |
| 142 | + console.error("callMemberCertPhoneList error", request, status, error); | |
| 143 | + } | |
| 144 | + }); | |
| 145 | + } | |
| 146 | + | |
| 147 | + function initVerification(phoneList) { | |
| 148 | + const $select = $("#hp_text2"); | |
| 149 | + $select.empty(); | |
| 150 | + | |
| 151 | + if (!phoneList) { | |
| 152 | + return; | |
| 153 | + } | |
| 154 | + | |
| 155 | + phoneList.forEach(function (item, index) { | |
| 156 | + $select.append( | |
| 157 | + $("<option>", { | |
| 158 | + value: item.mbtlnum, | |
| 159 | + text: item.mbtlnum + (index === 0 ? " (기본)" : " (추가)") | |
| 160 | + }) | |
| 161 | + ); | |
| 162 | + }); | |
| 163 | + } | |
| 164 | + | |
| 165 | + async function handleSendVerification($button) { | |
| 166 | + if (verificationState.sending) { | |
| 167 | + return; | |
| 168 | + } | |
| 169 | + | |
| 170 | + const phone = $("#hp_text2").val(); | |
| 171 | + | |
| 172 | + if (!phone) { | |
| 173 | + showVerificationError("휴대폰 번호를 선택해주세요."); | |
| 174 | + return; | |
| 175 | + } | |
| 176 | + | |
| 177 | + if (verificationState.sent && verificationState.resendRemaining <= 0) { | |
| 178 | + showVerificationError("인증번호 재발송 가능 횟수를 초과했습니다."); | |
| 179 | + return; | |
| 180 | + } | |
| 181 | + | |
| 182 | + verificationState.sending = true; | |
| 183 | + hideVerificationError(); | |
| 184 | + $button.prop("disabled", true).addClass("disabled"); | |
| 185 | + | |
| 186 | + try { | |
| 187 | + const checkResult = await checkVerificationSendAvailable(phone); | |
| 188 | + | |
| 189 | + if (!checkResult || !checkResult.compare) { | |
| 190 | + if (checkResult && checkResult.locked) { | |
| 191 | + disableSecondAuthInputs(checkResult.lockSeconds || 300); | |
| 192 | + } | |
| 193 | + throw new Error( | |
| 194 | + checkResult && checkResult.message | |
| 195 | + ? checkResult.message | |
| 196 | + : "인증번호 재발송은 30초마다 가능합니다." | |
| 197 | + ); | |
| 198 | + } | |
| 199 | + | |
| 200 | + const sendResult = await requestVerificationCode(phone); | |
| 201 | + | |
| 202 | + if (!sendResult || sendResult.result !== "success") { | |
| 203 | + if (sendResult && sendResult.locked) { | |
| 204 | + disableSecondAuthInputs(sendResult.lockSeconds || 300); | |
| 205 | + } | |
| 206 | + throw new Error( | |
| 207 | + sendResult && sendResult.message | |
| 208 | + ? sendResult.message | |
| 209 | + : "인증번호 발송에 실패했습니다." | |
| 210 | + ); | |
| 211 | + } | |
| 212 | + | |
| 213 | + verificationState.sent = true; | |
| 214 | + verificationState.sentPhone = phone; | |
| 215 | + verificationState.resendRemaining = | |
| 216 | + typeof sendResult.resendRemaining === "number" | |
| 217 | + ? sendResult.resendRemaining | |
| 218 | + : verificationState.resendRemaining; | |
| 219 | + | |
| 220 | + $("#msgId").val(sendResult.resultMsgId || ""); | |
| 221 | + $("#num_text2").val(""); | |
| 222 | + | |
| 223 | + showSendSuccess(); | |
| 224 | + startVerificationTimer(180); | |
| 225 | + startResendCooldown($button, 30); | |
| 226 | + } catch (error) { | |
| 227 | + console.error("handleSendVerification error", error); | |
| 228 | + | |
| 229 | + showVerificationError( | |
| 230 | + error.message || "인증번호 발송 중 오류가 발생했습니다." | |
| 231 | + ); | |
| 232 | + | |
| 233 | + $button.prop("disabled", false).removeClass("disabled"); | |
| 234 | + } finally { | |
| 235 | + verificationState.sending = false; | |
| 236 | + } | |
| 237 | + } | |
| 238 | + | |
| 239 | + function checkVerificationSendAvailable(phone) { | |
| 240 | + document.checkForm.receive.value = phone; | |
| 241 | + | |
| 242 | + return $.ajax({ | |
| 243 | + url: "<c:url value='/web/user/sendSysMsgSelectAjax.do' />", | |
| 244 | + type: "POST", | |
| 245 | + data: $("form[name=checkForm]").serialize(), | |
| 246 | + dataType: "json" | |
| 247 | + }); | |
| 248 | + } | |
| 249 | + | |
| 250 | + function requestVerificationCode(phone) { | |
| 251 | + document.checkForm.callTo.value = phone; | |
| 252 | + | |
| 253 | + return $.ajax({ | |
| 254 | + url: "<c:url value='/web/user/sendSysMsgDataAjax.do' />", | |
| 255 | + type: "POST", | |
| 256 | + data: $("form[name=checkForm]").serialize(), | |
| 257 | + dataType: "json" | |
| 258 | + }); | |
| 259 | + } | |
| 260 | + | |
| 261 | + function showSendSuccess() { | |
| 262 | + hideVerificationError(); | |
| 263 | + | |
| 264 | + $(".cf_text") | |
| 265 | + .show() | |
| 266 | + .html( | |
| 267 | + "인증번호를 발송했습니다. 3분 이내에 입력해주세요. " + | |
| 268 | + "(남은 재발송 <b>" + verificationState.resendRemaining + "</b>회)" | |
| 269 | + ) | |
| 270 | + .removeClass("c_e40000") | |
| 271 | + .addClass("c_002c9a"); | |
| 272 | + } | |
| 273 | + | |
| 274 | + function startVerificationTimer(seconds) { | |
| 275 | + stopVerificationTimer(); | |
| 276 | + | |
| 277 | + let remaining = seconds; | |
| 278 | + | |
| 279 | + $(".timer").show(); | |
| 280 | + renderVerificationTimer(remaining); | |
| 281 | + | |
| 282 | + verificationState.expireTimer = setInterval(function () { | |
| 283 | + remaining--; | |
| 284 | + | |
| 285 | + if (remaining <= 0) { | |
| 286 | + renderVerificationTimer(0); | |
| 287 | + stopVerificationTimer(); | |
| 288 | + | |
| 289 | + $(".timer").hide(); | |
| 290 | + $(".cf_text") | |
| 291 | + .show() | |
| 292 | + .html( | |
| 293 | + "입력 시간이 지났습니다. 새로운 인증번호를 받아주세요. " + | |
| 294 | + "(남은 재발송 <b>" + verificationState.resendRemaining + "</b>회)" | |
| 295 | + ) | |
| 296 | + .removeClass("c_002c9a") | |
| 297 | + .addClass("c_e40000"); | |
| 298 | + | |
| 299 | + return; | |
| 300 | + } | |
| 301 | + | |
| 302 | + renderVerificationTimer(remaining); | |
| 303 | + }, 1000); | |
| 304 | + } | |
| 305 | + | |
| 306 | + function renderVerificationTimer(time) { | |
| 307 | + const min = String(Math.floor(time / 60)).padStart(2, "0"); | |
| 308 | + const sec = String(time % 60).padStart(2, "0"); | |
| 309 | + | |
| 310 | + $("#timer").text(min + ":" + sec); | |
| 311 | + } | |
| 312 | + | |
| 313 | + function stopVerificationTimer() { | |
| 314 | + if (verificationState.expireTimer !== null) { | |
| 315 | + clearInterval(verificationState.expireTimer); | |
| 316 | + verificationState.expireTimer = null; | |
| 317 | + } | |
| 318 | + } | |
| 319 | + | |
| 320 | + function startResendCooldown($button, seconds) { | |
| 321 | + stopResendCooldown(); | |
| 322 | + | |
| 323 | + let remaining = seconds; | |
| 324 | + | |
| 325 | + $button.prop("disabled", true).addClass("disabled"); | |
| 326 | + | |
| 327 | + verificationState.cooldownTimer = setInterval(function () { | |
| 328 | + remaining--; | |
| 329 | + | |
| 330 | + if (remaining <= 0) { | |
| 331 | + stopResendCooldown(); | |
| 332 | + | |
| 333 | + if (verificationState.resendRemaining > 0) { | |
| 334 | + $button.prop("disabled", false).removeClass("disabled").text("재전송"); | |
| 335 | + } else { | |
| 336 | + $button.prop("disabled", true).addClass("disabled").text("재전송 불가"); | |
| 337 | + } | |
| 338 | + | |
| 339 | + return; | |
| 340 | + } | |
| 341 | + | |
| 342 | + $button.text("재전송 (" + remaining + ")"); | |
| 343 | + }, 1000); | |
| 344 | + } | |
| 345 | + | |
| 346 | + function stopResendCooldown() { | |
| 347 | + if (verificationState.cooldownTimer !== null) { | |
| 348 | + clearInterval(verificationState.cooldownTimer); | |
| 349 | + verificationState.cooldownTimer = null; | |
| 350 | + } | |
| 351 | + } | |
| 352 | + | |
| 353 | + function actionVerification() { | |
| 354 | + if (verificationState.verifying) { | |
| 355 | + return; | |
| 356 | + } | |
| 357 | + | |
| 358 | + const phone = $("#hp_text2").val(); | |
| 359 | + const number = $.trim($("#num_text2").val()); | |
| 360 | + | |
| 361 | + if (!number) { | |
| 362 | + showVerificationError("인증번호를 입력해주세요."); | |
| 363 | + $("#num_text2").focus(); | |
| 364 | + return; | |
| 365 | + } | |
| 366 | + | |
| 367 | + if (!/^\d{6}$/.test(number)) { | |
| 368 | + showVerificationError("인증번호 숫자 6자리를 입력해주세요."); | |
| 369 | + $("#num_text2").focus(); | |
| 370 | + return; | |
| 371 | + } | |
| 372 | + | |
| 373 | + document.loginForm2.hp.value = phone; | |
| 374 | + document.loginForm2.num.value = number; | |
| 375 | + | |
| 376 | + verificationState.verifying = true; | |
| 377 | + hideVerificationError(); | |
| 378 | + | |
| 379 | + $.ajax({ | |
| 380 | + url: "<c:url value='/web/user/login/verifySecondAuthAjax.do' />", | |
| 381 | + type: "POST", | |
| 382 | + dataType: "json", | |
| 383 | + data: { | |
| 384 | + hp: phone, | |
| 385 | + num: number, | |
| 386 | + msgId: $("#msgId").val() | |
| 387 | + }, | |
| 388 | + success: function (data) { | |
| 389 | + if (data.status === "success") { | |
| 390 | + saveid(document.loginForm2); | |
| 391 | + document.loginForm2.action = "<c:url value='/web/user/login/actionSecurityLoginAfterHp.do'/>"; | |
| 392 | + document.loginForm2.submit(); | |
| 393 | + return; | |
| 394 | + } | |
| 395 | + | |
| 396 | + showVerificationError(data.message || "인증번호가 일치하지 않습니다."); | |
| 397 | + if (data.locked) { | |
| 398 | + disableSecondAuthInputs(data.lockSeconds || 300); | |
| 399 | + } | |
| 400 | + }, | |
| 401 | + error: function () { | |
| 402 | + showVerificationError("인증 처리 중 오류가 발생했습니다."); | |
| 403 | + }, | |
| 404 | + complete: function () { | |
| 405 | + verificationState.verifying = false; | |
| 406 | + } | |
| 407 | + }); | |
| 408 | + } | |
| 409 | + | |
| 410 | + function disableSecondAuthInputs(seconds) { | |
| 411 | + stopVerificationTimer(); | |
| 412 | + stopResendCooldown(); | |
| 413 | + if (verificationState.lockTimer !== null) { | |
| 414 | + clearTimeout(verificationState.lockTimer); | |
| 415 | + } | |
| 416 | + $("#hp_text2, #num_text2, .btn_auth_send, .mem_btnWrap2 .mem_btn5") | |
| 417 | + .prop("disabled", true) | |
| 418 | + .addClass("disabled"); | |
| 419 | + | |
| 420 | + verificationState.lockTimer = setTimeout(function () { | |
| 421 | + verificationState.lockTimer = null; | |
| 422 | + verificationState.sent = false; | |
| 423 | + verificationState.sentPhone = null; | |
| 424 | + verificationState.resendRemaining = 3; | |
| 425 | + $("#hp_text2, #num_text2, .btn_auth_send, .mem_btnWrap2 .mem_btn5") | |
| 426 | + .prop("disabled", false) | |
| 427 | + .removeClass("disabled"); | |
| 428 | + $(".btn_auth_send").text("인증번호 받기"); | |
| 429 | + showVerificationError("로그인 제한이 해제되었습니다. 새로운 인증번호를 받아주세요."); | |
| 430 | + }, (seconds || 300) * 1000); | |
| 431 | + } | |
| 432 | + | |
| 433 | + function showVerificationError(message) { | |
| 434 | + $(".cf_text").hide(); | |
| 435 | + $("#verification_error").html("<i></i><p>" + message + "</p>").show(); | |
| 436 | + } | |
| 437 | + | |
| 438 | + function hideVerificationError() { | |
| 439 | + $("#verification_error").hide(); | |
| 440 | + } | |
| 441 | + | |
| 442 | + function saveid(form) { | |
| 443 | + const expdate = new Date(); | |
| 444 | + | |
| 445 | + if (form.checkId.checked) { | |
| 446 | + expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 30); | |
| 447 | + } else { | |
| 448 | + expdate.setTime(expdate.getTime() - 1); | |
| 449 | + } | |
| 450 | + | |
| 451 | + setCookie("ncms_saveid", form.id_text2.value, expdate); | |
| 452 | + } | |
| 453 | +</script> | |
| 454 | + | |
| 455 | +<div class="tooltip-wrap"> | |
| 456 | + <div class="popup-com change_number_popup" data-tooltip-con="change_number_popup" data-focus="change_number_popup" data-focus-prev="change_number_popup-close" style="width:540px;"> | |
| 457 | + <div class="popup_heading"> | |
| 458 | + <p>가입번호 변경 안내</p> | |
| 459 | + <button type="button" class="tooltip-close" data-focus="change_number_popup-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 460 | + </div> | |
| 461 | + | |
| 462 | + <div class="layer_in" style="padding:30px;"> | |
| 463 | + <p class="title_text">가입 휴대폰번호가 변경되셨나요?</p> | |
| 464 | + | |
| 465 | + <span class="sub_text"> | |
| 466 | + 등록된 번호로 인증이 어려운 경우, 가입자 본인 명의 휴대폰으로<br> | |
| 467 | + 본인인증(PASS)을 하시면 변경된 번호로 갱신 및 해당번호로<br> | |
| 468 | + 인증을 다시 받을 수 있습니다. | |
| 469 | + </span> | |
| 470 | + | |
| 471 | + <p class="gray_box fill" style="margin:16px 0 0 0;"> | |
| 472 | + ※ 가입자 본인 명의의 휴대폰으로만 인증할 수 있습니다.<br> | |
| 473 | + ※ 인증 완료 시 가입 휴대폰번호와 보안로그인 기본 번호가 함께<br> | |
| 474 | +   변경됩니다. | |
| 475 | + </p> | |
| 476 | + | |
| 477 | + <div class="popup_btn" style="margin:30px 0 0 0;"> | |
| 478 | + <button type="button" class="btnType btnType2 tooltip-close btn_kmc_phone_reset">본인인증하기</button> | |
| 479 | + <button type="button" class="btnType fill_gray tooltip-close">취소</button> | |
| 480 | + </div> | |
| 481 | + </div> | |
| 482 | + </div> | |
| 483 | +</div> | |
| 484 | + | |
| 485 | +<div id="verification_frame" style="display:none;"> | |
| 486 | + <div class="input_list_item"> | |
| 487 | + <div class="input_left">휴대폰번호</div> | |
| 488 | + | |
| 489 | + <div class="input_right"> | |
| 490 | + <label for="hp_text2" class="label">휴대폰번호</label> | |
| 491 | + <select id="hp_text2" class="list_selType1" style="width:70%;"></select> | |
| 492 | + </div> | |
| 493 | + | |
| 494 | + <div class="login_del"> | |
| 495 | + <button type="button" class="btnType btnType3 btn_auth_send">인증번호 받기</button> | |
| 496 | + </div> | |
| 497 | + </div> | |
| 498 | + | |
| 499 | + <div class="input_list_item"> | |
| 500 | + <div class="input_left">인증번호 입력</div> | |
| 501 | + | |
| 502 | + <div class="input_right"> | |
| 503 | + <label for="num_text2" class="label">인증번호 입력</label> | |
| 504 | + <input type="text" id="num_text2" class="list_inputType1" placeholder="인증번호를 입력해주세요" maxlength="6" inputmode="numeric" autocomplete="one-time-code" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호를 입력해주세요'" onkeypress="if(event.keyCode === 13) { actionVerification(); return false; }"> | |
| 505 | + <div id="timer" class="timer" style="display:none;"></div> | |
| 506 | + </div> | |
| 507 | + | |
| 508 | + <div class="login_del"> | |
| 509 | + <button type="button" onclick="textClear('num_text2')" tabindex="-1"><img src="/publish/images/content/login_del.png" alt="입력 삭제"></button> | |
| 510 | + </div> | |
| 511 | + </div> | |
| 512 | + | |
| 513 | + <div id="verification_error" class="pass_no2" style="display:none;"> | |
| 514 | + <i></i> | |
| 515 | + <p></p> | |
| 516 | + </div> | |
| 517 | + | |
| 518 | + <div class="mem_bottom"> | |
| 519 | + <p class="cf_text" style="display:none;">휴대폰번호로 전송된 인증번호를 입력해주세요.</p> | |
| 520 | + </div> | |
| 521 | + | |
| 522 | + <div class="mem_btnWrap2"> | |
| 523 | + <button type="button" class="mem_btn5" onclick="actionVerification(); return false;">확인</button> | |
| 524 | + </div> | |
| 525 | + | |
| 526 | + <button type="button" class="btn_text btn_change_phone" data-tooltip="change_number_popup">가입 휴대폰번호가 변경된 경우?</button> | |
| 527 | +</div> |
+++ src/main/webapp/WEB-INF/jsp/web/login/login.jsp
... | ... | @@ -0,0 +1,155 @@ |
| 1 | +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> | |
| 4 | + | |
| 5 | +<link rel="stylesheet" href="/publish/css/mem.css"> | |
| 6 | + | |
| 7 | +<script src="/publish/js/content.js"></script> | |
| 8 | +<script src="/js/RSA/rsa.js"></script> | |
| 9 | +<script src="/js/RSA/jsbn.js"></script> | |
| 10 | +<script src="/js/RSA/prng4.js"></script> | |
| 11 | +<script src="/js/RSA/rng.js"></script> | |
| 12 | + | |
| 13 | +<script type="text/javascript"> | |
| 14 | + | |
| 15 | + $(document).ready(function () { | |
| 16 | + getId(document.loginForm2); | |
| 17 | + | |
| 18 | + <c:if test="${headerLoginResult ne 'N'}"> | |
| 19 | + headerLoginResult("<c:out value='${headerLoginResult}'/>"); | |
| 20 | + </c:if> | |
| 21 | + }); | |
| 22 | + | |
| 23 | + function getId(form) { | |
| 24 | + if (getCookie("ncms_saveid") !== "") { | |
| 25 | + form.checkId.checked = (form.id_text2.value = getCookie("ncms_saveid")); | |
| 26 | + } | |
| 27 | + } | |
| 28 | + | |
| 29 | + function showCredentials() { | |
| 30 | + $("#credentials_frame").show(); | |
| 31 | + $("#verification_frame").hide(); | |
| 32 | + } | |
| 33 | + | |
| 34 | + function showVerification() { | |
| 35 | + $("#subText").show(); | |
| 36 | + $("#badge").show(); | |
| 37 | + $("#credentials_frame").hide(); | |
| 38 | + $("#verification_frame").show(); | |
| 39 | + } | |
| 40 | + | |
| 41 | + function setEncrypted() { | |
| 42 | + const id = $("#id_text2").val(); | |
| 43 | + const password = $("#password_text2").val(); | |
| 44 | + | |
| 45 | + const rsa = new RSAKey(); | |
| 46 | + rsa.setPublic($("#RSAModulus2").val(), $("#RSAExponent2").val()); | |
| 47 | + | |
| 48 | + document.loginForm2.id.value = rsa.encrypt(id.toLowerCase()); | |
| 49 | + document.loginForm2.password.value = rsa.encrypt(password); | |
| 50 | + } | |
| 51 | + | |
| 52 | + function headerLoginResult(headerLoginResult) { | |
| 53 | + if (headerLoginResult === 'secure') { | |
| 54 | + const userId = $("#userId").val(); | |
| 55 | + | |
| 56 | + document.loginForm2.id_text2.value = "<c:out value='${id_secure}'/>"; | |
| 57 | + document.loginForm2.password_text2.value = "<c:out value='${pw_secure}'/>"; | |
| 58 | + setEncrypted(); | |
| 59 | + showVerification(); | |
| 60 | + callMemberCertPhoneList(userId); | |
| 61 | + } else { | |
| 62 | + showCredentials(); | |
| 63 | + showCredentialsError(headerLoginResult); | |
| 64 | + if (headerLoginResult.indexOf("5회 이상 로그인에 실패") === 0) { | |
| 65 | + $("#credentials_frame .mem_btn5") | |
| 66 | + .prop("disabled", true) | |
| 67 | + .addClass("disabled"); | |
| 68 | + } | |
| 69 | + } | |
| 70 | + } | |
| 71 | + | |
| 72 | +</script> | |
| 73 | + | |
| 74 | +<div class="inner"> | |
| 75 | + <form:form id="loginForm2" name="loginForm2" method="post"> | |
| 76 | + | |
| 77 | + <input type="hidden" name="beforeUrl" value="<c:out value='/web/user/login/login.do'/>"/> | |
| 78 | + <input type="hidden" name="userSe" value="USR"/> | |
| 79 | + | |
| 80 | + <input type="hidden" id="RSAModulus2" value="${RSAModulus}"/> | |
| 81 | + <input type="hidden" id="RSAExponent2" value="${RSAExponent}"/> | |
| 82 | + | |
| 83 | + <input type="hidden" id="id" name="id"/> | |
| 84 | + <input type="hidden" id="password" name="password"/> | |
| 85 | + | |
| 86 | + <input type="hidden" name="goEventPay" value="${goEventPay}"/> | |
| 87 | + | |
| 88 | + <input type="hidden" id="hp" name="hp"/> | |
| 89 | + <input type="hidden" id="num" name="num"/> | |
| 90 | + <input type="hidden" id="msgId" name="msgId"/> | |
| 91 | + | |
| 92 | + | |
| 93 | + <div class="send_top"> | |
| 94 | + <div class="mypage_content current"> | |
| 95 | + <div class="heading"> | |
| 96 | + <h2>로그인</h2> | |
| 97 | + </div> | |
| 98 | + | |
| 99 | + <div class="mem_cont_in widthS login_wrap security_login"> | |
| 100 | + <div class="input_list"> | |
| 101 | + <p class="welcome"> | |
| 102 | + <span>문자온</span>에 오신것을 환영합니다.<br> | |
| 103 | + <span class="c_222 fwMd">로그인</span>해주세요. | |
| 104 | + <span id="subText" class="sub_text" style="display:none;"> | |
| 105 | + 안전한 서비스 이용을 위해 등록된 휴대폰번호로 인증을 진행해주세요. | |
| 106 | + </span> | |
| 107 | + </p> | |
| 108 | + <div id="badge" class="badge yellow" style="display:none;"> | |
| 109 | + <i>!</i> | |
| 110 | + 보안 강화를 위해 모든 계정에 2차 인증(보안로그인)이 상시 적용됩니다. | |
| 111 | + </div> | |
| 112 | + <%@ include file="include/credentials.jspf" %> | |
| 113 | + <%@ include file="include/verification.jspf" %> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + | |
| 117 | + </div> | |
| 118 | + </div> | |
| 119 | + | |
| 120 | + </form:form> | |
| 121 | + | |
| 122 | + <form name="kmcPhoneResetForm" method="post" action="#"> | |
| 123 | + <input type="hidden" name="tr_cert" value=""/> | |
| 124 | + <input type="hidden" name="tr_url" value=""/> | |
| 125 | + <input type="hidden" name="tr_add" value="N"/> | |
| 126 | + <input type="hidden" name="tr_ver" value="V2"/> | |
| 127 | + </form> | |
| 128 | + | |
| 129 | + | |
| 130 | + <%-- SMS 인증번호 발송용 --%> | |
| 131 | + <form name="checkForm" | |
| 132 | + id="checkForm" | |
| 133 | + method="post" | |
| 134 | + action="#"> | |
| 135 | + | |
| 136 | + <input type="hidden" name="searchNm" value=""/> | |
| 137 | + <input type="hidden" id="userId" name="userId" value="${id_secure}"/> | |
| 138 | + <input type="hidden" name="callTo" value=""/> | |
| 139 | + <input type="hidden" name="receive" value=""/> | |
| 140 | + <input type="hidden" name="securityLogin" value="Y"/> | |
| 141 | + | |
| 142 | + </form> | |
| 143 | + | |
| 144 | + | |
| 145 | + <%-- 기업회원 처리용 --%> | |
| 146 | + <form name="cmpChangeForm" | |
| 147 | + id="cmpChangeForm" | |
| 148 | + method="post" | |
| 149 | + action="#"> | |
| 150 | + | |
| 151 | + <input type="hidden" name="mberId" value=""/> | |
| 152 | + | |
| 153 | + </form> | |
| 154 | + | |
| 155 | +</div> |
--- src/main/webapp/WEB-INF/jsp/web/login/new_usrInsertView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/login/new_usrInsertView.jsp
... | ... | @@ -717,13 +717,10 @@ |
| 717 | 717 |
function fnInsertJoin(){
|
| 718 | 718 |
var joinfrm = document.joinForm; |
| 719 | 719 |
var id = $("#mberId").val();
|
| 720 |
- var pw = $("#passwordCheck").val();
|
|
| 721 |
- $("#joinId").val(id);
|
|
| 722 |
- $("#joinPassword").val(pw);
|
|
| 723 |
- |
|
| 724 |
- //개인회원은 바로 로그인 처리, 기업회원은 회원가입 심사로 인한 로그인 미처리 |
|
| 720 |
+ |
|
| 721 |
+ // 자동 로그인 없이 가입 유형별 완료 화면으로 이동 |
|
| 725 | 722 |
if(document.mberManageVO.dept.value != 'c'){
|
| 726 |
- joinfrm.action="<c:url value='/web/user/login/actionSecurityJoinLogin.do'/>"; |
|
| 723 |
+ joinfrm.action="<c:url value='/web/user/login/usrJoinComplete.do'/>"; |
|
| 727 | 724 |
}else{
|
| 728 | 725 |
joinfrm.action="<c:url value='/web/user/login/usrJoinMemShipComplete.do'/>"; |
| 729 | 726 |
} |
... | ... | @@ -1329,8 +1326,6 @@ |
| 1329 | 1326 |
<input type="hidden" name="mberNm" /> |
| 1330 | 1327 |
<input type="hidden" name="mberId" /> |
| 1331 | 1328 |
<input type="hidden" name="dept" /> |
| 1332 |
- <input type="hidden" id="joinId" name="id"> |
|
| 1333 |
- <input type="hidden" id="joinPassword" name="password"> |
|
| 1334 | 1329 |
|
| 1335 | 1330 |
</form> |
| 1336 | 1331 |
<!-- <form name="joinForm" action="/web/user/login/usrJoinComplete.do" method="post"> |
+++ src/main/webapp/WEB-INF/jsp/web/login/resetPhoneKmcResult.jsp
... | ... | @@ -0,0 +1,30 @@ |
| 1 | +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> | |
| 2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| 3 | +<!doctype html> | |
| 4 | +<html lang="ko"> | |
| 5 | +<head> | |
| 6 | + <meta charset="utf-8"/> | |
| 7 | + <meta name="robots" content="noindex,nofollow"/> | |
| 8 | + <title>휴대폰번호 변경 본인인증</title> | |
| 9 | +</head> | |
| 10 | +<body | |
| 11 | + data-success="<c:out value='${success}'/>" | |
| 12 | + data-message="<c:out value='${message}'/>" | |
| 13 | + data-phone-no="<c:out value='${phoneNo}'/>"> | |
| 14 | +<script> | |
| 15 | + (function () { | |
| 16 | + var success = document.body.getAttribute("data-success") === "Y"; | |
| 17 | + var message = document.body.getAttribute("data-message"); | |
| 18 | + var phoneNo = document.body.getAttribute("data-phone-no"); | |
| 19 | + | |
| 20 | + if (window.opener && !window.opener.closed | |
| 21 | + && typeof window.opener.completeKmcPhoneReset === "function") { | |
| 22 | + window.opener.completeKmcPhoneReset(success, message, phoneNo); | |
| 23 | + } else { | |
| 24 | + alert(message); | |
| 25 | + } | |
| 26 | + window.close(); | |
| 27 | + }()); | |
| 28 | +</script> | |
| 29 | +</body> | |
| 30 | +</html> |
--- src/main/webapp/WEB-INF/jsp/web/login/usrInserCompl.jsp
+++ src/main/webapp/WEB-INF/jsp/web/login/usrInserCompl.jsp
... | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 |
<div class="text_bottom"> |
| 71 | 71 |
<div> |
| 72 | 72 |
<p>아이디</p> |
| 73 |
- <p><c:out value="${mberManageVO.id}" /></p>
|
|
| 73 |
+ <p><c:out value="${mberManageVO.mberId}" /></p>
|
|
| 74 | 74 |
</div> |
| 75 | 75 |
<div> |
| 76 | 76 |
<p>이름</p> |
--- src/main/webapp/WEB-INF/jsp/web/login/usrInsertView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/login/usrInsertView.jsp
... | ... | @@ -603,13 +603,10 @@ |
| 603 | 603 |
function fnInsertJoin(){
|
| 604 | 604 |
var joinfrm = document.joinForm; |
| 605 | 605 |
var id = $("#mberId").val();
|
| 606 |
- var pw = $("#passwordCheck").val();
|
|
| 607 |
- $("#joinId").val(id);
|
|
| 608 |
- $("#joinPassword").val(pw);
|
|
| 609 |
- |
|
| 610 |
- //개인회원은 바로 로그인 처리, 기업회원은 회원가입 심사로 인한 로그인 미처리 |
|
| 606 |
+ |
|
| 607 |
+ // 자동 로그인 없이 가입 유형별 완료 화면으로 이동 |
|
| 611 | 608 |
if(document.mberManageVO.dept.value != 'c'){
|
| 612 |
- joinfrm.action="<c:url value='/web/user/login/actionSecurityJoinLogin.do'/>"; |
|
| 609 |
+ joinfrm.action="<c:url value='/web/user/login/usrJoinComplete.do'/>"; |
|
| 613 | 610 |
}else{
|
| 614 | 611 |
joinfrm.action="<c:url value='/web/user/login/usrJoinMemShipComplete.do'/>"; |
| 615 | 612 |
} |
... | ... | @@ -1209,8 +1206,6 @@ |
| 1209 | 1206 |
<input type="hidden" name="mberNm" /> |
| 1210 | 1207 |
<input type="hidden" name="mberId" /> |
| 1211 | 1208 |
<input type="hidden" name="dept" /> |
| 1212 |
- <input type="hidden" id="joinId" name="id"> |
|
| 1213 |
- <input type="hidden" id="joinPassword" name="password"> |
|
| 1214 | 1209 |
|
| 1215 | 1210 |
</form> |
| 1216 | 1211 |
<!-- <form name="joinForm" action="/web/user/login/usrJoinComplete.do" method="post"> |
--- src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp
+++ src/main/webapp/WEB-INF/jsp/web/main/mainPage.jsp
... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 |
|
| 19 | 19 |
<script type="text/javascript"> |
| 20 | 20 |
let cookieCache = null; // 쿠키 데이터를 캐시할 변수 |
| 21 |
+const currentSessionId = '<%= session.getId() %>'; |
|
| 22 |
+const apiPopupStorageKey = 'apiMsgApprovalPopup'; |
|
| 21 | 23 |
|
| 22 | 24 |
$(document).ready(function() {
|
| 23 | 25 |
// http => https 로 이동 |
... | ... | @@ -230,6 +232,8 @@ |
| 230 | 232 |
setTimeout(function () {
|
| 231 | 233 |
hidePopupByCookie(); |
| 232 | 234 |
}, 300); |
| 235 |
+ |
|
| 236 |
+ showApiApprovalPopup(); |
|
| 233 | 237 |
}); |
| 234 | 238 |
|
| 235 | 239 |
/* ******************************************************** |
... | ... | @@ -1025,7 +1029,22 @@ |
| 1025 | 1029 |
}); |
| 1026 | 1030 |
} |
| 1027 | 1031 |
|
| 1028 |
- |
|
| 1032 |
+function closeApiApprovalPopup(button) {
|
|
| 1033 |
+ sessionStorage.setItem(apiPopupStorageKey, currentSessionId); |
|
| 1034 |
+ popupClose(button); |
|
| 1035 |
+} |
|
| 1036 |
+ |
|
| 1037 |
+function showApiApprovalPopup() {
|
|
| 1038 |
+ if (sessionStorage.getItem(apiPopupStorageKey) === currentSessionId) {
|
|
| 1039 |
+ $("#btnApiApprovalPopup").closest(".popup-com").hide().css("opacity","0");
|
|
| 1040 |
+ $(".mask").removeClass("on").removeAttr("style");
|
|
| 1041 |
+ return; |
|
| 1042 |
+ } |
|
| 1043 |
+ |
|
| 1044 |
+ if (Number("${apiApprovalN}") > 0) {
|
|
| 1045 |
+ $('.api_unchecked_send_popup').show();
|
|
| 1046 |
+ } |
|
| 1047 |
+} |
|
| 1029 | 1048 |
|
| 1030 | 1049 |
|
| 1031 | 1050 |
</script> |
... | ... | @@ -1050,6 +1069,29 @@ |
| 1050 | 1069 |
<input type="hidden" id="eventNttId" name="eventNttId" value="<c:out value='${resultEvent.nttId}'/>"/>
|
| 1051 | 1070 |
<input type="hidden" id="eventBbsId" name="eventBbsId" value="<c:out value='${resultEvent.bbsId}'/>"/>
|
| 1052 | 1071 |
</form> |
| 1072 |
+<c:if test="${apiApprovalN gt 0}">
|
|
| 1073 |
+<!-- API 미확인 발송 내역 안내 --> |
|
| 1074 |
+<div class="tooltip-wrap" style="z-index:9999;"> |
|
| 1075 |
+ <div class="popup-com api_unchecked_send_popup" data-tooltip-con="api_unchecked_send_popup" data-focus="api_unchecked_send_popup" data-focus-prev="api_unchecked_send_popup-close" style="width:460px;left:50%;top:50%;transform:translate(-50%,-50%);"> |
|
| 1076 |
+ <div class="popup_heading"> |
|
| 1077 |
+ <p>API 미확인 발송 내역 안내</p> |
|
| 1078 |
+ <button type="button" class="tooltip-close" id="btnApiApprovalPopup" onclick="closeApiApprovalPopup(this);" data-focus="api_unchecked_send_popup-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 1079 |
+ </div> |
|
| 1080 |
+ <div class="layer_in" style="padding:40px 30px;"> |
|
| 1081 |
+ <p class="title_text">승인 대기 중인 발송 내역이 <b class="fwBold c_002c9a">${apiApprovalN}</b>건 있습니다.</p>
|
|
| 1082 |
+ <span class="sub_text">발송내역관리에서 확인 후 승인해 주세요.</span> |
|
| 1083 |
+ <p class="gray_box fill" style="margin:16px 0 0 0;"> |
|
| 1084 |
+ ※ 승인 완료 전까지 로그인 시 반복 안내됩니다. |
|
| 1085 |
+ </p> |
|
| 1086 |
+ <div class="popup_btn" style="margin:20px 0 0 0;"> |
|
| 1087 |
+ <button type="button" class="btnType btnType2 tooltip-close" onclick="location.href='/web/api/approvalList.do'; return false;">발송내역관리 이동</button> |
|
| 1088 |
+ </div> |
|
| 1089 |
+ </div> |
|
| 1090 |
+ |
|
| 1091 |
+ </div> |
|
| 1092 |
+</div> |
|
| 1093 |
+<!-- //API 미확인 발송 내역 안내 --> |
|
| 1094 |
+</c:if> |
|
| 1053 | 1095 |
|
| 1054 | 1096 |
<!-- 이벤트 팝업 --> |
| 1055 | 1097 |
<div class="layer_popup_wrap eventLayerPop" style="display:none; "> |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataSMLView.jsp
... | ... | @@ -3,30 +3,13 @@ |
| 3 | 3 |
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
| 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 |
- |
|
| 7 |
- |
|
| 8 | 6 |
<script type="text/javascript" src="<c:url value='/publish/js/content.js'/>"></script> |
| 9 | 7 |
<script type="text/javascript" src="<c:url value='/js/txtSpecialReplace.js?date=202304250003'/>"></script> |
| 10 | 8 |
<!-- 주소록 유효성 체크 공통유틸로 인해 추가 --> |
| 11 | 9 |
<script type="text/javascript" src="<c:url value='/js/web/addr/cmn.js?date=202409021440'/>"></script> |
| 12 |
- |
|
| 13 | 10 |
<% pageContext.setAttribute("newLineChar", "\r\n"); %>
|
| 14 | 11 |
<script type="text/javascript"> |
| 15 |
- |
|
| 16 |
- |
|
| 17 |
- |
|
| 18 |
- |
|
| 19 | 12 |
$(document).ready(function(){
|
| 20 |
- |
|
| 21 |
- |
|
| 22 |
-// console.log(' + $(#tabDision).val() : ',$('#tabDision').val())
|
|
| 23 |
-// if($('#tabDision').val() == 'tab02'){
|
|
| 24 |
-// $('#send_adYnY').prop('checked', true); // 상태 변경 및 이벤트 발생
|
|
| 25 |
-// advMsgInsert(); |
|
| 26 |
-// } |
|
| 27 |
- |
|
| 28 |
- //받는사람 연락처 내용 처리 |
|
| 29 |
- //Tabulator AJAX Data Loading |
|
| 30 | 13 |
tableL = new Tabulator(".callList_box", {
|
| 31 | 14 |
height:"255px", |
| 32 | 15 |
layout:"fitColumns", |
... | ... | @@ -43,8 +26,7 @@ |
| 43 | 26 |
columns:[ //Define Table Columns |
| 44 | 27 |
{formatter:"rowSelection", headerHozAlign:"center", titleFormatter:"rowSelection",clipboard:false, hozAlign:"center", width:5, headerSort:false, cellClick:function(e, cell){
|
| 45 | 28 |
cell.getRow().toggleSelect(); |
| 46 |
- }}, |
|
| 47 |
-// {formatter:"rownum", align:"center", title:"No", hozAlign:"center", headerHozAlign:"center", field:"No", width:30},
|
|
| 29 |
+ }}, |
|
| 48 | 30 |
{formatter:"rownum", align:"center" ,title:"No", hozAlign:"center", headerHozAlign:"center", width:40},
|
| 49 | 31 |
{title:"이름", field:"name", editor:false, validator:["maxLength:12"], cellEdited:function(cell){
|
| 50 | 32 |
fnReplCell_advc(); |
... | ... | @@ -83,10 +65,6 @@ |
| 83 | 65 |
cell.setValue(strMaxLengthSubstring(cellVal, 39)); |
| 84 | 66 |
cell.clearValidation(); |
| 85 | 67 |
} |
| 86 |
- |
|
| 87 |
- //해당 셀 데이터 삭제 |
|
| 88 |
- //cell.setValue("");
|
|
| 89 |
- |
|
| 90 | 68 |
} |
| 91 | 69 |
return value % parameters.phone; |
| 92 | 70 |
}, |
... | ... | @@ -105,7 +83,6 @@ |
| 105 | 83 |
progressiveRenderSize: 100, // 한 번에 렌더링할 행 수를 줄임 |
| 106 | 84 |
placeholder: "주소록 그룹을 선택해 주세요.", |
| 107 | 85 |
columns: [ |
| 108 |
-// {formatter: "rowSelection", clipboard: false, hozAlign: "center", headerSort: false},
|
|
| 109 | 86 |
{formatter: "rowSelection", titleFormatter: "rowSelection", hozAlign: "center", headerSort: false,
|
| 110 | 87 |
cellClick: function(e, cell) {
|
| 111 | 88 |
fn_loadAddActive(); // 로딩 활성화 |
... | ... | @@ -145,35 +122,21 @@ |
| 145 | 122 |
return value % parameters.addrPhone; |
| 146 | 123 |
}, |
| 147 | 124 |
}); |
| 148 |
- |
|
| 149 |
- |
|
| 150 |
- |
|
| 151 |
- /* |
|
| 152 |
- * 20240823 |
|
| 153 |
- * 미리보기 스크립트 |
|
| 154 |
- */ |
|
| 155 |
- // 현재 위치 |
|
| 156 | 125 |
var currentIndex = 0; |
| 157 |
- |
|
| 158 | 126 |
// 제일 이전 |
| 159 | 127 |
$('#btnFirst').on('click', function(){
|
| 160 | 128 |
currentIndex = 0; |
| 161 |
- |
|
| 162 | 129 |
updateButtons(currentIndex ); |
| 163 | 130 |
fn_previewText(currentIndex); |
| 164 | 131 |
}); |
| 165 |
- |
|
| 166 | 132 |
// 이전 |
| 167 | 133 |
$('#btnPrev').on('click', function(){
|
| 168 |
- |
|
| 169 | 134 |
if (currentIndex > 0) {
|
| 170 | 135 |
currentIndex--; |
| 171 | 136 |
updateButtons(currentIndex ); |
| 172 | 137 |
fn_previewText(currentIndex); |
| 173 | 138 |
} |
| 174 | 139 |
}); |
| 175 |
- |
|
| 176 |
- |
|
| 177 | 140 |
// 다음 |
| 178 | 141 |
$('#btnNext').on('click', function(){
|
| 179 | 142 |
var dataLength = tableL.getData().length; |
... | ... | @@ -183,7 +146,6 @@ |
| 183 | 146 |
fn_previewText(currentIndex); |
| 184 | 147 |
} |
| 185 | 148 |
}); |
| 186 |
- |
|
| 187 | 149 |
// 제일 다음 |
| 188 | 150 |
$('#btnLast').on('click', function(){
|
| 189 | 151 |
var dataLength = tableL.getData().length; |
... | ... | @@ -191,37 +153,26 @@ |
| 191 | 153 |
updateButtons(currentIndex ); |
| 192 | 154 |
fn_previewText(currentIndex); |
| 193 | 155 |
}); |
| 194 |
- |
|
| 195 | 156 |
updateButtons(currentIndex); |
| 196 |
- |
|
| 197 | 157 |
// 최근 전송내역 |
| 198 | 158 |
resultLatestMsgList(); |
| 199 | 159 |
//자주보내는 번호 |
| 200 | 160 |
resultBookMarkMsgList(); |
| 201 |
- |
|
| 202 | 161 |
}); |
| 203 |
- |
|
| 204 | 162 |
|
| 205 | 163 |
//최근 전송내역 |
| 206 | 164 |
function resultLatestMsgList(){
|
| 207 |
- |
|
| 208 |
- |
|
| 209 | 165 |
$.ajax({
|
| 210 | 166 |
type:"POST", |
| 211 | 167 |
url:"/web/mjon/msgdata/resultLatestMsgListAjax.do", |
| 212 | 168 |
data:{},
|
| 213 | 169 |
dataType:'json', |
| 214 |
- // timeout:(1000*30), |
|
| 215 | 170 |
success:function(data){
|
| 216 |
- |
|
| 217 |
- |
|
| 218 | 171 |
// 가져온 데이터 배열 |
| 219 | 172 |
let resultList = data.object; |
| 220 | 173 |
let $latestMsgUl = $('#latestMsgUl'); // 기존 리스트 UL
|
| 221 |
- |
|
| 222 | 174 |
// 기존 내용을 비우기 |
| 223 | 175 |
$latestMsgUl.empty(); |
| 224 |
- |
|
| 225 | 176 |
// 데이터가 있는 경우 |
| 226 | 177 |
if (resultList && resultList.length > 0) {
|
| 227 | 178 |
resultList.forEach(function(item, index) {
|
... | ... | @@ -234,7 +185,6 @@ |
| 234 | 185 |
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' + |
| 235 | 186 |
'</button>' + |
| 236 | 187 |
'</li>'; |
| 237 |
- |
|
| 238 | 188 |
$latestMsgUl.append(listItem); |
| 239 | 189 |
}); |
| 240 | 190 |
} else {
|
... | ... | @@ -242,33 +192,23 @@ |
| 242 | 192 |
$latestMsgUl.append('<li><p>최근 발송 내역이 없습니다.</p></li>');
|
| 243 | 193 |
} |
| 244 | 194 |
}, |
| 245 |
- error:function(request , status, error){
|
|
| 246 |
- console.log(' error ?');
|
|
| 247 |
- console.log('request : ', request);
|
|
| 248 |
- console.log('status : ', status);
|
|
| 249 |
- } |
|
| 195 |
+ error:function(request , status, error){}
|
|
| 250 | 196 |
}); |
| 251 | 197 |
} |
| 252 | 198 |
|
| 253 | 199 |
// 자주보내는 번호 |
| 254 | 200 |
function resultBookMarkMsgList(){
|
| 255 |
- |
|
| 256 | 201 |
$.ajax({
|
| 257 | 202 |
type:"POST", |
| 258 | 203 |
url:"/web/mjon/msgdata/resultBookMarkMsgList.do", |
| 259 | 204 |
data:{},
|
| 260 | 205 |
dataType:'json', |
| 261 |
- // timeout:(1000*30), |
|
| 262 | 206 |
success:function(data){
|
| 263 |
- |
|
| 264 |
- |
|
| 265 | 207 |
// 가져온 데이터 배열 |
| 266 | 208 |
let resultList = data.object; |
| 267 | 209 |
let $bookMsgUl = $('#bookMsgUl'); // 기존 리스트 UL
|
| 268 |
- |
|
| 269 | 210 |
// 기존 내용을 비우기 |
| 270 | 211 |
$bookMsgUl.empty(); |
| 271 |
- |
|
| 272 | 212 |
// 데이터가 있는 경우 |
| 273 | 213 |
if (resultList && resultList.length > 0) {
|
| 274 | 214 |
resultList.forEach(function(item, index) {
|
... | ... | @@ -282,7 +222,6 @@ |
| 282 | 222 |
'<img src="/publish/images/popup/close3.png" alt="전화번호 삭제">' + |
| 283 | 223 |
'</button>' + |
| 284 | 224 |
'</li>'; |
| 285 |
- |
|
| 286 | 225 |
$bookMsgUl.append(listItem); |
| 287 | 226 |
}); |
| 288 | 227 |
} else {
|
... | ... | @@ -298,18 +237,8 @@ |
| 298 | 237 |
}); |
| 299 | 238 |
} |
| 300 | 239 |
|
| 301 |
- |
|
| 302 |
-/* |
|
| 303 |
- * 버튼 disabled 스크립트 |
|
| 304 |
- */ |
|
| 305 | 240 |
function updateButtons(currentIndex ) {
|
| 306 |
- |
|
| 307 |
- |
|
| 308 | 241 |
var dataLength = tableL.getData().length; |
| 309 |
-// console.log('dataLength ', dataLength);
|
|
| 310 |
-// console.log('currentIndex ', currentIndex);
|
|
| 311 |
- |
|
| 312 |
- |
|
| 313 | 242 |
if (currentIndex <= 0) {
|
| 314 | 243 |
$('#btnPrev').attr('disabled', true);
|
| 315 | 244 |
$('#btnFirst').attr('disabled', true);
|
... | ... | @@ -331,32 +260,24 @@ |
| 331 | 260 |
* 미리보기 데이터 치환 |
| 332 | 261 |
*/ |
| 333 | 262 |
function fn_previewText(rowIndex){
|
| 334 |
- |
|
| 335 | 263 |
var smsText = $('#smsTxtArea').val()
|
| 336 | 264 |
// 데이터 가져오기 |
| 337 | 265 |
var data = tableL.getData(); |
| 338 |
- |
|
| 339 | 266 |
// 특정 인덱스(예: 1)로 행을 선택하여 치환 |
| 340 | 267 |
var row = data[rowIndex]; // 인덱스 1의 행을 선택 |
| 341 |
- |
|
| 342 |
- |
|
| 343 | 268 |
// 이름 치환 |
| 344 | 269 |
smsText = smsText.replace(/\[\*이름\*\]/g, row.name !== undefined && row.name !== null ? row.name : '[*이름*]'); |
| 345 |
- |
|
| 346 | 270 |
// rep1, rep2, rep3, rep4 치환 |
| 347 | 271 |
smsText = smsText.replace(/\[\*1\*\]/g, row.rep1 !== undefined && row.rep1 !== null ? row.rep1 : '[*1*]'); |
| 348 | 272 |
smsText = smsText.replace(/\[\*2\*\]/g, row.rep2 !== undefined && row.rep2 !== null ? row.rep2 : '[*2*]'); |
| 349 | 273 |
smsText = smsText.replace(/\[\*3\*\]/g, row.rep3 !== undefined && row.rep3 !== null ? row.rep3 : '[*3*]'); |
| 350 | 274 |
smsText = smsText.replace(/\[\*4\*\]/g, row.rep4 !== undefined && row.rep4 !== null ? row.rep4 : '[*4*]'); |
| 351 |
- |
|
| 352 | 275 |
// 결과 출력 또는 다른 곳에 사용 |
| 353 |
- console.log(smsText); |
|
| 354 | 276 |
$('.realtime').text(smsText);
|
| 355 | 277 |
} |
| 356 | 278 |
|
| 357 | 279 |
var tableErrorData = []; |
| 358 | 280 |
var totRows = 0; // 좌측 받는사람 총 갯수 |
| 359 |
- |
|
| 360 | 281 |
/* 파일등록 */ |
| 361 | 282 |
var _fileIdx = 0; |
| 362 | 283 |
var _fileForm2 = new Array(); |
... | ... | @@ -365,57 +286,35 @@ |
| 365 | 286 |
|
| 366 | 287 |
//전체 데이터 갯수 구하는 함수 |
| 367 | 288 |
function updateTotCnt(data){
|
| 368 |
- |
|
| 369 |
- console.log(' :: updateTotCnt :: ');
|
|
| 370 | 289 |
var rowTotCnt = data; |
| 371 | 290 |
$("#rowTotCnt").text(numberWithCommas(rowTotCnt));
|
| 372 |
- |
|
| 373 | 291 |
} |
| 374 | 292 |
|
| 375 |
- |
|
| 376 | 293 |
function addPhoneInfo(data){
|
| 377 |
- |
|
| 378 | 294 |
if(data == null){
|
| 379 |
- |
|
| 380 | 295 |
alert("연락처 정보가 없습니다.");
|
| 381 | 296 |
return; |
| 382 |
- |
|
| 383 | 297 |
}else{
|
| 384 |
- |
|
| 385 | 298 |
var idx = 0; |
| 386 | 299 |
var newData = data;//중복 연락처는 하나만 남기고 모두 제거 |
| 387 |
- |
|
| 388 | 300 |
var recTableData = tableL.getRows(); // 받는사람 리스트의 전체 목록을 저장 |
| 389 | 301 |
var tableData = []; |
| 390 |
- |
|
| 391 | 302 |
//기존 받는사람 리스트를 배열에 미리 담아둔다. |
| 392 | 303 |
if(recTableData.length > 0){
|
| 393 |
- |
|
| 394 | 304 |
for(var j=0; j < recTableData.length; j++){
|
| 395 |
- |
|
| 396 | 305 |
tableData.push({phone: removeDash(recTableData[j].getData().phone) , name: recTableData[j].getData().name, rep1: recTableData[j].getData().rep1, rep2: recTableData[j].getData().rep2, rep3: recTableData[j].getData().rep3, rep4: recTableData[j].getData().rep4});
|
| 397 |
- |
|
| 398 | 306 |
} |
| 399 |
- |
|
| 400 | 307 |
} |
| 401 |
- |
|
| 402 | 308 |
//받는사람 리스트를 담아둔 배열에 신규 추가 데이터를 추가해 준다. |
| 403 | 309 |
for(var i=0; i < newData.length; i++){
|
| 404 |
- |
|
| 405 | 310 |
tableData.push({phone: removeDash(newData[i].phone) , name: newData[i].name, rep1: newData[i].rep1, rep2: newData[i].rep2, rep3: newData[i].rep3, rep4: newData[i].rep4});
|
| 406 |
- |
|
| 407 | 311 |
} |
| 408 |
- |
|
| 409 |
-// var temp = tableData.length; |
|
| 410 |
- |
|
| 411 | 312 |
//기존 수신 리스트를 지워준 후 신규 전체 리스트를 추가해준다. |
| 412 | 313 |
tableL.clearData(); //기존 받는사람 목록을 삭제. |
| 413 |
- //tableL.addData(dupliPhoneData(tableData)); // 받는사람 목록에 주소 정보 입력하기 |
|
| 414 | 314 |
tableL.addData(getSpupDupliPhoneDataChk(tableData)); // 받는사람 목록에 주소 정보 입력하기 |
| 415 |
- |
|
| 315 |
+ |
|
| 416 | 316 |
_fileForm2 = []; //form file data 초기화 |
| 417 | 317 |
_fileIdx = 0; //form file idx 초기화 |
| 418 |
- |
|
| 419 | 318 |
totRows = tableL.getRows().length; |
| 420 | 319 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 421 | 320 |
|
... | ... | @@ -426,18 +325,12 @@ |
| 426 | 325 |
|| smsTxtArea.indexOf("[*2*]") > -1
|
| 427 | 326 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 428 | 327 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 429 |
- |
|
| 430 | 328 |
fnReplCell_advc(); |
| 431 |
- |
|
| 432 | 329 |
}else{
|
| 433 |
- |
|
| 434 | 330 |
//결제 금액 구하기 |
| 435 | 331 |
totalPriceSum(totRows); |
| 436 |
- |
|
| 437 | 332 |
} |
| 438 |
- |
|
| 439 | 333 |
} |
| 440 |
- |
|
| 441 | 334 |
} |
| 442 | 335 |
|
| 443 | 336 |
/* 파일사이즈 가져오기 */ |
... | ... | @@ -455,48 +348,31 @@ |
| 455 | 348 |
|
| 456 | 349 |
// 엑셀 파일 불러오기 |
| 457 | 350 |
function excelExport(event){
|
| 458 |
- |
|
| 459 | 351 |
var data = new FormData(document.excelForm); |
| 460 | 352 |
data.append("file0", $('#excelFile').prop('files')[0]);
|
| 461 | 353 |
|
| 462 | 354 |
var fileValue = $("#excelFile").val().split("\\");
|
| 463 | 355 |
var fileName = fileValue[fileValue.length-1]; |
| 464 |
- |
|
| 465 | 356 |
var fileExt = fileName.split('.').pop().toLowerCase();
|
| 466 | 357 |
|
| 467 | 358 |
if(fileExt.length > 0){
|
| 468 | 359 |
if($.inArray(fileExt, ['txt','xls','xlsx']) == -1) {
|
| 469 |
- |
|
| 470 | 360 |
alert('txt, xls, xlsx 파일만 업로드 할수 있습니다.');
|
| 471 | 361 |
return false; |
| 472 |
- |
|
| 473 | 362 |
} |
| 474 |
- |
|
| 475 |
- |
|
| 476 | 363 |
var url = ""; |
| 477 |
- |
|
| 478 | 364 |
if(fileExt == "xls" || fileExt == "xlsx"){
|
| 479 |
- |
|
| 480 | 365 |
url = "/web/mjon/msgdata/sendExelFilePhoneNumAjax.do"; |
| 481 |
- |
|
| 482 |
- }else if(fileExt = "txt"){
|
|
| 483 |
- |
|
| 366 |
+ } else if(fileExt = "txt"){
|
|
| 484 | 367 |
url = "/web/mjon/msgdata/sendTxtFilePhoneNumAjax.do"; |
| 485 |
- |
|
| 486 | 368 |
}else{
|
| 487 |
- |
|
| 488 | 369 |
alert('txt, xls, xlsx 파일만 업로드 할수 있습니다.');
|
| 489 | 370 |
return; |
| 490 |
- |
|
| 491 | 371 |
} |
| 492 |
- |
|
| 493 | 372 |
//엑셀 데이터 변수에 자료가 있으면 지워준다. |
| 494 | 373 |
if(excelAddr.length > 0){
|
| 495 |
- |
|
| 496 | 374 |
excelAddr = []; |
| 497 |
- |
|
| 498 | 375 |
} |
| 499 |
- |
|
| 500 | 376 |
$.ajax({
|
| 501 | 377 |
type: "POST", |
| 502 | 378 |
enctype: 'multipart/form-data', |
... | ... | @@ -507,51 +383,28 @@ |
| 507 | 383 |
processData: false, |
| 508 | 384 |
contentType: false, |
| 509 | 385 |
cache: false, |
| 510 |
- //timeout: 600000, |
|
| 511 | 386 |
success: function (returnData, status) {
|
| 512 | 387 |
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
| 513 |
- |
|
| 514 | 388 |
if(returnData.success){
|
| 515 |
- |
|
| 516 | 389 |
var data = returnData.data; |
| 517 | 390 |
var message = returnData.message; |
| 518 |
- |
|
| 519 | 391 |
if(message != '' ){
|
| 520 | 392 |
alert(returnData.message); |
| 521 | 393 |
} |
| 522 |
- |
|
| 523 | 394 |
if(data != null){
|
| 524 |
- |
|
| 525 | 395 |
$.each(data, function(i, item){
|
| 526 |
- |
|
| 527 | 396 |
if(checkHpNum(item.phone)){
|
| 528 |
- |
|
| 529 | 397 |
excelAddr.push({phone: item.phone, name: item.name, rep1: item.replace1, rep2: item.replace2, rep3: item.replace3, rep4: item.replace4});
|
| 530 |
- |
|
| 531 |
- }/* else{
|
|
| 532 |
- |
|
| 533 |
- alert("엑셀 파일 데이터의 형식이 맞지 않는 부분이 있습니다.");
|
|
| 534 |
- excelAddr = []; //엑셀 데이터 저장 변수 초기화 |
|
| 535 |
- $("#excelFile").val(""); //첨부파일 input 초기화
|
|
| 536 |
- $("#excelNm").val(""); // 첨부파일 명 초기화
|
|
| 537 |
- fileName = ""; |
|
| 538 |
- return; |
|
| 539 |
- |
|
| 540 |
- } */ |
|
| 541 |
- |
|
| 398 |
+ } |
|
| 542 | 399 |
}); |
| 543 |
- |
|
| 544 | 400 |
} |
| 545 |
- |
|
| 546 | 401 |
}else{
|
| 547 | 402 |
alert(returnData.message); |
| 548 |
-// alert("첨부파일 불러오는 중 오류가 발생하였습니다.");
|
|
| 549 | 403 |
excelAddr = []; //엑셀 데이터 저장 변수 초기화 |
| 550 | 404 |
$("#excelFile").val(""); //첨부파일 input 초기화
|
| 551 | 405 |
$("#excelNm").val(""); // 첨부파일 명 초기화
|
| 552 | 406 |
fileName = ""; |
| 553 | 407 |
return; |
| 554 |
- |
|
| 555 | 408 |
} |
| 556 | 409 |
} else if(status== 'fail'){
|
| 557 | 410 |
alert("첨부파일 불러오는 중 오류가 발생하였습니다.");
|
... | ... | @@ -573,90 +426,63 @@ |
| 573 | 426 |
}); |
| 574 | 427 |
|
| 575 | 428 |
$("#excelFile").val("");
|
| 576 |
- $("#excelNm").val(fileName);
|
|
| 577 |
- |
|
| 429 |
+ $("#excelNm").val(fileName);
|
|
| 578 | 430 |
} |
| 579 | 431 |
|
| 580 | 432 |
} |
| 581 | 433 |
|
| 582 | 434 |
//엑셀 불러오기 팝업의 추가 버튼 처리 |
| 583 | 435 |
$("#excelAdd").click(function(){
|
| 584 |
- |
|
| 585 | 436 |
if(excelAddr.length > 0){
|
| 586 |
- |
|
| 587 | 437 |
//첨부파일로 불러온 데이터를 받는사람 목록에 추가해 준다. |
| 588 | 438 |
addPhoneInfo(excelAddr); |
| 589 |
- |
|
| 590 | 439 |
//첨부파일 초기화 시켜주기 |
| 591 | 440 |
$("#excelFile").val("");
|
| 592 | 441 |
$("#excelNm").val("");
|
| 593 |
- |
|
| 594 | 442 |
}else{
|
| 595 |
- |
|
| 596 | 443 |
alert("추가 엑셀 데이터가 없습니다.");
|
| 597 | 444 |
return false; |
| 598 |
- |
|
| 599 | 445 |
} |
| 600 |
- |
|
| 601 |
- |
|
| 602 | 446 |
}); |
| 603 |
- |
|
| 604 |
- |
|
| 605 | 447 |
//첨부 이미지 정보 확인 처리 해주기(이미지 리사이징 전단계) |
| 606 | 448 |
function imgResizeInfo(event){
|
| 607 |
- |
|
| 608 | 449 |
var fileValue = $("#imgFile").val().split("\\");
|
| 609 | 450 |
var fileName = fileValue[fileValue.length-1]; |
| 610 |
- |
|
| 611 | 451 |
var fileExt = fileName.split('.').pop().toLowerCase();
|
| 612 |
- |
|
| 613 | 452 |
if(fileExt.length > 0){
|
| 614 | 453 |
if($.inArray(fileExt, ['jpg','jpeg']) == -1) {
|
| 615 | 454 |
alert('jpg, jpeg 파일만 업로드 할수 있습니다.');
|
| 616 | 455 |
return false; |
| 617 | 456 |
} |
| 618 |
- |
|
| 619 | 457 |
$("#imgNm").val(fileName);
|
| 620 | 458 |
} |
| 621 | 459 |
} |
| 622 | 460 |
|
| 623 | 461 |
//첨부 이미지 파일 리사이징 처리 해주기 |
| 624 | 462 |
function imgExport(event){
|
| 625 |
- |
|
| 626 | 463 |
var loginVO = '${LoginVO}';
|
| 627 |
- |
|
| 628 | 464 |
if(loginVO == "" || loginVO == null){
|
| 629 | 465 |
alert("문자전송 그림 이미지 등록은 로그인 후 이용 가능합니다.");
|
| 630 | 466 |
return false; |
| 631 | 467 |
} |
| 632 |
- |
|
| 633 | 468 |
var data = new FormData(document.imgForm); |
| 634 | 469 |
data.append("file0", $('#imgFile').prop('files')[0]);
|
| 635 | 470 |
|
| 636 | 471 |
var fileValue = $("#imgFile").val().split("\\");
|
| 637 | 472 |
var fileName = fileValue[fileValue.length-1]; |
| 638 |
- |
|
| 639 | 473 |
var fileExt = fileName.split('.').pop().toLowerCase();
|
| 640 | 474 |
|
| 641 | 475 |
if(fileExt.length > 0){
|
| 642 | 476 |
if($.inArray(fileExt, ['jpg','jpeg']) == -1) {
|
| 643 |
- |
|
| 644 | 477 |
alert('jpg, jpeg 파일만 업로드 할수 있습니다.');
|
| 645 | 478 |
return false; |
| 646 |
- |
|
| 647 | 479 |
} |
| 648 |
- |
|
| 649 | 480 |
var url = ""; |
| 650 |
- |
|
| 651 | 481 |
if(fileExt == "jpg" || fileExt == "jpeg"){
|
| 652 |
- |
|
| 653 | 482 |
url = "/web/mjon/msgdata/insertAtchImageResizeAjax.do"; |
| 654 |
- |
|
| 655 | 483 |
}else{
|
| 656 |
- |
|
| 657 | 484 |
alert('jpg, jpeg 파일만 업로드 할수 있습니다.');
|
| 658 | 485 |
return; |
| 659 |
- |
|
| 660 | 486 |
} |
| 661 | 487 |
|
| 662 | 488 |
$.ajax({
|
... | ... | @@ -669,22 +495,17 @@ |
| 669 | 495 |
processData: false, |
| 670 | 496 |
contentType: false, |
| 671 | 497 |
cache: false, |
| 672 |
- //timeout: 600000, |
|
| 673 | 498 |
success: function (returnData, status) {
|
| 674 | 499 |
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
| 675 |
- |
|
| 676 | 500 |
var data = returnData.data; |
| 677 | 501 |
var message = returnData.message; |
| 678 | 502 |
var result = returnData.result; |
| 679 |
- |
|
| 680 | 503 |
if(result == "success"){
|
| 681 |
- |
|
| 682 | 504 |
var fullPath = returnData.filefullPath; |
| 683 | 505 |
var fileName = returnData.fileName; |
| 684 | 506 |
var atchFileId = returnData.atchFileId; |
| 685 | 507 |
var imgSrc = returnData.imgSrc; |
| 686 | 508 |
var imgCnt = $("#imgCnt").val();
|
| 687 |
- |
|
| 688 | 509 |
//현재 문자내용에 첨부된 이미지 갯수 체크 |
| 689 | 510 |
if(imgCnt >= 3){
|
| 690 | 511 |
alert("이미지는 3장만 선택할 수 있습니다.");
|
... | ... | @@ -692,40 +513,27 @@ |
| 692 | 513 |
} |
| 693 | 514 |
//내문서함 이미지 불러오는 방식과 동일하여 함수 호출 처리함. |
| 694 | 515 |
myMsgImageControl(imgSrc, "edit_n", fileName, atchFileId); |
| 695 |
- |
|
| 696 | 516 |
var contents = $('#smsTxtArea').val();
|
| 697 |
- //(contents); |
|
| 698 |
- |
|
| 699 | 517 |
totRows = tableL.getRows().length; |
| 700 | 518 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 701 |
- |
|
| 702 | 519 |
//일괄변환 문구 결제금액 처리 |
| 703 | 520 |
if(contents.indexOf("[*이름*]") > -1
|
| 704 | 521 |
|| contents.indexOf("[*1*]") > -1
|
| 705 | 522 |
|| contents.indexOf("[*2*]") > -1
|
| 706 | 523 |
|| contents.indexOf("[*3*]") > -1
|
| 707 | 524 |
|| contents.indexOf("[*4*]") > -1){
|
| 708 |
- |
|
| 709 | 525 |
fnReplCell_advc(); |
| 710 |
- |
|
| 711 | 526 |
}else{
|
| 712 |
- |
|
| 713 | 527 |
//결제금액 표시해주기 |
| 714 | 528 |
var totalPrice = totalPriceSum(totRows); |
| 715 | 529 |
$('#totalPrice').text(totalPrice);
|
| 716 | 530 |
$('#txtReplYn').val("N");
|
| 717 |
- |
|
| 718 | 531 |
} |
| 719 |
- |
|
| 720 | 532 |
alert(message); |
| 721 |
- |
|
| 722 | 533 |
}else if(result == "fail"){
|
| 723 |
- |
|
| 724 | 534 |
alert(message); |
| 725 | 535 |
return false; |
| 726 |
- |
|
| 727 | 536 |
} |
| 728 |
- |
|
| 729 | 537 |
} else if(status== 'fail'){
|
| 730 | 538 |
alert("첨부파일 불러오는 중 오류가 발생하였습니다.");
|
| 731 | 539 |
console.log("status : fail ~");
|
... | ... | @@ -744,13 +552,10 @@ |
| 744 | 552 |
$('.loading_layer').removeClass('active');
|
| 745 | 553 |
} |
| 746 | 554 |
}); |
| 747 |
- |
|
| 748 | 555 |
//첨부파일 이름 및 데이터 지워주기 - 완료 후 팝업이 자동으로 닫힘. |
| 749 | 556 |
$("#imgFile").val("");
|
| 750 |
- $("#imgNm").val("");
|
|
| 751 |
- |
|
| 557 |
+ $("#imgNm").val("");
|
|
| 752 | 558 |
} |
| 753 |
- |
|
| 754 | 559 |
} |
| 755 | 560 |
|
| 756 | 561 |
function txtExport(event){
|
... | ... | @@ -762,14 +567,11 @@ |
| 762 | 567 |
var fileExt = fileNm.split('.').pop().toLowerCase();
|
| 763 | 568 |
|
| 764 | 569 |
if(fileExt != "txt"){
|
| 765 |
- |
|
| 766 | 570 |
alert("TXT 파일만 등록 할 수 있습니다.");
|
| 767 | 571 |
return false; |
| 768 |
- |
|
| 769 | 572 |
} |
| 770 | 573 |
|
| 771 | 574 |
if (!file) {
|
| 772 |
- |
|
| 773 | 575 |
alert("첨부파일이 없습니다.");
|
| 774 | 576 |
return; |
| 775 | 577 |
} |
... | ... | @@ -779,14 +581,10 @@ |
| 779 | 581 |
reader.onload = function(e) {
|
| 780 | 582 |
fileData = e.target.result; |
| 781 | 583 |
arrSplitData = fileData.split("\n");
|
| 782 |
- |
|
| 783 | 584 |
for(var i=0; i < arrSplitData.length; i++){
|
| 784 |
- |
|
| 785 | 585 |
var arrTemp = arrSplitData[i].split("\t");
|
| 786 | 586 |
txtAddr.push({phone: arrTemp[1].trim(), name: arrTemp[0].trim()});
|
| 787 |
- |
|
| 788 | 587 |
} |
| 789 |
- |
|
| 790 | 588 |
//Tabulator에 데이터 입력해주기 |
| 791 | 589 |
addPhoneInfo(txtAddr); |
| 792 | 590 |
}; |
... | ... | @@ -800,8 +598,7 @@ |
| 800 | 598 |
function SetPriceWrapOpen() {
|
| 801 | 599 |
var loginVO = '${LoginVO}';
|
| 802 | 600 |
//로그인 체크 |
| 803 |
- if(loginVO == "" || loginVO == null){
|
|
| 804 |
- } |
|
| 601 |
+ if(loginVO == "" || loginVO == null){}
|
|
| 805 | 602 |
else {
|
| 806 | 603 |
// 발송금액 가격안내 |
| 807 | 604 |
$("#myPriceWrap").show();
|
... | ... | @@ -820,90 +617,54 @@ |
| 820 | 617 |
if (data.isSuccess) {
|
| 821 | 618 |
// 발송금액 가격안내 |
| 822 | 619 |
$("#myPriceWrap").show();
|
| 823 |
- } |
|
| 824 |
- else {
|
|
| 825 |
- //alert("Msg : " + data.msg);
|
|
| 826 | 620 |
} |
| 827 | 621 |
}, |
| 828 |
- error: function (e) {
|
|
| 829 |
- //alert("ERROR : " + JSON.stringify(e));
|
|
| 830 |
- } |
|
| 622 |
+ error: function (e) {}
|
|
| 831 | 623 |
}); |
| 832 | 624 |
} |
| 833 | 625 |
|
| 834 | 626 |
$(document).ready(function (){
|
| 835 | 627 |
// 발송금액 단가표시 |
| 836 |
- SetPriceWrapOpen(); |
|
| 837 |
- |
|
| 628 |
+ SetPriceWrapOpen(); |
|
| 838 | 629 |
// Bline 확연 및 라디오 버튼 클릭 이벤트 추가 |
| 839 | 630 |
var blineCodeYn = $("#blineCode").val();
|
| 840 | 631 |
if(blineCodeYn != 'N' && blineCodeYn != ''){
|
| 841 | 632 |
$('input[name="send_adYn"]').val(['Y']);
|
| 842 | 633 |
$(".send_adYnN").css('display', 'none');
|
| 843 |
-// advMsgInsert(); |
|
| 844 | 634 |
} |
| 845 |
- |
|
| 846 | 635 |
//미리보기 이미지 영역 숨김 처리 |
| 847 | 636 |
$('.preiew_img').hide();
|
| 848 | 637 |
$('.prePhoto').hide();
|
| 849 |
- |
|
| 850 | 638 |
//최초 화면 문자열 길이 체크해주기 |
| 851 | 639 |
var strCon = $('#smsTxtArea').val();
|
| 852 | 640 |
fnByteString(strCon); |
| 853 |
- |
|
| 854 | 641 |
//일반문자, 광고문자 텍스트 내용 추가해주기 |
| 855 |
- $('input[name=send_adYn]').change(function(){
|
|
| 856 |
- |
|
| 857 |
-// advMsgInsert(); |
|
| 858 |
- |
|
| 859 |
- }); |
|
| 860 |
- |
|
| 861 |
- |
|
| 862 |
- |
|
| 642 |
+ $('input[name=send_adYn]').change(function(){});
|
|
| 863 | 643 |
let debounceTimer; |
| 864 | 644 |
//문자 내용 입력시 바이트수 계산하기 |
| 865 | 645 |
$('#smsTxtArea').keyup(function(e){
|
| 866 |
-// console.log("11$('.preview_auto').test() :: ",$('.realtime').html())
|
|
| 867 |
-// console.log("11$('.preview_auto').test() :: ",$('.realtime').text())
|
|
| 868 |
- |
|
| 869 | 646 |
var contents = $(this).val(); |
| 870 | 647 |
clearTimeout(debounceTimer); // 기존 타이머를 초기화 |
| 871 | 648 |
debounceTimer = setTimeout(() => {
|
| 872 | 649 |
fnByteString(contents); // 일정 시간 후에만 문자 내용 처리 실행 |
| 873 | 650 |
}, 300); // 300ms 지연 |
| 874 | 651 |
});//문자 바이트수 계산하기 끝 |
| 875 |
- |
|
| 876 |
- |
|
| 877 |
- //스프레드 시트 Tabulator 초기 셋팅 |
|
| 878 |
- /* var tabledata = [ |
|
| 879 |
- ]; */ |
|
| 880 |
- |
|
| 881 |
- //var selectRow; |
|
| 882 |
- |
|
| 883 | 652 |
//핸드폰 번호 Tabulator에서 수정시 중복 체크 |
| 884 | 653 |
function fnDuplPhone(){
|
| 885 |
- |
|
| 886 | 654 |
var recTableData = tableL.getRows(); // 받는사람 리스트의 전체 목록을 저장 |
| 887 | 655 |
var tableData = []; |
| 888 |
- |
|
| 889 | 656 |
//기존 받는사람 리스트를 배열에 미리 담아둔다. |
| 890 | 657 |
if(recTableData.length > 0){
|
| 891 |
- |
|
| 892 | 658 |
for(var j=0; j < recTableData.length; j++){
|
| 893 |
- |
|
| 894 | 659 |
tableData.push({phone: removeDash(recTableData[j].getData().phone.trim()) , name: recTableData[j].getData().name, rep1: recTableData[j].getData().rep1, rep2: recTableData[j].getData().rep2, rep3: recTableData[j].getData().rep3, rep4: recTableData[j].getData().rep4});
|
| 895 |
- |
|
| 896 | 660 |
} |
| 897 |
- |
|
| 898 | 661 |
} |
| 899 | 662 |
|
| 900 | 663 |
//수신목록에서 중복 휴대폰문자가 있는지 체크해주기 |
| 901 | 664 |
var dupCnt = dupliPhoneDataChk(tableData); |
| 902 | 665 |
|
| 903 | 666 |
if(dupCnt > 0){
|
| 904 |
- |
|
| 905 | 667 |
if(confirm("동일한 휴대폰 번호가 받는사람 목록에 등록되어 있습니다. 중복 번호를 삭제하시겠습니까?")){
|
| 906 |
- |
|
| 907 | 668 |
//수신목록에서 중복 휴대폰 번호 삭제해주기 |
| 908 | 669 |
tableL.clearData(); //기존 받는사람 목록을 삭제. |
| 909 | 670 |
tableL.addData(dupliPhoneData(tableData)); // 받는사람 목록에 주소 정보 입력하기 |
... | ... | @@ -912,42 +673,26 @@ |
| 912 | 673 |
|
| 913 | 674 |
totRows = tableL.getRows().length; |
| 914 | 675 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 915 |
- |
|
| 916 | 676 |
} |
| 917 |
- |
|
| 918 | 677 |
} |
| 919 |
- |
|
| 920 | 678 |
} |
| 921 | 679 |
|
| 922 | 680 |
//받는사람 목록에 복사/붙여넣기 기능 처리 |
| 923 | 681 |
$('.callList_box').on('paste', function (e) {
|
| 924 |
- console.log(' :: callList _box :: ');
|
|
| 925 |
- |
|
| 926 | 682 |
var element = e.originalEvent.clipboardData.getData('text'); // 클립보드에 복사한 데이터 가져오기
|
| 927 |
- |
|
| 928 | 683 |
var elmSplit= []; |
| 929 |
- |
|
| 930 | 684 |
elmSplit = element.split("\n");
|
| 931 |
- |
|
| 932 | 685 |
var elmLen = elmSplit.length; |
| 933 |
- |
|
| 934 |
- |
|
| 935 | 686 |
if(elmLen < 0){
|
| 936 |
- |
|
| 937 | 687 |
alert("붙여넣을 연락처를 복사해주세요.");
|
| 938 | 688 |
return false; |
| 939 |
- |
|
| 940 | 689 |
}else{
|
| 941 | 690 |
tableErrorData.length = 0; // 오류 번호 배열 초기화 |
| 942 | 691 |
|
| 943 | 692 |
var splitData = []; |
| 944 | 693 |
var realPhone = []; |
| 945 | 694 |
for(var i=0; i < elmLen; i++){
|
| 946 |
- |
|
| 947 |
- var splitStr = elmSplit[i]; |
|
| 948 |
- var tabData = []; |
|
| 949 |
- var comData = []; |
|
| 950 |
- |
|
| 695 |
+ var splitStr = elmSplit[i]; |
|
| 951 | 696 |
if(splitStr.indexOf('\t') != -1){
|
| 952 | 697 |
splitData = splitStr.split('\t'); //탭 구분으로 데이터 분할
|
| 953 | 698 |
}else if(splitStr.indexOf(',') != -1){
|
... | ... | @@ -955,15 +700,10 @@ |
| 955 | 700 |
}else{
|
| 956 | 701 |
splitData = splitStr.split(' ');
|
| 957 | 702 |
} |
| 958 |
- |
|
| 959 |
- |
|
| 960 | 703 |
if(splitData.length == 0){// 데이터가 없는경우
|
| 961 |
- |
|
| 962 | 704 |
alert("탭으로 구분하여 데이터를 복사해 주세요.");
|
| 963 | 705 |
return false; |
| 964 |
- |
|
| 965 | 706 |
}else if(splitData.length == 1){// 데이터가 탭으로 구분이 없는 경우
|
| 966 |
- |
|
| 967 | 707 |
for(var j=0; j < splitData.length; j++){
|
| 968 | 708 |
if(checkHpNum(splitData[j].trim())){//핸드폰 양식이 맞는지 확인
|
| 969 | 709 |
//배열 끝에 데이터 추가해 주기 |
... | ... | @@ -977,7 +717,6 @@ |
| 977 | 717 |
} |
| 978 | 718 |
|
| 979 | 719 |
}else{//데이터가 탭으로 구분되어 이름, 연락처로 구분된 경우
|
| 980 |
- |
|
| 981 | 720 |
var phone = ""; //핸드폰번호 |
| 982 | 721 |
var name = ""; //이름 |
| 983 | 722 |
var rep1 = ""; //치환문자1 |
... | ... | @@ -986,15 +725,10 @@ |
| 986 | 725 |
var rep4 = ""; //치환문자4 |
| 987 | 726 |
var isPhoneValid = false; |
| 988 | 727 |
for(var j=0; j < splitData.length; j++){
|
| 989 |
- |
|
| 990 | 728 |
if(j == 0){
|
| 991 |
- |
|
| 992 | 729 |
name = splitData[j].trim(); |
| 993 |
- |
|
| 994 | 730 |
} |
| 995 |
- |
|
| 996 | 731 |
if(j == 1){
|
| 997 |
- |
|
| 998 | 732 |
if(checkHpNum(splitData[j].trim())){//핸드폰 양식이 맞는지 확인
|
| 999 | 733 |
phone = removeDash(splitData[j].trim()); |
| 1000 | 734 |
isPhoneValid = true; |
... | ... | @@ -1003,89 +737,53 @@ |
| 1003 | 737 |
tableErrorData.push(splitData[j].trim()); |
| 1004 | 738 |
} |
| 1005 | 739 |
} |
| 1006 |
- |
|
| 1007 | 740 |
} |
| 1008 |
- |
|
| 1009 | 741 |
if(j == 2){ //치환문자1
|
| 1010 |
- |
|
| 1011 | 742 |
rep1 = splitData[j].trim(); |
| 1012 |
- |
|
| 1013 | 743 |
} |
| 1014 |
- |
|
| 1015 | 744 |
if(j == 3){ //치환문자2
|
| 1016 |
- |
|
| 1017 | 745 |
rep2 = splitData[j].trim(); |
| 1018 |
- |
|
| 1019 | 746 |
} |
| 1020 |
- |
|
| 1021 | 747 |
if(j == 4){ //치환문자3
|
| 1022 |
- |
|
| 1023 | 748 |
rep3 = splitData[j].trim(); |
| 1024 |
- |
|
| 1025 | 749 |
} |
| 1026 |
- |
|
| 1027 | 750 |
if(j == 5){ //치환문자4
|
| 1028 |
- |
|
| 1029 | 751 |
rep4 = splitData[j].trim(); |
| 1030 |
- |
|
| 1031 | 752 |
} |
| 1032 |
- |
|
| 1033 | 753 |
} |
| 1034 |
- |
|
| 1035 | 754 |
if (isPhoneValid == true) {
|
| 1036 | 755 |
//배열 끝에 데이터 추가해 주기 |
| 1037 | 756 |
realPhone.push({phone: phone, name: name, rep1 : rep1, rep2 : rep2, rep3 : rep3, rep4 : rep4 });
|
| 1038 | 757 |
} |
| 1039 |
- |
|
| 1040 | 758 |
}//else end |
| 1041 |
- |
|
| 1042 | 759 |
} |
| 1043 |
- |
|
| 1044 | 760 |
var recTableData = tableL.getRows(); // 받는사람 리스트의 전체 목록을 저장 |
| 1045 | 761 |
var tableData = []; |
| 1046 | 762 |
|
| 1047 | 763 |
//기존 받는사람 리스트를 배열에 미리 담아둔다. |
| 1048 | 764 |
if(recTableData.length > 0){
|
| 1049 |
- |
|
| 1050 | 765 |
for(var j=0; j < recTableData.length; j++){
|
| 1051 |
- |
|
| 1052 | 766 |
tableData.push({phone: removeDash(recTableData[j].getData().phone.trim()) , name: recTableData[j].getData().name, rep1: recTableData[j].getData().rep1, rep2: recTableData[j].getData().rep2, rep3: recTableData[j].getData().rep3, rep4: recTableData[j].getData().rep4, });
|
| 1053 |
- |
|
| 1054 | 767 |
} |
| 1055 |
- |
|
| 1056 | 768 |
} |
| 1057 |
- |
|
| 1058 | 769 |
if(realPhone.length > 0){
|
| 1059 |
- |
|
| 1060 | 770 |
for(var j=0; j < realPhone.length; j++){
|
| 1061 |
- |
|
| 1062 | 771 |
tableData.push({phone: removeDash(realPhone[j].phone.trim()) , name: realPhone[j].name, rep1: realPhone[j].rep1, rep2: realPhone[j].rep2, rep3: realPhone[j].rep3, rep4: realPhone[j].rep4});
|
| 1063 |
- |
|
| 1064 | 772 |
} |
| 1065 |
- |
|
| 1066 | 773 |
} |
| 1067 |
- |
|
| 1068 |
- //tableData.push(realPhone); |
|
| 1069 |
- |
|
| 1070 | 774 |
//중복 연락처 1개만 남기고 삭제하기 |
| 1071 | 775 |
var removeDuplPhone = dupliPhoneData(tableData); |
| 1072 |
- |
|
| 1073 | 776 |
//수신자 리스트에 전화번호 추가해주기 |
| 1074 |
- //tableL.addData(removeDuplPhone); |
|
| 1075 | 777 |
tableL.setData(removeDuplPhone); |
| 1076 |
- |
|
| 1077 | 778 |
totRows = tableL.getRows().length; |
| 1078 | 779 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 1079 |
- |
|
| 1080 | 780 |
var smsTxtArea = $('#smsTxtArea').val();
|
| 1081 |
- |
|
| 1082 | 781 |
//일괄변환 문구 결제금액 처리 |
| 1083 | 782 |
if(smsTxtArea.indexOf("[*이름*]") > -1
|
| 1084 | 783 |
|| smsTxtArea.indexOf("[*1*]") > -1
|
| 1085 | 784 |
|| smsTxtArea.indexOf("[*2*]") > -1
|
| 1086 | 785 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 1087 | 786 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 1088 |
- |
|
| 1089 | 787 |
fnReplCell_advc(); |
| 1090 | 788 |
}else{
|
| 1091 | 789 |
//결제 금액 구하기 |
... | ... | @@ -1094,166 +792,88 @@ |
| 1094 | 792 |
|
| 1095 | 793 |
if (tableErrorData.length > 0) {
|
| 1096 | 794 |
alert("올바르지 않은 휴대폰 번호가 "+ tableErrorData.length +" 건 있습니다.");
|
| 1097 |
- } |
|
| 1098 |
- |
|
| 1099 |
- |
|
| 795 |
+ } |
|
| 1100 | 796 |
// 미리보기 버튼 활성화 |
| 1101 | 797 |
updateButtons(0); |
| 1102 |
- |
|
| 1103 | 798 |
} |
| 1104 |
- |
|
| 1105 | 799 |
}); |
| 1106 | 800 |
|
| 1107 | 801 |
//받는사람 번호 버튼 클릭시 Tabulator에 데이터 넣어주기 |
| 1108 |
- $('.addCallToF').click(function(){
|
|
| 1109 |
- |
|
| 802 |
+ $('.addCallToF').click(function(){
|
|
| 1110 | 803 |
var textarea = $('#callTo');
|
| 1111 | 804 |
if (textarea.val() == null || textarea.val() == "") {
|
| 1112 | 805 |
alert("받는사람 번호를 입력해 주세요.");
|
| 1113 | 806 |
return false; |
| 1114 | 807 |
} |
| 1115 |
- |
|
| 1116 | 808 |
const numbers = textarea.val().split('\n')
|
| 1117 | 809 |
.map(num => removeDash(num.trim())) |
| 1118 | 810 |
.filter(num => num !== "") |
| 1119 | 811 |
.filter(num => isValidPhoneNumber(num)); // 유효한 번호만 필터링; |
| 1120 |
- |
|
| 1121 |
- console.log('numbers : ', numbers);
|
|
| 1122 | 812 |
const addrData = processPhoneNumbers(numbers); |
| 1123 |
- |
|
| 1124 |
- |
|
| 1125 | 813 |
// 기존 tableL의 데이터를 가져옵니다. |
| 1126 | 814 |
var existingData = tableL.getData(); |
| 1127 |
- |
|
| 1128 | 815 |
// 데이터 병합 및 중복 제거 |
| 1129 | 816 |
const result = mergeAndValidateData(existingData, addrData); |
| 1130 |
- |
|
| 1131 |
- |
|
| 1132 | 817 |
// 테이블 데이터 업데이트 |
| 1133 | 818 |
if (!updateTableData(tableL, result)) return false; |
| 1134 |
- |
|
| 1135 | 819 |
// textarea 초기화 |
| 1136 | 820 |
textarea.val(''); // jQuery 객체에서 값을 초기화할 때는 .val('') 사용
|
| 1137 |
- |
|
| 1138 | 821 |
}); |
| 1139 |
- |
|
| 1140 |
- |
|
| 1141 |
- |
|
| 1142 |
- |
|
| 1143 |
- |
|
| 1144 | 822 |
//받는사람 전체삭제 버튼 처리 |
| 1145 | 823 |
$('.all_del').click(function(){
|
| 1146 |
- |
|
| 1147 |
- var data = tableL.getRows(); |
|
| 1148 |
- |
|
| 824 |
+ var data = tableL.getRows(); |
|
| 1149 | 825 |
if(data == null || data == ""){
|
| 1150 |
- |
|
| 1151 | 826 |
alert("받는사람을 추가해 주세요.");
|
| 1152 | 827 |
return false; |
| 1153 |
- |
|
| 1154 | 828 |
}else{
|
| 1155 |
- |
|
| 1156 | 829 |
if(confirm("받는사람 목록을 모두 삭제하시겠습니까?")){
|
| 1157 | 830 |
tableL.clearData(); |
| 1158 | 831 |
$("#rowTotCnt").text(0); //총건수 수정
|
| 1159 | 832 |
$("#rowDupCnt").text(0); //중복건수 수정
|
| 1160 | 833 |
totalPriceSum(0); //결제 금액 수정 |
| 1161 | 834 |
} |
| 1162 |
- |
|
| 1163 | 835 |
} |
| 1164 |
- |
|
| 1165 | 836 |
}); |
| 1166 |
- |
|
| 1167 | 837 |
|
| 1168 | 838 |
// 받는사람 선택삭제 버튼 처리해주기 |
| 1169 | 839 |
$('.select_del').click(function(){
|
| 1170 |
- |
|
| 1171 | 840 |
if(tableL == null || tableL == ""){
|
| 1172 |
- |
|
| 1173 | 841 |
alert("받는사람을 추가해 주세요.");
|
| 1174 | 842 |
return false; |
| 1175 |
- |
|
| 1176 | 843 |
} |
| 1177 |
- |
|
| 1178 | 844 |
var selectedData = tableL.getSelectedRows(); |
| 1179 |
- |
|
| 845 |
+ |
|
| 1180 | 846 |
if(selectedData == "" || selectedData == null){
|
| 1181 |
- |
|
| 1182 | 847 |
alert("삭제할 연락처를 선택해주세요.");
|
| 1183 | 848 |
return false; |
| 1184 |
- |
|
| 1185 | 849 |
}else{ // 선택한 Row 데이터 삭제하기
|
| 1186 |
- |
|
| 1187 | 850 |
if(confirm("선택하신 받는 사람을 삭제하시겠습니까?")){
|
| 1188 |
- |
|
| 1189 | 851 |
// 선택 데이터 삭제 |
| 1190 | 852 |
selectedData.forEach(row => row.delete()); |
| 1191 |
- |
|
| 1192 |
- |
|
| 1193 | 853 |
totRows = tableL.getRows().length; |
| 1194 | 854 |
updateTotCnt(totRows); |
| 1195 |
- |
|
| 1196 | 855 |
var smsTxtArea = $('#smsTxtArea').val();
|
| 1197 |
- |
|
| 1198 | 856 |
//일괄변환 문구 결제금액 처리 |
| 1199 | 857 |
if(smsTxtArea.indexOf("[*이름*]") > -1
|
| 1200 | 858 |
|| smsTxtArea.indexOf("[*1*]") > -1
|
| 1201 | 859 |
|| smsTxtArea.indexOf("[*2*]") > -1
|
| 1202 | 860 |
|| smsTxtArea.indexOf("[*3*]") > -1
|
| 1203 | 861 |
|| smsTxtArea.indexOf("[*4*]") > -1){
|
| 1204 |
- |
|
| 1205 | 862 |
fnReplCell_advc(); |
| 1206 | 863 |
}else{
|
| 1207 | 864 |
//결제 금액 구하기 |
| 1208 | 865 |
totalPriceSum(totRows); |
| 1209 | 866 |
} |
| 1210 |
- |
|
| 1211 | 867 |
} |
| 1212 |
- |
|
| 1213 | 868 |
} |
| 1214 |
- |
|
| 1215 | 869 |
}); |
| 1216 |
- |
|
| 1217 |
-/* //받는사람 중복 삭제 |
|
| 1218 |
- $('.duple_del').click(function(){
|
|
| 1219 |
- |
|
| 1220 |
- //기존 연락처 모두 불러오기 |
|
| 1221 |
- var data = tableL.getRows(); |
|
| 1222 |
- var tableData = []; |
|
| 1223 |
- var dpCnt = 0; |
|
| 1224 |
- var totLen = tableL.getRows().length; |
|
| 1225 |
- |
|
| 1226 |
- for(var i=0; i < totLen; i++){
|
|
| 1227 |
- |
|
| 1228 |
- tableData.push({phone: data[i].getData().phone.trim(), name: data[i].getData().name});
|
|
| 1229 |
- |
|
| 1230 |
- } |
|
| 1231 |
- |
|
| 1232 |
- var removeDuplData = dupliPhoneData(tableData); |
|
| 1233 |
- |
|
| 1234 |
- tableL.setData(removeDuplData); |
|
| 1235 |
- |
|
| 1236 |
- //총 받는사람 수 계산 |
|
| 1237 |
- totRows = tableL.getRows().length; |
|
| 1238 |
- updateTotCnt(totRows); |
|
| 1239 |
- |
|
| 1240 |
- //결제 금액 구하기 |
|
| 1241 |
- totalPriceSum(totRows); |
|
| 1242 |
- |
|
| 1243 |
- }); */ |
|
| 1244 |
- |
|
| 1245 | 870 |
//주소록 불러오기 버튼 클릭시 |
| 1246 | 871 |
$('.popupAddr').click(function(){
|
| 1247 |
- |
|
| 1248 | 872 |
var login = '${LoginVO.id}';
|
| 1249 |
- |
|
| 1250 | 873 |
if(login == null || login == ''){
|
| 1251 |
- |
|
| 1252 | 874 |
alert("로그인 후 이용이 가능합니다.");
|
| 1253 | 875 |
return false; |
| 1254 |
- |
|
| 1255 | 876 |
} |
| 1256 |
- |
|
| 1257 | 877 |
$("#addrGroupLoad").load("/web/mjon/msgdata/selectAddrGroupListAjax.do", "" ,function(response, status, xhr){
|
| 1258 | 878 |
//리스트 스크롤 처리해주기 |
| 1259 | 879 |
$(".adr_pop_list").mCustomScrollbar({
|
... | ... | @@ -1263,21 +883,15 @@ |
| 1263 | 883 |
autoHideScrollbar: false |
| 1264 | 884 |
}); |
| 1265 | 885 |
}); |
| 1266 |
- |
|
| 1267 | 886 |
}); |
| 1268 |
- |
|
| 1269 | 887 |
//엑섹불러오기 버튼 클릭시 파일 첨부 실행 |
| 1270 | 888 |
$('.c3').click(function(){ // 엑셀파일 불러오기 선택 시
|
| 1271 |
- |
|
| 1272 | 889 |
$("#excelFile").click();
|
| 1273 |
- |
|
| 1274 | 890 |
}); |
| 1275 | 891 |
|
| 1276 | 892 |
//엑섹불러오기 버튼 클릭시 파일 첨부 실행 |
| 1277 | 893 |
$('.upImg').click(function(){ // 엑셀파일 불러오기 선택 시
|
| 1278 |
- |
|
| 1279 | 894 |
$("#imgFile").click();
|
| 1280 |
- |
|
| 1281 | 895 |
}); |
| 1282 | 896 |
|
| 1283 | 897 |
//최근전송내역 팝업 선택추가 버튼 처리(체크내역 받는사람 리스트로 추가해주기) |
... | ... | @@ -1292,20 +906,13 @@ |
| 1292 | 906 |
numbers.push(removeDash(chkPhone.trim())); |
| 1293 | 907 |
} |
| 1294 | 908 |
}); |
| 1295 |
- |
|
| 1296 |
- |
|
| 1297 |
- if(numbers.length < 1) |
|
| 1298 |
- {
|
|
| 909 |
+ if(numbers.length < 1) {
|
|
| 1299 | 910 |
alert("연락처를 선택해주세요.");
|
| 1300 | 911 |
return false; |
| 1301 |
- } |
|
| 1302 |
- |
|
| 1303 |
- |
|
| 912 |
+ } |
|
| 1304 | 913 |
fn_phoneAddProcess(tableL, numbers); |
| 1305 |
- |
|
| 1306 |
- |
|
| 914 |
+ |
|
| 1307 | 915 |
$("#btnLatestAddPhoneClose").trigger("click");
|
| 1308 |
- |
|
| 1309 | 916 |
}); |
| 1310 | 917 |
|
| 1311 | 918 |
//최근전송내역 팝업 전체추가 버튼 처리 |
... | ... | @@ -1325,28 +932,20 @@ |
| 1325 | 932 |
{
|
| 1326 | 933 |
alert("연락처를 선택해주세요.");
|
| 1327 | 934 |
return false; |
| 1328 |
- } |
|
| 1329 |
- |
|
| 1330 |
- |
|
| 935 |
+ } |
|
| 1331 | 936 |
fn_phoneAddProcess(tableL, numbers); |
| 1332 |
- |
|
| 1333 |
- |
|
| 937 |
+ |
|
| 1334 | 938 |
$("#btnLatestAddPhoneClose").trigger("click");
|
| 1335 |
- |
|
| 1336 | 939 |
}); |
| 1337 | 940 |
|
| 1338 | 941 |
//최근전송내역 팝업 선택 취소 버튼 처리 |
| 1339 | 942 |
$(document).on('click', '#latestCancelPhone', function (){
|
| 1340 |
- |
|
| 1341 | 943 |
$("input[name=latAddrChk]").prop("checked", false);
|
| 1342 |
- |
|
| 1343 | 944 |
}); |
| 1344 | 945 |
|
| 1345 | 946 |
//최근전송내역 팝업 삭제 버튼 처리 |
| 1346 | 947 |
$(document).on('click', '#latestAddrDel', function (){
|
| 1347 |
- |
|
| 1348 | 948 |
$(this).parent("#latestLi").remove();
|
| 1349 |
- |
|
| 1350 | 949 |
}); |
| 1351 | 950 |
|
| 1352 | 951 |
//자주보내는 번호 팝업 선택추가 버튼 처리(체크내역 받는사람 리스트로 추가해주기) |
... | ... | @@ -1361,17 +960,12 @@ |
| 1361 | 960 |
numbers.push(removeDash(chkPhone.trim())); |
| 1362 | 961 |
} |
| 1363 | 962 |
}); |
| 1364 |
- |
|
| 1365 |
- if(numbers.length < 1) |
|
| 1366 |
- {
|
|
| 963 |
+ if(numbers.length < 1) {
|
|
| 1367 | 964 |
alert("연락처를 선택해주세요.");
|
| 1368 | 965 |
return false; |
| 1369 |
- } |
|
| 1370 |
- |
|
| 1371 |
- |
|
| 966 |
+ } |
|
| 1372 | 967 |
fn_phoneAddProcess(tableL, numbers); |
| 1373 |
- |
|
| 1374 |
- |
|
| 968 |
+ |
|
| 1375 | 969 |
$("#btnLatestAddPhoneClose").trigger("click");
|
| 1376 | 970 |
}); |
| 1377 | 971 |
|
... | ... | @@ -1387,27 +981,18 @@ |
| 1387 | 981 |
numbers.push(removeDash(chkPhone.trim())); |
| 1388 | 982 |
} |
| 1389 | 983 |
}); |
| 1390 |
- |
|
| 1391 |
- |
|
| 1392 |
- if(numbers.length < 1) |
|
| 1393 |
- {
|
|
| 984 |
+ if(numbers.length < 1) {
|
|
| 1394 | 985 |
alert("연락처를 선택해주세요.");
|
| 1395 | 986 |
return false; |
| 1396 |
- } |
|
| 1397 |
- |
|
| 1398 |
- |
|
| 987 |
+ } |
|
| 1399 | 988 |
fn_phoneAddProcess(tableL, numbers); |
| 1400 |
- |
|
| 1401 |
- |
|
| 989 |
+ |
|
| 1402 | 990 |
$("#btnLatestAddPhoneClose").trigger("click");
|
| 1403 |
- |
|
| 1404 | 991 |
}); |
| 1405 | 992 |
|
| 1406 | 993 |
//자주보내는 번호 팝업 선택 취소 버튼 처리 |
| 1407 | 994 |
$(document).on('click', '#bookMarkCancelPhone', function (){
|
| 1408 |
- |
|
| 1409 | 995 |
$("input[name=bookAddrChk]").prop("checked", false);
|
| 1410 |
- |
|
| 1411 | 996 |
}); |
| 1412 | 997 |
|
| 1413 | 998 |
//자주보내는 번호 팝업 삭제 버튼 처리 |
... | ... | @@ -1432,59 +1017,36 @@ |
| 1432 | 1017 |
|
| 1433 | 1018 |
//오류 검사 버튼 처리 |
| 1434 | 1019 |
$('.check_validity').click(function(){
|
| 1435 |
- |
|
| 1436 | 1020 |
var invalid = tableL.getInvalidCells(); //오류 데이터 체크 |
| 1437 | 1021 |
var dataLen = tableL.getRows().length; //연락처 데이터 갯수 |
| 1438 | 1022 |
var totLen = invalid.length; //오류 데이터 갯수 |
| 1439 | 1023 |
var errMsg = ""; //최종 alert에 표시할 메시지 저장 변수 |
| 1440 |
- |
|
| 1441 | 1024 |
if(dataLen > 0){ //연락처 정보가 있으면 수행
|
| 1442 |
- |
|
| 1443 | 1025 |
if(totLen > 0){ //내용에 오류가 있으면 수행
|
| 1444 |
- |
|
| 1445 | 1026 |
//오류 데이터 값 저장 |
| 1446 | 1027 |
for(var i=0; i < totLen; i++){
|
| 1447 |
- |
|
| 1448 | 1028 |
var cellValue = invalid[i].getValue(); |
| 1449 |
- |
|
| 1450 | 1029 |
if(i == 0){
|
| 1451 |
- |
|
| 1452 | 1030 |
errMsg = cellValue; |
| 1453 |
- |
|
| 1454 | 1031 |
}else{
|
| 1455 |
- |
|
| 1456 | 1032 |
errMsg = errMsg +", "+ cellValue; |
| 1457 |
- |
|
| 1458 | 1033 |
} |
| 1459 |
- |
|
| 1460 | 1034 |
} |
| 1461 |
- |
|
| 1462 | 1035 |
if(errMsg == "" || errMsg == null){
|
| 1463 |
- |
|
| 1464 | 1036 |
alert("내용에 오류가 있습니다.");
|
| 1465 | 1037 |
return false; |
| 1466 |
- |
|
| 1467 | 1038 |
}else{
|
| 1468 |
- |
|
| 1469 | 1039 |
alert(errMsg + "의 내용에 오류가 있습니다."); |
| 1470 | 1040 |
return false; |
| 1471 |
- |
|
| 1472 | 1041 |
} |
| 1473 |
- |
|
| 1474 | 1042 |
}else{
|
| 1475 |
- |
|
| 1476 | 1043 |
alert("오류 데이터가 없습니다.");
|
| 1477 | 1044 |
return false; |
| 1478 |
- |
|
| 1479 | 1045 |
} |
| 1480 |
- |
|
| 1481 | 1046 |
}else{
|
| 1482 |
- |
|
| 1483 | 1047 |
alert("연락처를 입력해 주세요.");
|
| 1484 | 1048 |
return false; |
| 1485 |
- |
|
| 1486 | 1049 |
} |
| 1487 |
- |
|
| 1488 | 1050 |
}); |
| 1489 | 1051 |
|
| 1490 | 1052 |
//문자입력창의 첨부된 이미지 순서를 바꿀 때 |
... | ... | @@ -1494,7 +1056,6 @@ |
| 1494 | 1056 |
var previewHtml = ""; |
| 1495 | 1057 |
var imgCnt = $("#imgCnt").val();
|
| 1496 | 1058 |
//이미지 갯수만큼 for문 돌림 |
| 1497 |
- |
|
| 1498 | 1059 |
for(var i=0; i<imgCnt; i++) {
|
| 1499 | 1060 |
var imgTag = $(".thumb_wrap li:eq("+i+") div").html(); // 썸네일에 있는 이미지 태그 가져오기
|
| 1500 | 1061 |
previewHtml += '<div class="img_box preBoxF on_scroll_img" id="preBoxF'+(i+1)+'">' |
... | ... | @@ -1504,53 +1065,37 @@ |
| 1504 | 1065 |
$('.preViewShort div').remove(); //미리보기 영역에 있던 이미지 다 지우고
|
| 1505 | 1066 |
$('.preViewShort').append(previewHtml); //새로 sorting된 이미지 그려주기
|
| 1506 | 1067 |
}, 100); |
| 1507 |
- |
|
| 1508 | 1068 |
}); |
| 1509 |
- |
|
| 1510 | 1069 |
//문자 샘플 탭, 그림문자 샘플 탭 선택시 옵션 초기화 |
| 1511 | 1070 |
$('.tab').click(function(){
|
| 1512 |
- |
|
| 1513 | 1071 |
var index = $(this).index(); |
| 1514 | 1072 |
var form = document.letterForm; |
| 1515 |
- |
|
| 1516 | 1073 |
if($(this).hasClass("active") === true){
|
| 1517 |
- |
|
| 1518 | 1074 |
if(index == 0){
|
| 1519 |
- |
|
| 1520 | 1075 |
form.pageIndex.value = 1; |
| 1521 | 1076 |
form.letterType.value = "S"; |
| 1522 | 1077 |
form.categoryCode.value = ""; |
| 1523 | 1078 |
form.hashTag.value = ""; |
| 1524 |
- |
|
| 1525 | 1079 |
}else if(index == 1){
|
| 1526 |
- |
|
| 1527 | 1080 |
form.pageIndex.value = 1; |
| 1528 | 1081 |
form.letterType.value = "P"; |
| 1529 | 1082 |
form.categoryCode.value = ""; |
| 1530 | 1083 |
form.hashTag.value = ""; |
| 1531 |
- |
|
| 1532 | 1084 |
}else if(index == 2){
|
| 1533 |
- |
|
| 1534 | 1085 |
setTimeout(function(){
|
| 1535 | 1086 |
map.relayout(); |
| 1536 | 1087 |
map.setCenter(testcoords); |
| 1537 | 1088 |
}, 0); |
| 1538 |
- |
|
| 1539 | 1089 |
} |
| 1540 |
- |
|
| 1541 | 1090 |
} |
| 1542 |
- |
|
| 1543 | 1091 |
}); |
| 1544 | 1092 |
|
| 1545 | 1093 |
|
| 1546 | 1094 |
//이미지 선택시 그림문자 처리 |
| 1547 |
- $(document).on('click', '.photoOnImg', function(){
|
|
| 1548 |
- |
|
| 1095 |
+ $(document).on('click', '.photoOnImg', function(){
|
|
| 1549 | 1096 |
// 클릭 시 조회수 증가 로직 |
| 1550 | 1097 |
var letterId = $(this).attr('id');
|
| 1551 |
- |
|
| 1552 | 1098 |
var url = "/web/mjon/msgdata/updateSmsTemplateCntAjax.do"; |
| 1553 |
- |
|
| 1554 | 1099 |
$.ajax({
|
| 1555 | 1100 |
type: "POST", |
| 1556 | 1101 |
url: url, |
... | ... | @@ -1564,89 +1109,58 @@ |
| 1564 | 1109 |
error: function (e) {console.log("ERROR : ", e); }
|
| 1565 | 1110 |
}); |
| 1566 | 1111 |
// 클릭 시 조회수 증가 로직 끝 |
| 1567 |
- |
|
| 1568 | 1112 |
var imgId = $(this).parent().find("input").val();
|
| 1569 |
- |
|
| 1570 | 1113 |
imageControl($(this), "edit_n", "Template", imgId); |
| 1571 |
- |
|
| 1572 | 1114 |
var contents = $('#smsTxtArea').val();
|
| 1573 |
- //(contents); |
|
| 1574 |
- |
|
| 1575 | 1115 |
totRows = tableL.getRows().length; |
| 1576 | 1116 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 1577 |
- |
|
| 1578 | 1117 |
//일괄변환 문구 결제금액 처리 |
| 1579 | 1118 |
if(contents.indexOf("[*이름*]") > -1
|
| 1580 | 1119 |
|| contents.indexOf("[*1*]") > -1
|
| 1581 | 1120 |
|| contents.indexOf("[*2*]") > -1
|
| 1582 | 1121 |
|| contents.indexOf("[*3*]") > -1
|
| 1583 | 1122 |
|| contents.indexOf("[*4*]") > -1){
|
| 1584 |
- |
|
| 1585 | 1123 |
fnReplCell_advc(); |
| 1586 |
- |
|
| 1587 | 1124 |
}else{
|
| 1588 |
- |
|
| 1589 | 1125 |
//결제금액 표시해주기 |
| 1590 | 1126 |
var totalPrice = totalPriceSum(totRows); |
| 1591 | 1127 |
$('#totalPrice').text(totalPrice);
|
| 1592 | 1128 |
$('#txtReplYn').val("N");
|
| 1593 |
- |
|
| 1594 | 1129 |
} |
| 1595 | 1130 |
|
| 1596 | 1131 |
var sendOfT=$('.send_top').offset().top;
|
| 1597 | 1132 |
$('html,body').stop().animate({'scrollTop':sendOfT-60},250);
|
| 1598 |
- /* |
|
| 1599 |
- //결제 금액 구하기 |
|
| 1600 |
- totalPriceSum(totRows); */ |
|
| 1601 |
- |
|
| 1602 | 1133 |
}); |
| 1603 |
- |
|
| 1604 |
- |
|
| 1605 | 1134 |
//그림문자 이미지 삭제 처리 - 동적으로 추가한 객체는 on 함수로 불러올 수 있다. |
| 1606 | 1135 |
$(document).on('click', '.file_close', function(){
|
| 1607 | 1136 |
var delImgPath = ""; //삭제하려는 이미지 경로 받아오기 |
| 1608 | 1137 |
var index = $(this).parent().index(); // 현재 선택 된 객체 인덱스 번호 받아오기 |
| 1609 | 1138 |
var imgCnt = $("#imgCnt").val(); // 현재 첨부된 이미지의 갯수
|
| 1610 | 1139 |
var contents = $('#smsTxtArea').val();
|
| 1611 |
- |
|
| 1612 | 1140 |
//선택한 태그의 부모 이미지 li 객체 삭제 |
| 1613 | 1141 |
$(this).parent(".delLi").remove();
|
| 1614 |
- |
|
| 1615 | 1142 |
//미리보기 화면에서의 이미지 객체 삭제 |
| 1616 | 1143 |
//삭제하려는 이미지 경로 받아오기 |
| 1617 | 1144 |
delImgPath = $('.preBoxF').eq(index).find("img").attr("src");
|
| 1618 |
- |
|
| 1619 | 1145 |
$('.preBoxF').eq(index).remove();
|
| 1620 |
- |
|
| 1621 | 1146 |
// 삭제한 이미지 경로 배열에서 삭제해 주기 |
| 1622 | 1147 |
for(var i=0; i < imgFilePath.length; i++){
|
| 1623 |
- |
|
| 1624 | 1148 |
if(imgFilePath[i] == delImgPath){
|
| 1625 |
- |
|
| 1626 | 1149 |
imgFilePath.splice(i, 1); //이미지 경로 삭제 |
| 1627 | 1150 |
imgFileId.splice(i, 1); //이미지 아이디 삭제 - 내 문자 보관함 저장용으로 사용 |
| 1628 | 1151 |
i--; |
| 1629 | 1152 |
} |
| 1630 |
- |
|
| 1631 | 1153 |
} |
| 1632 |
- |
|
| 1633 |
- //imgCnt--; |
|
| 1634 | 1154 |
$("#imgCnt").val(Number(imgCnt) - 1);
|
| 1635 |
- |
|
| 1636 | 1155 |
//미리보기 포토 1,2,3 번 번호 표시 변경 |
| 1637 | 1156 |
$('.photo_num_02').hide();
|
| 1638 | 1157 |
$('.photo_num_03').hide();
|
| 1639 | 1158 |
if(imgCnt > 2){
|
| 1640 |
- |
|
| 1641 | 1159 |
$('.photo_num_01').show();
|
| 1642 | 1160 |
$('.photo_num_02').show();
|
| 1643 |
- |
|
| 1644 |
- |
|
| 1645 | 1161 |
}else if(imgCnt > 1){
|
| 1646 | 1162 |
$('.photo_num_01').show();
|
| 1647 |
- |
|
| 1648 | 1163 |
}else{
|
| 1649 |
- |
|
| 1650 | 1164 |
//그림을 모두 삭제 했을때 단문으로 변경 |
| 1651 | 1165 |
$('.preShort').show();
|
| 1652 | 1166 |
$('.prePhoto').hide();
|
... | ... | @@ -1655,62 +1169,46 @@ |
| 1655 | 1169 |
$('.msg_com').addClass("msg_short");
|
| 1656 | 1170 |
$('.put_left').removeClass("photo");
|
| 1657 | 1171 |
$('#msgType').val("4"); // 메세지 타입 설정
|
| 1658 |
- |
|
| 1172 |
+ |
|
| 1659 | 1173 |
fnByteString(contents); |
| 1660 |
- |
|
| 1661 | 1174 |
} |
| 1662 |
- |
|
| 1663 | 1175 |
//수신목록 전체 데이터 갯수 구하기 |
| 1664 | 1176 |
updateTotCnt(totRows); |
| 1665 |
- |
|
| 1666 | 1177 |
//일괄변환 문구 결제금액 처리 |
| 1667 | 1178 |
if(contents.indexOf("[*이름*]") > -1
|
| 1668 | 1179 |
|| contents.indexOf("[*1*]") > -1
|
| 1669 | 1180 |
|| contents.indexOf("[*2*]") > -1
|
| 1670 | 1181 |
|| contents.indexOf("[*3*]") > -1
|
| 1671 | 1182 |
|| contents.indexOf("[*4*]") > -1){
|
| 1672 |
- |
|
| 1673 | 1183 |
fnReplCell_advc(); |
| 1674 |
- |
|
| 1675 | 1184 |
}else{
|
| 1676 |
- |
|
| 1677 | 1185 |
//결제금액 표시해주기 |
| 1678 | 1186 |
var totalPrice = totalPriceSum(totRows); |
| 1679 | 1187 |
$('#totalPrice').text(totalPrice);
|
| 1680 | 1188 |
$('#txtReplYn').val("N");
|
| 1681 |
- |
|
| 1682 | 1189 |
} |
| 1683 |
- |
|
| 1684 | 1190 |
var scrollHei = $(".mCustomScrollBox").height();
|
| 1685 | 1191 |
if(scrollHei > 488) {
|
| 1686 | 1192 |
$(".img_box").removeClass("on_scroll_img");
|
| 1687 | 1193 |
} |
| 1688 |
- |
|
| 1689 | 1194 |
}); |
| 1690 | 1195 |
|
| 1691 | 1196 |
// 초기화 버튼 처리 |
| 1692 | 1197 |
$('.btnReset').click(function(){
|
| 1693 |
- |
|
| 1694 | 1198 |
//일반문자 라이오 선택해 주기 |
| 1695 | 1199 |
$("#send_adYnN").prop("checked", true);
|
| 1696 |
- |
|
| 1697 | 1200 |
// Bline 확연 및 라디오 버튼 클릭 이벤트 추가 |
| 1698 | 1201 |
var blineCodeYn = $("#blineCode").val();
|
| 1699 | 1202 |
if(blineCodeYn != 'N' && blineCodeYn != ''){
|
| 1700 | 1203 |
$('input[name="send_adYn"]').val(['Y']);
|
| 1701 | 1204 |
$(".send_adYnN").css('display', 'none');
|
| 1702 | 1205 |
} |
| 1703 |
- |
|
| 1704 | 1206 |
$('.delLi').each(function(){
|
| 1705 |
- |
|
| 1706 | 1207 |
$(this).remove(); |
| 1707 |
- |
|
| 1708 | 1208 |
}); |
| 1709 | 1209 |
|
| 1710 | 1210 |
$('.preBoxF').each(function(){
|
| 1711 |
- |
|
| 1712 | 1211 |
$(this).remove(); |
| 1713 |
- |
|
| 1714 | 1212 |
}); |
| 1715 | 1213 |
|
| 1716 | 1214 |
//그림 카운트 초기화 |
... | ... | @@ -1727,17 +1225,13 @@ |
| 1727 | 1225 |
//메세지 내용 초기화 |
| 1728 | 1226 |
$('#smsTxtArea').val("");
|
| 1729 | 1227 |
fnByteString("");
|
| 1730 |
- |
|
| 1731 | 1228 |
}); |
| 1732 | 1229 |
|
| 1733 | 1230 |
// 동적으로 추가해주기 때문에 on 사용 |
| 1734 |
- $(document).on('click', '.letterMsg', function(){ //문자 템플릿 선택시 상단 문자 내용에 입력해주기
|
|
| 1735 |
- |
|
| 1231 |
+ $(document).on('click', '.letterMsg', function(){ //문자 템플릿 선택시 상단 문자 내용에 입력해주기
|
|
| 1736 | 1232 |
// 클릭 시 조회수 증가 로직 |
| 1737 | 1233 |
var letterId = $(this).attr('id');
|
| 1738 |
- |
|
| 1739 | 1234 |
var url = "/web/mjon/msgdata/updateSmsTemplateCntAjax.do"; |
| 1740 |
- |
|
| 1741 | 1235 |
$.ajax({
|
| 1742 | 1236 |
type: "POST", |
| 1743 | 1237 |
url: url, |
... | ... | @@ -1764,30 +1258,20 @@ |
| 1764 | 1258 |
}); |
| 1765 | 1259 |
|
| 1766 | 1260 |
// 동적으로 추가해주기 때문에 on 사용 |
| 1767 |
- $(document).on('click', '.btnSearchF', function(){ // 검색 기능 실행
|
|
| 1768 |
- |
|
| 1261 |
+ $(document).on('click', '.btnSearchF', function(){ // 검색 기능 실행
|
|
| 1769 | 1262 |
var formL = document.letterForm; |
| 1770 | 1263 |
var formM = document.myMsgForm; |
| 1771 | 1264 |
formL.categoryCode.value = ""; //해시태그 검색 시 카테고리 제거 |
| 1772 | 1265 |
formL.upperCateNo.value = ""; //해시태그 검색 시 카테고리 제거 |
| 1773 |
- /* if(form.searchKeyword.value == ""){
|
|
| 1774 |
- |
|
| 1775 |
- alert("검색어를 입력해 주세요.");
|
|
| 1776 |
- return false; |
|
| 1777 |
- |
|
| 1778 |
- } */ |
|
| 1779 |
- |
|
| 1780 | 1266 |
var tabIndex = $(".selectedTab").children(".active").index();
|
| 1781 | 1267 |
|
| 1782 | 1268 |
//문자 리스트 불러오기 |
| 1783 | 1269 |
if(tabIndex == 0) {
|
| 1784 |
- |
|
| 1785 | 1270 |
if($('.tDep1_letType a').eq(0).hasClass('on')) {
|
| 1786 | 1271 |
formL.letterType.value="S"; |
| 1787 | 1272 |
} else if ($('.tDep1_letType a').eq(1).hasClass('on')) {
|
| 1788 | 1273 |
formL.letterType.value="L"; |
| 1789 | 1274 |
} |
| 1790 |
- |
|
| 1791 | 1275 |
fnLetterListAjax(1); |
| 1792 | 1276 |
} |
| 1793 | 1277 |
//그림 문자 리스트 불러오기 |
... | ... | @@ -1810,16 +1294,13 @@ |
| 1810 | 1294 |
var formM = document.myMsgForm; |
| 1811 | 1295 |
formL.categoryCode.value = ""; //탭 선택시 카테고리 제거 |
| 1812 | 1296 |
formL.upperCateNo.value = ""; //탭 선택시 카테고리 제거 |
| 1813 |
- |
|
| 1814 | 1297 |
var tabIndex = $(".selectedTab").children(".active").index();
|
| 1815 |
- |
|
| 1816 | 1298 |
//2줄보기, 4줄보기 초기화 |
| 1817 | 1299 |
$("#LPageUnit option:eq(0)").prop("selected", true);
|
| 1818 | 1300 |
$("#PhPageUnit option:eq(0)").prop("selected", true);
|
| 1819 | 1301 |
$("#msgPageUnit option:eq(0)").prop("selected", true);
|
| 1820 | 1302 |
|
| 1821 | 1303 |
$('.bottom_content .area_total_count').hide();
|
| 1822 |
- |
|
| 1823 | 1304 |
//문자 리스트 불러오기 |
| 1824 | 1305 |
if(tabIndex == 0) {
|
| 1825 | 1306 |
formL.letterType.value="S"; |
... | ... | @@ -1840,55 +1321,34 @@ |
| 1840 | 1321 |
formM.searchKeyword.value = ""; |
| 1841 | 1322 |
fnMyMsgListAjax(1); |
| 1842 | 1323 |
} |
| 1843 |
- |
|
| 1844 | 1324 |
}); |
| 1845 |
- |
|
| 1846 | 1325 |
/* |
| 1847 |
- |
|
| 1848 |
- 단문 / 장문 탭 옵션 선택시 실행 |
|
| 1849 |
- |
|
| 1326 |
+ 단문 / 장문 탭 옵션 선택시 실행 |
|
| 1850 | 1327 |
**/ |
| 1851 |
- |
|
| 1852 | 1328 |
$('.tDep1_mType').click(function(){ // 전체,기업, 개인 선택 옵션 처리
|
| 1853 |
- |
|
| 1854 | 1329 |
var mType = $(this).find('.on').text();
|
| 1855 | 1330 |
var form = document.letterForm; |
| 1856 | 1331 |
|
| 1857 | 1332 |
if(mType == "전체"){
|
| 1858 |
- |
|
| 1859 | 1333 |
form.memberType.value = ""; |
| 1860 |
- |
|
| 1861 | 1334 |
}else if(mType == "기업"){
|
| 1862 |
- |
|
| 1863 | 1335 |
form.memberType.value = "B"; |
| 1864 |
- |
|
| 1865 | 1336 |
}else{
|
| 1866 |
- |
|
| 1867 | 1337 |
form.memberType.value = "P"; |
| 1868 |
- |
|
| 1869 | 1338 |
} |
| 1870 |
- |
|
| 1871 |
- //문자 리스트 불러오기 |
|
| 1872 |
- //form.letterType.value = "S"; |
|
| 1873 | 1339 |
form.categoryCode.value = ""; |
| 1874 | 1340 |
form.hashTag.value = ""; |
| 1875 | 1341 |
form.pageIndex.value = 1; |
| 1876 |
- |
|
| 1877 | 1342 |
//문자 리스트 불러오기 |
| 1878 | 1343 |
fnLetterListAjax(1); |
| 1879 |
- |
|
| 1880 | 1344 |
}); |
| 1881 | 1345 |
|
| 1882 | 1346 |
$('.tDep1_letType').click(function(){ // 단문, 장문 선택 시 옵션처리
|
| 1883 |
- |
|
| 1884 | 1347 |
var letterType = $(this).find('.on').attr("value");
|
| 1885 | 1348 |
var form = document.letterForm; |
| 1886 |
- |
|
| 1887 | 1349 |
form.letterType.value = letterType; |
| 1888 |
- |
|
| 1889 | 1350 |
//문자 리스트 불러오기 |
| 1890 | 1351 |
fnLetterListAjax(1); |
| 1891 |
- |
|
| 1892 | 1352 |
}); |
| 1893 | 1353 |
|
| 1894 | 1354 |
$('.tDep1_cateCode').click(function(){ // 카테고리 선택 시 옵션 처리
|
... | ... | @@ -1901,9 +1361,7 @@ |
| 1901 | 1361 |
} |
| 1902 | 1362 |
|
| 1903 | 1363 |
if(cateCode == "all"){ //전체 선택시
|
| 1904 |
- |
|
| 1905 |
- cateCode = ""; |
|
| 1906 |
- |
|
| 1364 |
+ cateCode = ""; |
|
| 1907 | 1365 |
} else {
|
| 1908 | 1366 |
//카테고리 코드 클릭 시 해쉬태그 초기화 후 전체 선택 |
| 1909 | 1367 |
form.hashTag.value=""; |
... | ... | @@ -1915,10 +1373,8 @@ |
| 1915 | 1373 |
form.pageIndex.value = 1; |
| 1916 | 1374 |
//카테고리 클릭 시 검색자 초기화 |
| 1917 | 1375 |
form.searchKeyword.value = ""; |
| 1918 |
- |
|
| 1919 | 1376 |
//문자 리스트 불러오기 |
| 1920 | 1377 |
fnLetterListAjax(1); |
| 1921 |
- |
|
| 1922 | 1378 |
}); |
| 1923 | 1379 |
|
| 1924 | 1380 |
$('.tDep1_threeCateCode').click(function(){ // 하위 카테고리 선택 시 문자샘플 조회
|
... | ... | @@ -1930,57 +1386,35 @@ |
| 1930 | 1386 |
//해쉬태그 검색자 초기화 |
| 1931 | 1387 |
form.searchKeyword.value = ""; |
| 1932 | 1388 |
form.pageIndex.value = 1; |
| 1933 |
- |
|
| 1934 | 1389 |
//문자 리스트 불러오기 |
| 1935 | 1390 |
fnLetterListAjax(1); |
| 1936 |
- |
|
| 1937 | 1391 |
}); |
| 1938 | 1392 |
|
| 1939 | 1393 |
$('.tDep1_hashTag').click(function(){ // 해시 태그 선택 시 옵션 처리
|
| 1940 | 1394 |
var hashTag = $(this).find('.on').attr("value");
|
| 1941 | 1395 |
var form = document.letterForm; |
| 1942 |
- |
|
| 1943 | 1396 |
//해쉬태그 클릭 시 카테고리코드 초기화 후 전체 선택 |
| 1944 | 1397 |
form.categoryCode.value=""; |
| 1945 | 1398 |
$('.tDep1_cateCode').find('.on').removeClass('on');
|
| 1946 | 1399 |
$('.tDep1_cateCode').find('.cateAll').addClass('on');
|
| 1947 | 1400 |
//해쉬태그 클릭 시 검색자 초기화 |
| 1948 | 1401 |
form.searchKeyword.value = ""; |
| 1949 |
- |
|
| 1950 | 1402 |
form.hashTag.value = hashTag; |
| 1951 | 1403 |
form.pageIndex.value = 1; |
| 1952 |
- |
|
| 1953 | 1404 |
//문자 리스트 불러오기 |
| 1954 | 1405 |
fnLetterListAjax(1); |
| 1955 |
- |
|
| 1956 | 1406 |
}); |
| 1957 |
- |
|
| 1958 |
- |
|
| 1959 |
- /* |
|
| 1960 |
- |
|
| 1961 |
- 그림문자 탭 옵션 선택시 사용 |
|
| 1962 |
- |
|
| 1963 |
- */ |
|
| 1964 |
- |
|
| 1407 |
+ /* 그림문자 탭 옵션 선택시 사용 */ |
|
| 1965 | 1408 |
$('.tDep2_mType').click(function(){ // 전체,기업, 개인 선택 옵션 처리
|
| 1966 |
- |
|
| 1967 | 1409 |
var mType = $(this).find('.on').text();
|
| 1968 | 1410 |
var form = document.letterForm; |
| 1969 |
- |
|
| 1970 | 1411 |
if(mType == "전체"){
|
| 1971 |
- |
|
| 1972 | 1412 |
form.memberType.value = ""; |
| 1973 |
- |
|
| 1974 | 1413 |
}else if(mType == "기업"){
|
| 1975 |
- |
|
| 1976 | 1414 |
form.memberType.value = "B"; |
| 1977 |
- |
|
| 1978 | 1415 |
}else{
|
| 1979 |
- |
|
| 1980 | 1416 |
form.memberType.value = "P"; |
| 1981 |
- |
|
| 1982 | 1417 |
} |
| 1983 |
- |
|
| 1984 | 1418 |
//문자 리스트 불러오기 |
| 1985 | 1419 |
form.letterType.value = "P"; |
| 1986 | 1420 |
form.categoryCode.value = ""; |
... | ... | @@ -1988,29 +1422,22 @@ |
| 1988 | 1422 |
form.pageIndex.value = 1; |
| 1989 | 1423 |
|
| 1990 | 1424 |
fnPhotoListAjax(1); |
| 1991 |
- |
|
| 1992 | 1425 |
}); |
| 1993 | 1426 |
|
| 1994 |
- $('.tDep2_letType').click(function(){ // 그림문자 선택
|
|
| 1995 |
- |
|
| 1427 |
+ $('.tDep2_letType').click(function(){ // 그림문자 선택
|
|
| 1996 | 1428 |
var letterType = $(this).find('.on').attr("value");
|
| 1997 | 1429 |
var form = document.letterForm; |
| 1998 | 1430 |
form.letterType.value = 'P'; |
| 1999 | 1431 |
|
| 2000 | 1432 |
//문자 리스트 불러오기 |
| 2001 | 1433 |
fnPhotoListAjax(1); |
| 2002 |
- |
|
| 2003 | 1434 |
}); |
| 2004 | 1435 |
|
| 2005 | 1436 |
$('.tDep2_cateCode').click(function(){ // 그림 문자 카테고리 선택 시 옵션 처리
|
| 2006 |
- |
|
| 2007 | 1437 |
var cateCode = $(this).find('.on').attr("value");
|
| 2008 | 1438 |
var form = document.letterForm; |
| 2009 |
- |
|
| 2010 | 1439 |
if(cateCode == "all"){ //전체 선택시
|
| 2011 |
- |
|
| 2012 |
- cateCode = ""; |
|
| 2013 |
- |
|
| 1440 |
+ cateCode = ""; |
|
| 2014 | 1441 |
} else {
|
| 2015 | 1442 |
//카테고리 코드 클릭 시 해쉬태그 초기화 후 전체 선택 |
| 2016 | 1443 |
form.hashTag.value=""; |
... | ... | @@ -2025,7 +1452,6 @@ |
| 2025 | 1452 |
form.searchKeyword.value = ""; |
| 2026 | 1453 |
//문자 리스트 불러오기 |
| 2027 | 1454 |
fnPhotoListAjax(1); |
| 2028 |
- |
|
| 2029 | 1455 |
}); |
| 2030 | 1456 |
|
| 2031 | 1457 |
$('.tDep2_threeCateCode').click(function(){ // 하위 카테고리 선택 시 문자샘플 조회
|
... | ... | @@ -2037,31 +1463,25 @@ |
| 2037 | 1463 |
//해쉬태그 검색자 초기화 |
| 2038 | 1464 |
form.searchKeyword.value = ""; |
| 2039 | 1465 |
form.pageIndex.value = 1; |
| 2040 |
- |
|
| 2041 | 1466 |
//그림문자 리스트 불러오기 |
| 2042 | 1467 |
fnPhotoListAjax(1); |
| 2043 | 1468 |
}); |
| 2044 |
- |
|
| 2045 |
- |
|
| 1469 |
+ |
|
| 2046 | 1470 |
$('.tDep2_hashTag').click(function(){ // 그림문자 해시 태그 선택 시 옵션 처리
|
| 2047 | 1471 |
var hashTag = $(this).find('.on').attr("value");
|
| 2048 | 1472 |
var form = document.letterForm; |
| 2049 |
- |
|
| 2050 | 1473 |
//해쉬태그 클릭 시 카테고리코드 초기화 후 전체 선택 |
| 2051 | 1474 |
form.categoryCode.value=""; |
| 2052 | 1475 |
$('.tDep2_cateCode').find('.on').removeClass('on');
|
| 2053 | 1476 |
$('.tDep2_cateCode').find('.cateAll').addClass('on');
|
| 2054 | 1477 |
//해쉬태그 클릭 시 검색자 초기화 |
| 2055 | 1478 |
form.searchKeyword.value = ""; |
| 2056 |
- |
|
| 2057 | 1479 |
form.hashTag.value = hashTag; |
| 2058 | 1480 |
form.pageIndex.value = 1; |
| 2059 |
- |
|
| 2060 | 1481 |
//문자 리스트 불러오기 |
| 2061 | 1482 |
fnPhotoListAjax(1); |
| 2062 | 1483 |
}); |
| 2063 |
- |
|
| 2064 |
- |
|
| 1484 |
+ |
|
| 2065 | 1485 |
$(".fontPlus").click(function () {
|
| 2066 | 1486 |
var currentSize = $(".preview_auto").css("fontSize");
|
| 2067 | 1487 |
var size = parseInt(currentSize, 10) * 1.2; |
... | ... | @@ -2084,7 +1504,6 @@ |
| 2084 | 1504 |
|
| 2085 | 1505 |
//즉시, 예약 선택시 날짜 영역 초기 표시 |
| 2086 | 1506 |
var reYn = $("input[name=reserYn]:checked").val();
|
| 2087 |
- |
|
| 2088 | 1507 |
if(reYn == "N"){
|
| 2089 | 1508 |
$('.rev_selected').hide();
|
| 2090 | 1509 |
}else{
|
... | ... | @@ -2105,48 +1524,6 @@ |
| 2105 | 1524 |
$('.send_btn .btnType:first-child').html('예약하기');
|
| 2106 | 1525 |
}); |
| 2107 | 1526 |
}); |
| 2108 |
- |
|
| 2109 |
-/* |
|
| 2110 |
- * |
|
| 2111 |
- function advMsgInsert(){
|
|
| 2112 |
- |
|
| 2113 |
- var advStr = '<div class="ad_txt"><p>(광고)</p></div>'; |
|
| 2114 |
- var advDenyStr = '<div class="deny_txt"><p>무료거부 0808800858</p> </div>'; |
|
| 2115 |
- |
|
| 2116 |
- var preAdvStr = '<p class="ad_tit">(광고)</p>'; |
|
| 2117 |
- var preAdvDenyStr = '<p class="deny_receipt">무료거부 0808800858</p>'; |
|
| 2118 |
- |
|
| 2119 |
- //광고 및 무료수신거부 텍스트 추가 |
|
| 2120 |
- if ($('input[name=send_adYn]:checked').val() == 'Y'){
|
|
| 2121 |
- |
|
| 2122 |
- //문자 내용에 광고 문자 추가해주기 |
|
| 2123 |
- $(advStr).insertBefore('textarea[name=smsTxtArea]');
|
|
| 2124 |
- $(advDenyStr).insertBefore('div[name=afterDeny]');
|
|
| 2125 |
- |
|
| 2126 |
- //미리보기에 광고 문자 추가해주기 |
|
| 2127 |
- $(preAdvStr).insertBefore('.none_txt');
|
|
| 2128 |
- $(preAdvDenyStr).insertAfter('.realtime');
|
|
| 2129 |
- |
|
| 2130 |
-// $('#smsTxtArea').val(advStr + "\r\n" + contents + "\r\n" + advDenyStr);
|
|
| 2131 |
- |
|
| 2132 |
- |
|
| 2133 |
- }else{ //광고 및 무료수신거부 텍스트 삭제
|
|
| 2134 |
- |
|
| 2135 |
- //문자내용 광고문자 삭제하기 |
|
| 2136 |
- $('.ad_txt').remove();
|
|
| 2137 |
- $('.deny_txt').remove();
|
|
| 2138 |
- |
|
| 2139 |
- //미리보기 광고 문자 삭제하기 |
|
| 2140 |
- $('.ad_tit').remove();
|
|
| 2141 |
- $('.deny_receipt').remove();
|
|
| 2142 |
- |
|
| 2143 |
- } |
|
| 2144 |
- |
|
| 2145 |
- //문자 바이트수 계산하기 |
|
| 2146 |
- fnByteString($('#smsTxtArea').val());
|
|
| 2147 |
- |
|
| 2148 |
-} */ |
|
| 2149 |
- |
|
| 2150 | 1527 |
//문자 바이트수 계산하기 함수 |
| 2151 | 1528 |
function fnByteString(contents){
|
| 2152 | 1529 |
console.log(' : fnByteString : ');
|
... | ... | @@ -2158,23 +1535,18 @@ |
| 2158 | 1535 |
var adverTxt = $('.ad_txt').html();
|
| 2159 | 1536 |
var denyTxt = $('.deny_txt').html();
|
| 2160 | 1537 |
totRows = tableL.getRows().length; |
| 2161 |
- |
|
| 2162 | 1538 |
//광고문자 상단 문구 줄바꿈 처리하기(문자길이 바이트수 계산을 위해서) |
| 2163 | 1539 |
if(typeof adverTxt !='undefined' && adverTxt != null){
|
| 2164 |
- |
|
| 2165 | 1540 |
adverTxt = adverTxt.replaceAll("<p>","");
|
| 2166 | 1541 |
adverTxt = adverTxt.replaceAll("</p>","");
|
| 2167 | 1542 |
adTxtLeng = conByteLeng(adverTxt); |
| 2168 |
- |
|
| 2169 | 1543 |
} |
| 2170 | 1544 |
|
| 2171 | 1545 |
//광고문자 하단 문구 줄바꿈 처리하기(문자길이 바이트수 계산을 위해서) |
| 2172 | 1546 |
if(typeof denyTxt !='undefined' && denyTxt != null){
|
| 2173 |
- |
|
| 2174 | 1547 |
denyTxt = denyTxt.replaceAll("<p>","\n");
|
| 2175 | 1548 |
denyTxt = denyTxt.replaceAll("</p>","");
|
| 2176 | 1549 |
denyTxtLeng = conByteLeng(denyTxt); |
| 2177 |
- |
|
| 2178 | 1550 |
} |
| 2179 | 1551 |
|
| 2180 | 1552 |
$('#msgLeng').html("");
|
... | ... | @@ -2189,12 +1561,8 @@ |
| 2189 | 1561 |
$('#msgLeng').text(conLeng);
|
| 2190 | 1562 |
//문자 길이 변수에 저장해주기 |
| 2191 | 1563 |
$('#smsLen').val(conLeng);
|
| 2192 |
- |
|
| 2193 |
- |
|
| 2194 |
- |
|
| 2195 | 1564 |
var photoSts = $('.delLi').length;
|
| 2196 | 1565 |
if(photoSts > 0){
|
| 2197 |
- |
|
| 2198 | 1566 |
$('#msgLeng').html(conLeng + " / ");
|
| 2199 | 1567 |
$('#limitLeng').html("2000");
|
| 2200 | 1568 |
$('.msg_com').html("그림");
|
... | ... | @@ -2208,12 +1576,8 @@ |
| 2208 | 1576 |
$('.put_left').addClass("photo"); // 내용 입력 박스에 클래스 삽입
|
| 2209 | 1577 |
$('.put_left').css("display","block"); // 내용 입력 박스에 클래스 삽입
|
| 2210 | 1578 |
$('.msg_title').addClass('active');
|
| 2211 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2212 |
- |
|
| 2213 | 1579 |
}else{
|
| 2214 |
- |
|
| 2215 | 1580 |
if(conLeng > 90){
|
| 2216 |
- |
|
| 2217 | 1581 |
$('#msgLeng').html(conLeng + " / ");
|
| 2218 | 1582 |
$('#limitLeng').html("2000");
|
| 2219 | 1583 |
$('.msg_com').html("장문");
|
... | ... | @@ -2224,10 +1588,7 @@ |
| 2224 | 1588 |
$('.msg_com').addClass("msg_long"); // 장문 클래스 삽입
|
| 2225 | 1589 |
$('.put_left').addClass("long"); // 내용 입력 박스에 클래스 삽입
|
| 2226 | 1590 |
$('.msg_title').addClass('active');
|
| 2227 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2228 |
- |
|
| 2229 | 1591 |
}else{
|
| 2230 |
- |
|
| 2231 | 1592 |
$('#msgLeng').html(conLeng + " / ");
|
| 2232 | 1593 |
$('#limitLeng').html("90");
|
| 2233 | 1594 |
$('.msg_com').html("단문");
|
... | ... | @@ -2240,86 +1601,54 @@ |
| 2240 | 1601 |
$('#mmsSubject').val("");
|
| 2241 | 1602 |
$('#title_y').prop('checked',false);
|
| 2242 | 1603 |
$('#title_n').prop('checked',true);
|
| 2243 |
- //제목 비활성화로 내용 지워주기 |
|
| 2244 |
- /* $('#mmsSubject').val("");
|
|
| 2245 |
- document.getElementById("mmsSubject").disabled = true; */
|
|
| 2246 |
- |
|
| 2247 | 1604 |
} |
| 2248 |
- |
|
| 2249 | 1605 |
} |
| 2250 |
- |
|
| 2251 |
- |
|
| 2252 |
- // 미리보기 데이터 입력해 주기 , 줄바꿈 문자 변환해주기 |
|
| 2253 |
- //var repContent = ""; |
|
| 2254 |
- //repContent = content.replace(/(?:\r\n|\r|\n)/g, '<br/>'); |
|
| 2255 |
- |
|
| 2256 |
- |
|
| 2257 | 1606 |
if(conLeng > 0){
|
| 2258 |
- |
|
| 2259 | 1607 |
$('.none_txt').text("");
|
| 2260 |
- |
|
| 2261 | 1608 |
}else{
|
| 2262 |
- |
|
| 2263 | 1609 |
$('.none_txt').text("내용을 입력해주세요.");
|
| 2264 |
- |
|
| 2265 | 1610 |
} |
| 2266 |
- |
|
| 2267 | 1611 |
//미리보기에 내용 입력해 주기 |
| 2268 | 1612 |
$('.realtime').text(contents);
|
| 2269 |
- |
|
| 2270 | 1613 |
// 2000byte 초과시 메세지 알림 |
| 2271 | 1614 |
if(conLeng > 2000){
|
| 2272 |
- |
|
| 2273 | 1615 |
var fullContents = adverYn != "N" ? adverTxt + denyTxt + contents : contents; |
| 2274 | 1616 |
var subUnderStr = strUnderLineSubstring(fullContents, 2000).replace(adverTxt, "").replace(denyTxt, ""); |
| 2275 | 1617 |
subUnderStr = subUnderStr.replace(adverTxt,"").replace(denyTxt, ""); |
| 2276 |
-// console.log('subUnderStr : ', subUnderStr)
|
|
| 2277 |
- |
|
| 2278 |
- |
|
| 1618 |
+ |
|
| 2279 | 1619 |
$('#smsTxtArea').val(subUnderStr);
|
| 2280 | 1620 |
|
| 2281 | 1621 |
var contentLeng = conByteLeng(subUnderStr); |
| 2282 | 1622 |
var totalLeng = adverYn != "N" ? contentLeng + adTxtLeng + denyTxtLeng : contentLeng; |
| 2283 | 1623 |
|
| 2284 |
-// console.log('contentLeng : ', totalLeng);
|
|
| 2285 | 1624 |
$('#msgLeng').text(totalLeng + " / ");
|
| 2286 | 1625 |
$('#smsLen').val(contentLeng);
|
| 2287 | 1626 |
|
| 2288 | 1627 |
alert("문자 내용은 2000byte를 넘을 수 없습니다.");
|
| 2289 | 1628 |
return false; |
| 2290 | 1629 |
} |
| 2291 |
- |
|
| 2292 |
- //수신목록 전체 데이터 갯수 구하기 |
|
| 2293 |
-// updateTotCnt(totRows); |
|
| 2294 |
- |
|
| 1630 |
+ |
|
| 2295 | 1631 |
//일괄변환 문구 결제금액 처리 |
| 2296 | 1632 |
if(contents.indexOf("[*이름*]") > -1
|
| 2297 | 1633 |
|| contents.indexOf("[*1*]") > -1
|
| 2298 | 1634 |
|| contents.indexOf("[*2*]") > -1
|
| 2299 | 1635 |
|| contents.indexOf("[*3*]") > -1
|
| 2300 | 1636 |
|| contents.indexOf("[*4*]") > -1){
|
| 2301 |
- |
|
| 2302 |
-// fnReplCell(); |
|
| 2303 | 1637 |
fnReplCell_advc(); |
| 2304 |
- |
|
| 2305 | 1638 |
}else{
|
| 2306 | 1639 |
console.log('totRows : ', totRows);
|
| 2307 | 1640 |
var totalPrice = totalPriceSum(totRows); |
| 2308 | 1641 |
$('#totalPrice').text(totalPrice);
|
| 2309 | 1642 |
$('#txtReplYn').val("N");
|
| 2310 |
- |
|
| 2311 | 1643 |
} |
| 2312 |
- |
|
| 2313 | 1644 |
} |
| 2314 | 1645 |
|
| 2315 | 1646 |
function openPhotoEditor() {
|
| 2316 | 1647 |
var imgCnt = $("#imgCnt").val();
|
| 2317 |
- |
|
| 2318 | 1648 |
if(imgCnt >= 3) {
|
| 2319 | 1649 |
alert("메시지에 첨부할 수 있는 이미지는 최대 3장입니다.");
|
| 2320 | 1650 |
return; |
| 2321 | 1651 |
} |
| 2322 |
- |
|
| 2323 | 1652 |
//만들려는 팝업의 크기 |
| 2324 | 1653 |
var popup_wid = '1100'; |
| 2325 | 1654 |
var popup_ht = '851'; |
... | ... | @@ -2329,12 +1658,10 @@ |
| 2329 | 1658 |
var popup_top =(window.screen.height / 2) - (popup_ht / 2); |
| 2330 | 1659 |
|
| 2331 | 1660 |
window.open('<c:url value='/web/mjon/msgdata/openImageEditorPopup.do'/>', 'a', 'width=' + popup_wid +', height='+ popup_ht +', left=' + popup_left + ', top='+ popup_top + ', scrollbar=no' );
|
| 2332 |
- |
|
| 2333 | 1661 |
} |
| 2334 | 1662 |
|
| 2335 | 1663 |
//그림샘플 이미지 선택시 문자 내용에 입력 처리 |
| 2336 | 1664 |
function imageControl(obj, editYn, imageName, imgId) {
|
| 2337 |
- |
|
| 2338 | 1665 |
var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
| 2339 | 1666 |
var imgSrc = obj.attr("src");
|
| 2340 | 1667 |
|
... | ... | @@ -2347,33 +1674,20 @@ |
| 2347 | 1674 |
$('.prePhoto').show();
|
| 2348 | 1675 |
|
| 2349 | 1676 |
if($('.msg_com').hasClass("msg_short") === true){
|
| 2350 |
- |
|
| 2351 | 1677 |
$('.msg_com').removeClass("msg_short"); //단문 클래스 삭제하고
|
| 2352 | 1678 |
$('.msg_com').addClass("msg_photo"); // 그림문자용 클래스 삽입
|
| 2353 | 1679 |
$('.put_left').removeClass("short");
|
| 2354 | 1680 |
$('.put_left').addClass("photo");
|
| 2355 | 1681 |
$('.msg_com').html("그림");
|
| 2356 | 1682 |
$('#msgType').val("6"); // 메세지 타입 설정
|
| 2357 |
- |
|
| 2358 |
- //제목 입력 항목 활성화 |
|
| 2359 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2360 |
- |
|
| 2361 | 1683 |
}else{
|
| 2362 |
- |
|
| 2363 | 1684 |
$('.msg_com').removeClass("msg_long"); //장문 클래스 삭제하고
|
| 2364 | 1685 |
$('.msg_com').addClass("msg_photo"); // 그림문자용 클래스 삽입
|
| 2365 | 1686 |
$('.put_left').removeClass("long");
|
| 2366 | 1687 |
$('.put_left').addClass("photo");
|
| 2367 | 1688 |
$('.msg_com').html("그림");
|
| 2368 | 1689 |
$('#msgType').val("6"); // 메세지 타입 설정
|
| 2369 |
- |
|
| 2370 |
- //제목 입력 항목 활성화 |
|
| 2371 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2372 |
- |
|
| 2373 | 1690 |
} |
| 2374 |
- |
|
| 2375 |
- //이미지 카운트 증가시키기 |
|
| 2376 |
- //imgCnt ++; |
|
| 2377 | 1691 |
$("#imgCnt").val(Number(imgCnt)+1);
|
| 2378 | 1692 |
$(".thumb_wrap").removeClass("none");
|
| 2379 | 1693 |
|
... | ... | @@ -2384,41 +1698,28 @@ |
| 2384 | 1698 |
+ '<button type="button" class="file_close"><img src="/publish/images/content/thumb_del.png" alt="첨부파일 삭제"></button>' |
| 2385 | 1699 |
+ '<button type="button" class="file_close_on"><img src="/publish/images/content/thumb_del_on.png" alt="첨부파일 삭제"></button>' |
| 2386 | 1700 |
+ '</li>'; |
| 2387 |
- |
|
| 2388 |
- |
|
| 2389 |
- /* "<li class=\"delLi\"><p>" + imgPath + "</p><button type=\"button\" class=\"file_close\"><img class=\"delImg\" src=\"/publish/images/content/file_close.png\" alt=\"첨부파일 삭제\"></button></li>" */ |
|
| 2390 | 1701 |
$('.liOnImg').append(liPath);
|
| 2391 | 1702 |
|
| 2392 | 1703 |
//미리보기 보여주기 |
| 2393 | 1704 |
$('.preiew_img').show();
|
| 2394 |
- |
|
| 2395 | 1705 |
var imgHtml = ""; |
| 2396 | 1706 |
var imgPath = "<div class=\"img_box preBoxF\" id=preBoxF"+ imgCnt +"><img src=\"" + imgSrc + "\" /></div>"; |
| 2397 |
- |
|
| 2398 | 1707 |
if($("#imgCnt").val() == 1){
|
| 2399 | 1708 |
$('.preViewShort').append(imgPath);
|
| 2400 | 1709 |
$('.photo_num_01').show();
|
| 2401 | 1710 |
$('.photo_num_02').hide();
|
| 2402 | 1711 |
$('.photo_num_03').hide();
|
| 2403 |
- //$(".thumb_wrap li:eq(0)").addClass("on");
|
|
| 2404 |
- |
|
| 2405 | 1712 |
}else if($("#imgCnt").val() == 2){
|
| 2406 | 1713 |
$('.preViewShort').append(imgPath);
|
| 2407 | 1714 |
$('.photo_num_02').show();
|
| 2408 | 1715 |
$(".thumb_wrap li").removeClass("on");
|
| 2409 |
- //$(".thumb_wrap li:eq(1)").addClass("on");
|
|
| 2410 |
- |
|
| 2411 | 1716 |
}else if($("#imgCnt").val() == 3){
|
| 2412 | 1717 |
$('.preViewShort').append(imgPath);
|
| 2413 | 1718 |
$('.photo_num_03').show();
|
| 2414 | 1719 |
$(".thumb_wrap li").removeClass("on");
|
| 2415 |
- //$(".thumb_wrap li:eq(2)").addClass("on");
|
|
| 2416 |
- |
|
| 2417 | 1720 |
} |
| 2418 |
- |
|
| 2419 | 1721 |
// 배열에 선택한 이미지 경로 저장해주기 |
| 2420 | 1722 |
imgFilePath.push(imgSrc); |
| 2421 |
- |
|
| 2422 | 1723 |
// 배열에 선택한 이미지 아이디 저장해주기 - 내 문자 보관함 저장용으로 사용 |
| 2423 | 1724 |
if(typeof(imgId) != 'undefined' && imgId != null && editYn != 'edit_y'){
|
| 2424 | 1725 |
imgFileId.push(imgId); |
... | ... | @@ -2426,58 +1727,41 @@ |
| 2426 | 1727 |
//문자 길이 및 타입 변경해주기 |
| 2427 | 1728 |
var contents = $('#smsTxtArea').val();
|
| 2428 | 1729 |
fnByteString(contents); |
| 2429 |
- |
|
| 1730 |
+ |
|
| 2430 | 1731 |
var scrollHei = $(".mCustomScrollBox").height();
|
| 2431 | 1732 |
if(scrollHei > 488) {
|
| 2432 | 1733 |
$(".img_box").addClass("on_scroll_img");
|
| 2433 | 1734 |
} |
| 2434 |
- |
|
| 2435 | 1735 |
} |
| 2436 | 1736 |
|
| 2437 | 1737 |
//그림샘플 이미지 선택시 문자 내용에 입력 처리 |
| 2438 | 1738 |
function myMsgImageControl(imgSrc, editYn, imageName, imgId) {
|
| 2439 |
- |
|
| 2440 | 1739 |
var imgCnt = $("#imgCnt").val(); // 현재 페이지에 첨부된 이미지 갯수
|
| 2441 | 1740 |
var imgSrc = imgSrc; |
| 2442 |
- |
|
| 2443 | 1741 |
if(imgCnt >= 3){
|
| 2444 | 1742 |
alert("이미지는 3장만 선택할 수 있습니다.");
|
| 2445 | 1743 |
return false; |
| 2446 | 1744 |
} |
| 2447 |
- |
|
| 2448 | 1745 |
$('.preShort').hide();
|
| 2449 | 1746 |
$('.prePhoto').show();
|
| 2450 | 1747 |
|
| 2451 | 1748 |
if($('.msg_com').hasClass("msg_short") === true){
|
| 2452 |
- |
|
| 2453 | 1749 |
$('.msg_com').removeClass("msg_short"); //단문 클래스 삭제하고
|
| 2454 | 1750 |
$('.msg_com').addClass("msg_photo"); // 그림문자용 클래스 삽입
|
| 2455 | 1751 |
$('.put_left').removeClass("short");
|
| 2456 | 1752 |
$('.put_left').addClass("photo");
|
| 2457 | 1753 |
$('.msg_com').html("그림");
|
| 2458 | 1754 |
$('#msgType').val("6"); // 메세지 타입 설정
|
| 2459 |
- |
|
| 2460 |
- //제목 입력 항목 활성화 |
|
| 2461 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2462 |
- |
|
| 2463 | 1755 |
}else{
|
| 2464 |
- |
|
| 2465 | 1756 |
$('.msg_com').removeClass("msg_long"); //장문 클래스 삭제하고
|
| 2466 | 1757 |
$('.msg_com').addClass("msg_photo"); // 그림문자용 클래스 삽입
|
| 2467 | 1758 |
$('.put_left').removeClass("long");
|
| 2468 | 1759 |
$('.put_left').addClass("photo");
|
| 2469 | 1760 |
$('.msg_com').html("그림");
|
| 2470 | 1761 |
$('#msgType').val("6"); // 메세지 타입 설정
|
| 2471 |
- |
|
| 2472 |
- //제목 입력 항목 활성화 |
|
| 2473 |
- //document.getElementById("mmsSubject").disabled = false;
|
|
| 2474 |
- |
|
| 2475 | 1762 |
} |
| 2476 |
- |
|
| 2477 |
- //이미지 카운트 증가시키기 |
|
| 2478 |
- //imgCnt ++; |
|
| 1763 |
+ |
|
| 2479 | 1764 |
$("#imgCnt").val(Number(imgCnt)+1);
|
| 2480 |
- |
|
| 2481 | 1765 |
//문자 내용 상단에 이미지 이름 영역 객체 추가해주기 |
| 2482 | 1766 |
var imgPath = '<img src="' + imgSrc + '" class="thumb_img '+ editYn +'" alt="thumb1"/>'; |
| 2483 | 1767 |
var liPath = '<li class="delLi '+imageName+'" id="delLi'+ imgCnt +'">' |
... | ... | @@ -2485,12 +1769,8 @@ |
| 2485 | 1769 |
+ '<button type="button" class="file_close"><img src="/publish/images/content/thumb_del.png" alt="첨부파일 삭제"></button>' |
| 2486 | 1770 |
+ '<button type="button" class="file_close_on"><img src="/publish/images/content/thumb_del_on.png" alt="첨부파일 삭제"></button>' |
| 2487 | 1771 |
+ '</li>'; |
| 2488 |
- |
|
| 2489 |
- |
|
| 2490 |
- /* "<li class=\"delLi\"><p>" + imgPath + "</p><button type=\"button\" class=\"file_close\"><img class=\"delImg\" src=\"/publish/images/content/file_close.png\" alt=\"첨부파일 삭제\"></button></li>" */ |
|
| 2491 |
- $('.liOnImg').append(liPath);
|
|
| 2492 |
- |
|
| 2493 |
- //미리보기 보여주기 |
|
| 1772 |
+ $('.liOnImg').append(liPath);
|
|
| 1773 |
+ |
|
| 2494 | 1774 |
$('.preiew_img').show();
|
| 2495 | 1775 |
|
| 2496 | 1776 |
var imgHtml = ""; |
... | ... | @@ -2501,22 +1781,15 @@ |
| 2501 | 1781 |
$('.photo_num_01').show();
|
| 2502 | 1782 |
$('.photo_num_02').hide();
|
| 2503 | 1783 |
$('.photo_num_03').hide();
|
| 2504 |
- //$(".thumb_wrap li:eq(0)").addClass("on");
|
|
| 2505 |
- |
|
| 2506 | 1784 |
}else if($("#imgCnt").val() == 2){
|
| 2507 | 1785 |
$('.preViewShort').append(imgPath);
|
| 2508 | 1786 |
$('.photo_num_02').show();
|
| 2509 | 1787 |
$(".thumb_wrap li").removeClass("on");
|
| 2510 |
- //$(".thumb_wrap li:eq(1)").addClass("on");
|
|
| 2511 |
- |
|
| 2512 | 1788 |
}else if($("#imgCnt").val() == 3){
|
| 2513 | 1789 |
$('.preViewShort').append(imgPath);
|
| 2514 | 1790 |
$('.photo_num_03').show();
|
| 2515 | 1791 |
$(".thumb_wrap li").removeClass("on");
|
| 2516 |
- //$(".thumb_wrap li:eq(2)").addClass("on");
|
|
| 2517 |
- |
|
| 2518 | 1792 |
} |
| 2519 |
- |
|
| 2520 | 1793 |
// 배열에 선택한 이미지 경로 저장해주기 |
| 2521 | 1794 |
imgFilePath.push(imgSrc); |
| 2522 | 1795 |
// 배열에 선택한 이미지 아이디 저장해주기 - 내 문자 보관함 저장용으로 사용 |
... | ... | @@ -2531,14 +1804,10 @@ |
| 2531 | 1804 |
if(scrollHei > 488) {
|
| 2532 | 1805 |
$(".img_box").addClass("on_scroll_img");
|
| 2533 | 1806 |
} |
| 2534 |
- |
|
| 2535 | 1807 |
} |
| 2536 | 1808 |
|
| 2537 | 1809 |
|
| 2538 | 1810 |
$(document).on('click', '.symbolButton, .changeWord', function (){
|
| 2539 |
- //var smsTxtArea = $('#smsTxtArea').val();
|
|
| 2540 |
- //$('#smsTxtArea').val(smsTxtArea + $(this).attr("value"));
|
|
| 2541 |
- |
|
| 2542 | 1811 |
// 커서 위치에 삽입 |
| 2543 | 1812 |
setCursorInsertText("smsTxtArea", $(this).attr("value"));
|
| 2544 | 1813 |
|
... | ... | @@ -2546,16 +1815,11 @@ |
| 2546 | 1815 |
}); |
| 2547 | 1816 |
|
| 2548 | 1817 |
$(document).on('click', '#recommBtn', function(){
|
| 2549 |
- |
|
| 2550 | 1818 |
var recommId = $('#recommId').val();
|
| 2551 |
- |
|
| 2552 | 1819 |
if(recommId == ''){
|
| 2553 |
- |
|
| 2554 | 1820 |
alert("추천인 ID를 입력해 주세요.");
|
| 2555 | 1821 |
return false; |
| 2556 |
- |
|
| 2557 | 1822 |
} |
| 2558 |
- |
|
| 2559 | 1823 |
var data = new FormData(document.msgForm); |
| 2560 | 1824 |
var url = "/web/mjon/msgdata/selectRecommIdCheckAjax.do"; |
| 2561 | 1825 |
|
... | ... | @@ -2569,34 +1833,25 @@ |
| 2569 | 1833 |
processData: false, |
| 2570 | 1834 |
contentType: false, |
| 2571 | 1835 |
cache: false, |
| 2572 |
- //timeout: 600000, |
|
| 2573 | 1836 |
success: function (returnData, status) {
|
| 2574 | 1837 |
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
| 2575 |
- |
|
| 2576 | 1838 |
if(returnData.status == "success"){
|
| 2577 |
- |
|
| 2578 | 1839 |
alert("추천인 아이디가 확인 되었습니다.");
|
| 2579 | 1840 |
return false; |
| 2580 |
- |
|
| 2581 | 1841 |
}else{
|
| 2582 |
- |
|
| 2583 | 1842 |
alert("존재하지 않는 추천인 아이디 입니다.");
|
| 2584 | 1843 |
return false; |
| 2585 |
- |
|
| 2586 | 1844 |
} |
| 2587 |
- |
|
| 2588 | 1845 |
} else if(status== 'fail'){
|
| 2589 | 1846 |
alert("추천인 확인에 실패하였습니다. !!");
|
| 2590 | 1847 |
} |
| 2591 | 1848 |
}, |
| 2592 | 1849 |
error: function (e) { alert("추천인 확인에 실패하였습니다."); console.log("ERROR : ", e); }
|
| 2593 | 1850 |
}); |
| 2594 |
- |
|
| 2595 | 1851 |
}); |
| 2596 | 1852 |
|
| 2597 | 1853 |
//문자발송 받는사람 목록 주소록에 등록하기 기능 처리 |
| 2598 | 1854 |
$('.registAddr').click(function(){
|
| 2599 |
- |
|
| 2600 | 1855 |
var tableData = tableL.getRows(); |
| 2601 | 1856 |
var dataLen = tableL.getRows().length; |
| 2602 | 1857 |
|
... | ... | @@ -2610,35 +1865,26 @@ |
| 2610 | 1865 |
if(dataLen > 0){
|
| 2611 | 1866 |
|
| 2612 | 1867 |
for(var i=0; i < dataLen; i++){
|
| 2613 |
- |
|
| 2614 | 1868 |
var name = tableData[i].getData().name; |
| 2615 | 1869 |
var phone = removeDash(tableData[i].getData().phone); |
| 2616 | 1870 |
var rep1 = tableData[i].getData().rep1; |
| 2617 | 1871 |
var rep2 = tableData[i].getData().rep2; |
| 2618 | 1872 |
var rep3 = tableData[i].getData().rep3; |
| 2619 | 1873 |
var rep4 = tableData[i].getData().rep4; |
| 2620 |
- |
|
| 2621 | 1874 |
if(phone == "" || phone == null){
|
| 2622 |
- |
|
| 2623 | 1875 |
alert("수신 목록에 핸드폰 번호가 없는 항목이 있습니다.");
|
| 2624 | 1876 |
return false; |
| 2625 |
- |
|
| 2626 | 1877 |
}else if(!checkHpNum(phone)){
|
| 2627 |
- |
|
| 2628 | 1878 |
alert("수신 목록에 잘 못된 핸드폰 번호가 있습니다. 핸드폰 번호 : " + phone + " 입니다.");
|
| 2629 | 1879 |
return false; |
| 2630 |
- |
|
| 2631 | 1880 |
} |
| 2632 |
- |
|
| 2633 |
- |
|
| 2634 | 1881 |
phoneNum[i] = phone; |
| 2635 |
- |
|
| 2636 | 1882 |
if(name == "" || name == null){
|
| 2637 | 1883 |
nameList[i] = ""; |
| 2638 | 1884 |
}else{
|
| 2639 | 1885 |
nameList[i] = name.replaceAll(",","§");
|
| 2640 | 1886 |
} |
| 2641 |
- |
|
| 1887 |
+ |
|
| 2642 | 1888 |
if(rep1 == "" || rep1 == null){
|
| 2643 | 1889 |
rep1List[i] = "-"; |
| 2644 | 1890 |
}else{
|
... | ... | @@ -2662,47 +1908,8 @@ |
| 2662 | 1908 |
}else{
|
| 2663 | 1909 |
rep4List[i] = rep4.replaceAll(",","§");
|
| 2664 | 1910 |
} |
| 2665 |
- |
|
| 2666 |
- /* if(name == "" || name == null){
|
|
| 2667 |
- |
|
| 2668 |
- alert("수신 목록에 이름이 없는 항목이 있습니다. 이름을 입력해 주세요");
|
|
| 2669 |
- return false; |
|
| 2670 |
- |
|
| 2671 |
- }else{
|
|
| 2672 |
- |
|
| 2673 |
- nameList[i] = name; |
|
| 2674 |
- phoneNum[i] = phone; |
|
| 2675 |
- |
|
| 2676 |
- if(rep1 == "" || rep1 == null){
|
|
| 2677 |
- rep1List[i] = "-"; |
|
| 2678 |
- }else{
|
|
| 2679 |
- rep1List[i] = rep1; |
|
| 2680 |
- } |
|
| 2681 |
- |
|
| 2682 |
- if(rep2 == "" || rep2 == null){
|
|
| 2683 |
- rep2List[i] = "-"; |
|
| 2684 |
- }else{
|
|
| 2685 |
- rep2List[i] = rep2; |
|
| 2686 |
- } |
|
| 2687 |
- |
|
| 2688 |
- if(rep3 == "" || rep3 == null){
|
|
| 2689 |
- rep3List[i] = "-"; |
|
| 2690 |
- }else{
|
|
| 2691 |
- rep3List[i] = rep3; |
|
| 2692 |
- } |
|
| 2693 |
- |
|
| 2694 |
- if(rep4 == "" || rep4 == null){
|
|
| 2695 |
- rep4List[i] = "-"; |
|
| 2696 |
- }else{
|
|
| 2697 |
- rep4List[i] = rep4; |
|
| 2698 |
- } |
|
| 2699 |
- |
|
| 2700 |
- } */ |
|
| 2701 |
- |
|
| 2702 | 1911 |
} |
| 2703 |
- |
|
| 2704 | 1912 |
//주소록 정보를 Form에 넣어준다. |
| 2705 |
- |
|
| 2706 | 1913 |
var form = document.msgForm; |
| 2707 | 1914 |
form.callToList.value = phoneNum; |
| 2708 | 1915 |
form.nameList.value = nameList; |
... | ... | @@ -2724,10 +1931,9 @@ |
| 2724 | 1931 |
} |
| 2725 | 1932 |
} |
| 2726 | 1933 |
if(confirm("연락처 정보를 주소록에 등록 하시겠습니까?")){
|
| 2727 |
- |
|
| 2728 | 1934 |
var data = new FormData(form); |
| 2729 | 1935 |
var url = "/web/mjon/msgdata/insertMsgAddrListAjax.do"; |
| 2730 |
- |
|
| 1936 |
+ |
|
| 2731 | 1937 |
$.ajax({
|
| 2732 | 1938 |
type: "POST", |
| 2733 | 1939 |
enctype: 'multipart/form-data', |
... | ... | @@ -2787,22 +1993,15 @@ |
| 2787 | 1993 |
$('.loading_layer').removeClass('active');
|
| 2788 | 1994 |
} |
| 2789 | 1995 |
}); |
| 2790 |
- |
|
| 2791 | 1996 |
} |
| 2792 |
- |
|
| 2793 | 1997 |
}else{
|
| 2794 |
- |
|
| 2795 | 1998 |
alert("연락처 정보를 등록해 주세요.");
|
| 2796 | 1999 |
return false; |
| 2797 |
- |
|
| 2798 | 2000 |
} |
| 2799 |
- |
|
| 2800 |
- |
|
| 2801 | 2001 |
}); |
| 2802 | 2002 |
|
| 2803 | 2003 |
//주소록 불러오기 그룹명 검색 기능처리 |
| 2804 | 2004 |
function fnAddrGrpSearch(){
|
| 2805 |
- |
|
| 2806 | 2005 |
var form = document.searchAddrGrpForm; |
| 2807 | 2006 |
form.searchKeyword.value = form.searchGrpKeyword.value; |
| 2808 | 2007 |
form.searchCondition.value = ""; |
... | ... | @@ -2818,66 +2017,39 @@ |
| 2818 | 2017 |
autoHideScrollbar: false |
| 2819 | 2018 |
}); |
| 2820 | 2019 |
}); |
| 2821 |
- |
|
| 2822 | 2020 |
} |
| 2823 |
- |
|
| 2824 |
- |
|
| 2825 | 2021 |
//주소록 불러오기 팝업의 그룹 선택시 우측에 주소록 불러오기 |
| 2826 |
-function fnSelectAddrList(type,addrGrpId,item){
|
|
| 2022 |
+function fnSelectAddrList(type,addrGrpId,item) {
|
|
| 2827 | 2023 |
// 주소록 그룹 열림, 닫힘 폴더이미지 초기화 |
| 2828 | 2024 |
$(".adr_pop_list div p").each(function (index, item) {
|
| 2829 | 2025 |
$(item).find("img").attr("src", "/publish/images/content/close_folder2.png");
|
| 2830 | 2026 |
$(item).find("img").attr("alt", "폴더 닫힘");
|
| 2831 | 2027 |
}); |
| 2832 |
- |
|
| 2833 | 2028 |
var form = document.searchAddrGrpForm; |
| 2834 | 2029 |
form.type.value = type; |
| 2835 | 2030 |
form.searchAddrGrpId.value = addrGrpId; |
| 2836 | 2031 |
form.searchKeyword.value = ""; |
| 2837 | 2032 |
form.searchCondition.value = form.searchAddrCondition.value; |
| 2838 |
- |
|
| 2839 | 2033 |
//왼쪽 그룹리스트의 그룸명을 선택시 검색어를 초기화해준다. |
| 2840 |
- form.searchAddrKeyword.value=""; |
|
| 2841 |
- |
|
| 2842 |
- /* |
|
| 2843 |
- $(item).toggleClass("open");
|
|
| 2844 |
- if ($(item).hasClass("open") === true) {
|
|
| 2845 |
- $(item).find("img").attr("src", "/publish/images/content/open_folder2.png");
|
|
| 2846 |
- $(item).find("img").attr("alt", "폴더 열림");
|
|
| 2847 |
- } |
|
| 2848 |
- else {
|
|
| 2849 |
- $(item).find("img").attr("src", "/publish/images/content/close_folder2.png");
|
|
| 2850 |
- $(item).find("img").attr("alt", "폴더 닫힘");
|
|
| 2851 |
- } |
|
| 2852 |
- */ |
|
| 2853 |
- |
|
| 2034 |
+ form.searchAddrKeyword.value = ""; |
|
| 2854 | 2035 |
$(item).find("img").attr("src", "/publish/images/content/open_folder2.png");
|
| 2855 | 2036 |
$(item).find("img").attr("alt", "폴더 열림");
|
| 2856 |
- |
|
| 2857 | 2037 |
loadAddrList(); |
| 2858 |
- |
|
| 2859 | 2038 |
} |
| 2860 | 2039 |
|
| 2861 | 2040 |
|
| 2862 | 2041 |
function fnAddrSearch(){
|
| 2863 |
- |
|
| 2864 | 2042 |
var form = document.searchAddrGrpForm; |
| 2865 | 2043 |
form.searchKeyword.value = form.searchAddrKeyword.value; |
| 2866 | 2044 |
form.searchCondition.value = form.searchAddrCondition.value; |
| 2867 |
- |
|
| 2868 | 2045 |
loadAddrList(); |
| 2869 |
- |
|
| 2870 | 2046 |
} |
| 2871 | 2047 |
|
| 2872 | 2048 |
function loadAddrList(){
|
| 2873 |
- |
|
| 2874 |
- /* |
|
| 2875 |
- serialize 를 사용할때는 processDa ta, contentType 옵션 제가할것 |
|
| 2876 |
- */ |
|
| 2877 |
- var data = $("#searchAddrGrpForm").serialize();
|
|
| 2049 |
+ /* serialize 를 사용할때는 processData, contentType 옵션 제거할 것*/ |
|
| 2050 |
+ var data = $("#searchAddrGrpForm").serialize();
|
|
| 2878 | 2051 |
|
| 2879 | 2052 |
var url = "/web/mjon/msgdata/selectMsgAddrListAjax_advc.do"; |
| 2880 |
- |
|
| 2881 | 2053 |
$.ajax({
|
| 2882 | 2054 |
type: "POST", |
| 2883 | 2055 |
url: url, |
... | ... | @@ -2886,23 +2058,14 @@ |
| 2886 | 2058 |
async: true, |
| 2887 | 2059 |
cache: false, |
| 2888 | 2060 |
success: function (data) {
|
| 2889 |
- console.log('data : ', data);
|
|
| 2890 |
- if(data.status == "OK"){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
| 2891 |
- |
|
| 2061 |
+ if(data.status == "OK"){
|
|
| 2892 | 2062 |
var addrList = data.object; |
| 2893 |
- |
|
| 2894 | 2063 |
if(addrList.length == 0){
|
| 2895 |
- |
|
| 2896 | 2064 |
alert("주소록 정보가 없습니다.");
|
| 2897 |
-// tableAddr.setData([]); |
|
| 2898 | 2065 |
return false; |
| 2899 | 2066 |
} |
| 2900 |
- |
|
| 2901 |
-// console.log('data : ', data);
|
|
| 2902 | 2067 |
tableAddr.setData(addrList); |
| 2903 |
- } |
|
| 2904 |
- else |
|
| 2905 |
- {
|
|
| 2068 |
+ } else {
|
|
| 2906 | 2069 |
alert("주소록 불러오기에 실패하였습니다. !!");
|
| 2907 | 2070 |
} |
| 2908 | 2071 |
}, |
... | ... | @@ -2926,24 +2089,18 @@ |
| 2926 | 2089 |
$('.loading_layer').removeClass('active');
|
| 2927 | 2090 |
} |
| 2928 | 2091 |
}); |
| 2929 |
- |
|
| 2930 | 2092 |
} |
| 2931 | 2093 |
|
| 2932 | 2094 |
//주소록 불러오기에서 수신자 리스트 추가해 주기 |
| 2933 | 2095 |
function addrToList(){
|
| 2934 |
- |
|
| 2935 | 2096 |
var selectedData = tableAddr.getSelectedRows(); |
| 2936 | 2097 |
var tableData = []; |
| 2937 | 2098 |
|
| 2938 | 2099 |
if(selectedData == "" || selectedData == null){
|
| 2939 |
- |
|
| 2940 | 2100 |
alert("주소록을 선택해 주세요.");
|
| 2941 | 2101 |
return false; |
| 2942 |
- |
|
| 2943 | 2102 |
}else{ // 선택한 Row 데이터 저장해주기
|
| 2944 |
- |
|
| 2945 | 2103 |
for(var i=0; i < selectedData.length; i++){
|
| 2946 |
- |
|
| 2947 | 2104 |
//좌측 받는사람 리스트를 담아둔 배열에 데이터를 추가해 준다. |
| 2948 | 2105 |
tableData.push({phone: removeDash(selectedData[i].getData().addrPhone),
|
| 2949 | 2106 |
name: selectedData[i].getData().addrName, |
... | ... | @@ -2952,38 +2109,28 @@ |
| 2952 | 2109 |
rep3: selectedData[i].getData().addrRep3, |
| 2953 | 2110 |
rep4: selectedData[i].getData().addrRep4} |
| 2954 | 2111 |
); |
| 2955 |
- |
|
| 2956 | 2112 |
} |
| 2957 |
- |
|
| 2958 | 2113 |
//선택한 데이터 받는사람 리스트에 추가해 주기 |
| 2959 | 2114 |
addPhoneInfo(tableData); |
| 2960 | 2115 |
$(".closeAddr").trigger("click");
|
| 2961 |
- |
|
| 2962 | 2116 |
//주소록 레이어 팝업의 Tabulator 데이터 지워주기 |
| 2963 | 2117 |
tableAddr.clearData(); |
| 2964 |
- |
|
| 2965 | 2118 |
} |
| 2966 |
- |
|
| 2967 | 2119 |
} |
| 2968 | 2120 |
|
| 2969 | 2121 |
//주소록 불러오기에서 수신자 리스트 추가해 주기 |
| 2970 | 2122 |
function addrToList_advc(type){
|
| 2971 |
- console.log('tableAddr.getDataCount() : ', tableAddr.getDataCount());
|
|
| 2972 | 2123 |
// 선택된 데이터 또는 전체 데이터 변수 초기화 |
| 2973 | 2124 |
let selectedData = type === 'select' ? tableAddr.getSelectedRows() : tableAddr.getData(); |
| 2974 |
- |
|
| 2975 | 2125 |
// 데이터가 비어있으면 경고 후 종료 |
| 2976 | 2126 |
if (!selectedData || selectedData.length < 1) {
|
| 2977 |
- |
|
| 2978 | 2127 |
if(tableAddr.getDataCount() < 1){
|
| 2979 | 2128 |
alert("주소록을 선택해 주세요.");
|
| 2980 | 2129 |
}else{
|
| 2981 | 2130 |
alert("전화번호를 선택해 주세요.");
|
| 2982 | 2131 |
} |
| 2983 |
- |
|
| 2984 | 2132 |
return false; |
| 2985 | 2133 |
} |
| 2986 |
- |
|
| 2987 | 2134 |
// 데이터 변환 로직 |
| 2988 | 2135 |
const addrData = selectedData.map(row => {
|
| 2989 | 2136 |
const rowData = type === 'select' ? row.getData() : row; // 'select'는 행 객체에서 데이터 추출 |
... | ... | @@ -2996,59 +2143,42 @@ |
| 2996 | 2143 |
rep4: rowData.rep4 |
| 2997 | 2144 |
}; |
| 2998 | 2145 |
}); |
| 2999 |
- |
|
| 3000 |
- |
|
| 3001 | 2146 |
// 기존 tableL의 데이터를 가져옵니다. |
| 3002 | 2147 |
var existingData = tableL.getData(); |
| 3003 | 2148 |
// 기존 데이터와 새로운 데이터를 합칩니다. |
| 3004 | 2149 |
var combinedData = existingData.concat(addrData); |
| 3005 |
- |
|
| 3006 | 2150 |
// @ phone을 기준으로 중복 제거 및 갯수 계산 |
| 3007 | 2151 |
const result = removeDuplicatesAndCount(combinedData, 'phone'); |
| 3008 |
- |
|
| 3009 |
- |
|
| 3010 |
- |
|
| 3011 | 2152 |
// 총 30만건이 넘으면 false |
| 3012 | 2153 |
if (!validateRowLimit(result.uniqueCount)) {
|
| 3013 | 2154 |
return false; |
| 3014 | 2155 |
} |
| 3015 |
- |
|
| 3016 |
- |
|
| 3017 | 2156 |
// 합쳐진 데이터를 tableL에 설정합니다. |
| 3018 | 2157 |
tableL.setData(result.uniqueArray); |
| 3019 | 2158 |
// 중복데이터 건수 입력 |
| 3020 | 2159 |
setRowDupCnt(result.duplicateArray.length); |
| 3021 |
- |
|
| 3022 |
- |
|
| 3023 | 2160 |
// 미리보기 버튼 활성화 |
| 3024 | 2161 |
updateButtons(0); |
| 3025 |
- |
|
| 2162 |
+ |
|
| 3026 | 2163 |
var totRows = tableL.getRows().length; |
| 3027 | 2164 |
updateTotCnt(totRows); //전체 데이터 갯수 구하기 |
| 3028 | 2165 |
totalPriceSum(totRows); |
| 3029 |
- |
|
| 3030 | 2166 |
|
| 3031 | 2167 |
$(".closeAddr").trigger("click");
|
| 3032 | 2168 |
//주소록 레이어 팝업의 Tabulator 데이터 지워주기 |
| 3033 | 2169 |
tableAddr.clearData(); |
| 3034 |
- |
|
| 3035 |
- |
|
| 3036 | 2170 |
} |
| 3037 | 2171 |
|
| 3038 | 2172 |
|
| 3039 | 2173 |
//주소록 팝업 닫기 기능 |
| 3040 | 2174 |
function addrClose(){
|
| 3041 |
- |
|
| 3042 | 2175 |
$(".closeAddr").trigger("click");
|
| 3043 |
- |
|
| 3044 | 2176 |
//주소록 레이어 팝업의 Tabulator 데이터 지워주기 |
| 3045 | 2177 |
tableAddr.clearData(); |
| 3046 |
- |
|
| 3047 | 2178 |
} |
| 3048 | 2179 |
|
| 3049 | 2180 |
//내문자함 선택시 저장된 내용 문자 입력영역에 처리해주기 |
| 3050 | 2181 |
function fnMyMsgAdd(msgId){
|
| 3051 |
- |
|
| 3052 | 2182 |
var form = document.addMyMsgForm; |
| 3053 | 2183 |
form.msgId.value = msgId; |
| 3054 | 2184 |
form.pageType.value = "myMsg"; |
... | ... | @@ -3067,76 +2197,53 @@ |
| 3067 | 2197 |
cache: false, |
| 3068 | 2198 |
success: function (returnData, status) {
|
| 3069 | 2199 |
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
| 3070 |
- |
|
| 3071 | 2200 |
if(returnData.result == "success"){
|
| 3072 |
- |
|
| 3073 | 2201 |
var msgData = returnData.resultMsgInfo; |
| 3074 | 2202 |
var fileData = returnData.resultMsgAddPhotoInfo; |
| 3075 |
- |
|
| 3076 | 2203 |
var smsTxt = msgData.smsTxt; |
| 3077 | 2204 |
var subject = msgData.subject; |
| 3078 | 2205 |
var fileId = ""; |
| 3079 | 2206 |
var filePath = ""; |
| 3080 | 2207 |
var len = fileData.length; |
| 3081 |
- |
|
| 3082 | 2208 |
//기존 내용 지워주기 |
| 3083 | 2209 |
//$(".btnReset").trigger("click");
|
| 3084 | 2210 |
$('.delLi').each(function(){
|
| 3085 | 2211 |
$(this).remove(); |
| 3086 | 2212 |
}); |
| 3087 |
- |
|
| 3088 | 2213 |
$('.preBoxF').each(function(){
|
| 3089 | 2214 |
$(this).remove(); |
| 3090 | 2215 |
}); |
| 3091 |
- |
|
| 3092 | 2216 |
$('#imgCnt').val(0);
|
| 3093 |
- |
|
| 3094 | 2217 |
//기존 imgFileId, imgFilePath 배열에 있는 내용 초기화 해주기 |
| 3095 | 2218 |
imgFilePath = []; |
| 3096 | 2219 |
imgFileId = []; |
| 3097 |
- |
|
| 3098 | 2220 |
//내문자함 텍스트 내용 입력해주기 |
| 3099 | 2221 |
$('#smsTxtArea').val(smsTxt);
|
| 3100 |
- |
|
| 3101 | 2222 |
//첨부 이미지가 있는경우 이미지 처리해주기 |
| 3102 | 2223 |
if(len > 0){
|
| 3103 |
- |
|
| 3104 | 2224 |
for(var i=0; i < len; i++){
|
| 3105 |
- |
|
| 3106 | 2225 |
var num = i + 1; |
| 3107 | 2226 |
var imgId = fileData[i].atchFileId; |
| 3108 | 2227 |
var imgSn = fileData[i].fileSn; |
| 3109 | 2228 |
var fileStreCours = fileData[i].fileStreCours; |
| 3110 | 2229 |
var streFileNm = fileData[i].streFileNm; |
| 3111 | 2230 |
var fileExtsn = fileData[i].fileExtsn; |
| 3112 |
- |
|
| 3113 |
- /* var imgSrc = fileStreCours + "/" + streFileNm + "." + fileExtsn; */ |
|
| 3114 | 2231 |
var imgSrc = '/cmm/fms/getImage2.do?atchFileId=' + imgId + '&fileSn=' + imgSn; |
| 3115 | 2232 |
myMsgImageControl(imgSrc, "edit_n", "Template", imgId); |
| 3116 |
- |
|
| 3117 | 2233 |
} |
| 3118 |
- |
|
| 3119 | 2234 |
fnByteString(smsTxt); |
| 3120 |
- |
|
| 3121 | 2235 |
}else{
|
| 3122 |
- |
|
| 3123 | 2236 |
fnByteString(smsTxt); |
| 3124 |
- |
|
| 3125 | 2237 |
} |
| 3126 |
- |
|
| 3127 | 2238 |
//내 문자함 가져오기에서 글자길이 계산을 다시한다. |
| 3128 |
- $("#smsTxtArea").trigger("keyup");
|
|
| 3129 |
- |
|
| 2239 |
+ $("#smsTxtArea").trigger("keyup");
|
|
| 3130 | 2240 |
// 문자전송 상단으로 이동 |
| 3131 | 2241 |
var sendOfT=$('.send_top').offset().top;
|
| 3132 | 2242 |
$('html,body').stop().animate({'scrollTop':sendOfT-60},250);
|
| 3133 | 2243 |
}else{
|
| 3134 |
- |
|
| 3135 | 2244 |
alert("내문자함 내용을 불러오지 못하였습니다.");
|
| 3136 | 2245 |
return false; |
| 3137 |
- |
|
| 3138 | 2246 |
} |
| 3139 |
- |
|
| 3140 | 2247 |
} else if(status== 'fail'){
|
| 3141 | 2248 |
alert("내문자함 내용 입력에 실패하였습니다. !!");
|
| 3142 | 2249 |
} |
... | ... | @@ -3146,19 +2253,14 @@ |
| 3146 | 2253 |
|
| 3147 | 2254 |
} |
| 3148 | 2255 |
//최초 문자샘플 탭 리스트 데이터 불러오기 |
| 3149 |
-//fnLetterListAjax(); |
|
| 3150 |
- |
|
| 3151 | 2256 |
/* 윈도우팝업 열기 */ |
| 3152 | 2257 |
/* 윈도우팝업 열기 */ |
| 3153 | 2258 |
var infoPopT; // 전역 변수로 선언하여 팝업 추적 |
| 3154 | 2259 |
|
| 3155 | 2260 |
function infoPop(pageUrl) {
|
| 3156 |
- // 기존 팝업이 존재하면 닫기 |
|
| 3157 | 2261 |
if (infoPopT && !infoPopT.closed) {
|
| 3158 | 2262 |
infoPopT.close(); |
| 3159 | 2263 |
} |
| 3160 |
- |
|
| 3161 |
- // 기본값 설정 |
|
| 3162 | 2264 |
let width = 790, height = 350; |
| 3163 | 2265 |
|
| 3164 | 2266 |
if (pageUrl === "adrvertisement1") {
|
... | ... | @@ -3168,35 +2270,18 @@ |
| 3168 | 2270 |
width = 500; |
| 3169 | 2271 |
height = 550; |
| 3170 | 2272 |
} |
| 3171 |
- |
|
| 3172 |
- // 🔥 현재 브라우저 창 크기 가져오기 |
|
| 3173 | 2273 |
let screenWidth = window.innerWidth || document.documentElement.clientWidth || screen.width; |
| 3174 | 2274 |
let screenHeight = window.innerHeight || document.documentElement.clientHeight || screen.height; |
| 3175 |
- |
|
| 3176 |
- // 💡 팝업을 브라우저 창 중앙에 위치시키기 위해 `top`, `left` 계산 |
|
| 3177 | 2275 |
let left = (screenWidth - width) / 2 + window.screenX; |
| 3178 | 2276 |
let top = (screenHeight - height) / 2 + window.screenY; |
| 3179 |
- |
|
| 3180 |
- // 📝 옵션 문자열 (정확한 중앙 정렬 적용) |
|
| 3181 |
- let options = "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + |
|
| 3182 |
- ",fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=1"; |
|
| 3183 |
- |
|
| 3184 |
- console.log('팝업 옵션 : ', options);
|
|
| 3185 |
- |
|
| 3186 |
- // 🔥 window.open() 호출 |
|
| 2277 |
+ let options = "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=1"; |
|
| 3187 | 2278 |
infoPopT = window.open("", 'infoPop', options);
|
| 3188 |
- |
|
| 3189 |
- // 🔄 폼 데이터 설정 및 제출 |
|
| 3190 | 2279 |
document.popForm.pageType.value = pageUrl; |
| 3191 | 2280 |
document.popForm.action = "/web/pop/infoPop.do"; |
| 3192 | 2281 |
document.popForm.method = "post"; |
| 3193 | 2282 |
document.popForm.target = "infoPop"; |
| 3194 | 2283 |
document.popForm.submit(); |
| 3195 | 2284 |
} |
| 3196 |
- |
|
| 3197 |
- |
|
| 3198 |
- |
|
| 3199 |
- |
|
| 3200 | 2285 |
|
| 3201 | 2286 |
$(document).on('click', '.addressregi_btn', function() {
|
| 3202 | 2287 |
var tableData = tableL.getRows(); |
... | ... | @@ -3224,7 +2309,6 @@ |
| 3224 | 2309 |
$("#addrGrpNm").val(""); // 새그룹명 Clear;
|
| 3225 | 2310 |
} |
| 3226 | 2311 |
}); |
| 3227 |
- |
|
| 3228 | 2312 |
//주소록 그룹정보 불러오기 |
| 3229 | 2313 |
function getAddrGroupList() {
|
| 3230 | 2314 |
$.ajax({
|
... | ... | @@ -3255,7 +2339,6 @@ |
| 3255 | 2339 |
for (var j = 0; j < jsonList.length; j++) {
|
| 3256 | 2340 |
sHtml += " <option value='" + $.trim(jsonList[j].addrGrpId) + "' />" + $.trim(jsonList[j].addrGrpNm) + "</option>"; |
| 3257 | 2341 |
} |
| 3258 |
- |
|
| 3259 | 2342 |
$("#addrGrpIdInfo").html(sHtml);
|
| 3260 | 2343 |
} |
| 3261 | 2344 |
|
... | ... | @@ -3272,30 +2355,22 @@ |
| 3272 | 2355 |
success : function(data, status){
|
| 3273 | 2356 |
if(data.isSuccess == true) {
|
| 3274 | 2357 |
if(data.isDupl == true) {
|
| 3275 |
- //alert("중복된 그룹명입니다.");
|
|
| 3276 | 2358 |
isReturn = false; |
| 3277 | 2359 |
} |
| 3278 | 2360 |
} |
| 3279 |
- else {
|
|
| 3280 |
- //alert("Message : " + msg);
|
|
| 3281 |
- } |
|
| 2361 |
+ else {}
|
|
| 3282 | 2362 |
}, |
| 3283 |
- error: function (e) {
|
|
| 3284 |
- //alert("주소록 중복체크에 실패했습니다.");
|
|
| 3285 |
- } |
|
| 2363 |
+ error: function (e) {}
|
|
| 3286 | 2364 |
}); |
| 3287 |
- |
|
| 3288 | 2365 |
return isReturn; |
| 3289 | 2366 |
} |
| 3290 | 2367 |
|
| 3291 | 2368 |
/* 테스트발송 열기 */ |
| 3292 |
-function fnTestSend(){
|
|
| 3293 |
- |
|
| 3294 |
- if(!checkConf()){ //문자고 conf-check
|
|
| 2369 |
+function fnTestSend(skipSenderAuthCheck){
|
|
| 2370 |
+ if(!checkConf()){ //문자온 conf-check
|
|
| 3295 | 2371 |
alert("현재 문자 발송하기 기능 점검 중입니다.\n\n1분 후 다시 시도해주세요.");
|
| 3296 | 2372 |
return false; |
| 3297 | 2373 |
} |
| 3298 |
- |
|
| 3299 | 2374 |
var msgForm = document.msgForm; |
| 3300 | 2375 |
var form = document.testSendForm; |
| 3301 | 2376 |
var loginVO = '${LoginVO}';
|
... | ... | @@ -3316,13 +2391,6 @@ |
| 3316 | 2391 |
return false; |
| 3317 | 2392 |
} |
| 3318 | 2393 |
} |
| 3319 |
- |
|
| 3320 |
- //MJ_MSG_GROUP_DATA 누락데이터 체크 |
|
| 3321 |
- //if (getMsgGroupDataErrorCheck() == false) {
|
|
| 3322 |
- // alert("고객님께서 발송한 최근문자가 발송결과에 표시되지않아, 문자발송이 임시로 차단되었습니다.\n문자고 고객센터에 문의해주세요.");
|
|
| 3323 |
- // return false; |
|
| 3324 |
- //} |
|
| 3325 |
- |
|
| 3326 | 2394 |
//문자내용에 이모지가 있는지 체크 |
| 3327 | 2395 |
var strCont = msgForm.smsTxtArea.value; |
| 3328 | 2396 |
if(!emojiCheck(strCont)) return false; |
... | ... | @@ -3341,128 +2409,56 @@ |
| 3341 | 2409 |
return false; |
| 3342 | 2410 |
} |
| 3343 | 2411 |
} |
| 3344 |
- /* else{//문자내용에 스팸 단어 포함여부 체크
|
|
| 3345 |
- console.log(' : spam데이터 : ');
|
|
| 3346 |
- var spmData = new FormData(msgForm); |
|
| 3347 |
- url = "/web/mjon/msgdata/selectSpamTxtChkAjax.do"; |
|
| 3348 |
- |
|
| 3349 |
- $.ajax({
|
|
| 3350 |
- type: "POST", |
|
| 3351 |
- url: url, |
|
| 3352 |
- data: spmData, |
|
| 3353 |
- dataType:'json', |
|
| 3354 |
- async: false, |
|
| 3355 |
- processData: false, |
|
| 3356 |
- contentType: false, |
|
| 3357 |
- cache: false, |
|
| 3358 |
- success: function (returnData, status) {
|
|
| 3359 |
- if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
| 3360 |
- |
|
| 3361 |
- if("fail" == returnData.result){
|
|
| 3362 |
- |
|
| 3363 |
- alert(returnData.message); |
|
| 3364 |
- return false; |
|
| 3365 |
- |
|
| 3366 |
- }else if("loginFail" == returnData.result){
|
|
| 3367 |
- |
|
| 3368 |
- alert(returnData.message); |
|
| 3369 |
- return false; |
|
| 3370 |
- |
|
| 3371 |
- }else if("spams" == returnData.result){
|
|
| 3372 |
- |
|
| 3373 |
-// var spmFilterTxt = returnData.spmFilterTxt; |
|
| 3374 |
- spamStatus = true; |
|
| 3375 |
- //alert("문자 내용에 \"" + spmFilterTxt + "\"의 스팸문자가 포함되어 있습니다.");
|
|
| 3376 |
- alert("전송 문자내용 중 스팸문구로 의심되는 단어가 포함되어 있어 문자발송이 불가합니다.\n자세한 사항은 문자고 고객센터를 통해 문의주시기 바랍니다.");
|
|
| 3377 |
- return false; |
|
| 3378 |
- |
|
| 3379 |
- } |
|
| 3380 |
- |
|
| 3381 |
- } else if(status== 'fail'){
|
|
| 3382 |
- alert(returnData.message); |
|
| 3383 |
- return false; |
|
| 3384 |
- } |
|
| 3385 |
- }, |
|
| 3386 |
- error: function (e) { alert("시스템 오류가 발생하였습니다."); console.log("ERROR : ", e); return false;}
|
|
| 3387 |
- }); |
|
| 3388 |
- |
|
| 3389 |
- } */ |
|
| 3390 | 2412 |
|
| 2413 |
+ // 인증 완료 후에는 현재 화면 값을 다시 검증하되 인증 상태 조회만 생략한다. |
|
| 2414 |
+ if (skipSenderAuthCheck !== true) {
|
|
| 2415 |
+ ensureSenderAuthenticated(function () {
|
|
| 2416 |
+ fnTestSend(true); |
|
| 2417 |
+ }); |
|
| 2418 |
+ return false; |
|
| 2419 |
+ } |
|
| 3391 | 2420 |
|
| 3392 | 2421 |
//단문 장문 그림(몇장인지) 판별하기 - 발송금액 계산 |
| 3393 |
- |
|
| 3394 | 2422 |
if($('#nowMsgType').text() == "그림"){
|
| 3395 |
- |
|
| 3396 | 2423 |
msgType = '6'; |
| 3397 |
- |
|
| 3398 | 2424 |
if(imgFilePath.length == 1) {
|
| 3399 |
- |
|
| 3400 | 2425 |
form.eachPrice.value = '<c:out value="${picturePrice}" />';
|
| 3401 |
- |
|
| 3402 | 2426 |
} else if(imgFilePath.length == 2) {
|
| 3403 |
- |
|
| 3404 | 2427 |
form.eachPrice.value = '<c:out value="${picture2Price}" />';
|
| 3405 |
- |
|
| 3406 | 2428 |
} else if(imgFilePath.length == 3) {
|
| 3407 |
- |
|
| 3408 | 2429 |
form.eachPrice.value = '<c:out value="${picture3Price}" />';
|
| 3409 |
- |
|
| 3410 | 2430 |
} |
| 3411 |
- |
|
| 3412 | 2431 |
//제목 사용한 경우 |
| 3413 | 2432 |
if($("input[name=subjectChkYn]:checked").val() == 'Y') {
|
| 3414 | 2433 |
form.mmsSubject.value = msgForm.mmsSubject.value; |
| 3415 | 2434 |
} else {
|
| 3416 | 2435 |
form.mmsSubject.value = ""; //초기화 |
| 3417 | 2436 |
} |
| 3418 |
- |
|
| 3419 |
- |
|
| 3420 | 2437 |
}else if($('#nowMsgType').text() == "장문"){
|
| 3421 |
- |
|
| 3422 | 2438 |
msgType = '6'; |
| 3423 |
- |
|
| 3424 | 2439 |
form.eachPrice.value = '<c:out value="${longPrice}" />';
|
| 3425 |
- |
|
| 3426 | 2440 |
//제목 사용한 경우 |
| 3427 | 2441 |
if($("input[name=subjectChkYn]:checked").val() == 'Y') {
|
| 3428 | 2442 |
form.mmsSubject.value = msgForm.mmsSubject.value; |
| 3429 | 2443 |
} else {
|
| 3430 | 2444 |
form.mmsSubject.value = ""; //초기화 |
| 3431 | 2445 |
} |
| 3432 |
- |
|
| 3433 | 2446 |
}else{
|
| 3434 |
- |
|
| 3435 | 2447 |
msgType = '4'; |
| 3436 |
- |
|
| 3437 | 2448 |
form.eachPrice.value = '<c:out value="${shortPrice}" />';
|
| 3438 |
- |
|
| 3439 | 2449 |
form.mmsSubject.value = ""; // 장문/그림 제목 초기화 |
| 3440 | 2450 |
} |
| 3441 |
- |
|
| 3442 | 2451 |
form.msgType.value = msgType; |
| 3443 |
- |
|
| 3444 |
- /* |
|
| 3445 |
- var phoneIn = $(".send_right .phone").html();
|
|
| 3446 |
- //팝업으로 보내기 전에 realtime class 삭제 - 스크립트 제외 |
|
| 3447 |
- phoneIn = phoneIn.replace(' class="realtime"',"");
|
|
| 3448 |
- form.msgpreview.value = phoneIn; |
|
| 3449 |
- */ |
|
| 3450 |
- |
|
| 3451 |
- |
|
| 3452 |
- |
|
| 3453 | 2452 |
//발신번호 세팅 |
| 3454 | 2453 |
form.callFrom.value = callFrom; |
| 3455 |
- |
|
| 3456 | 2454 |
//이미지 path 보내기 |
| 3457 | 2455 |
form.imgFilePath.value = imgFilePath; |
| 3458 |
- |
|
| 3459 | 2456 |
//광고 |
| 3460 | 2457 |
if(adverYn == 'Y'){
|
| 3461 | 2458 |
form.msgKind.value = "A"; |
| 3462 | 2459 |
}else{
|
| 3463 | 2460 |
form.msgKind.value = "N"; |
| 3464 | 2461 |
} |
| 3465 |
- |
|
| 3466 | 2462 |
form.action = "/web/pop/testSmsSendPop.do"; |
| 3467 | 2463 |
form.method = "post"; |
| 3468 | 2464 |
window.open("about:blank", 'testSendPop', 'width=770, height=850, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
... | ... | @@ -3510,14 +2506,12 @@ |
| 3510 | 2506 |
} |
| 3511 | 2507 |
|
| 3512 | 2508 |
</script> |
| 3513 |
- |
|
| 3514 | 2509 |
<div class="loading_layer"> |
| 3515 | 2510 |
<div class="loading_container"> |
| 3516 | 2511 |
<div class="bar"></div> |
| 3517 | 2512 |
<div class="text">Loading</div> |
| 3518 | 2513 |
</div> |
| 3519 | 2514 |
</div> |
| 3520 |
- |
|
| 3521 | 2515 |
<form id="sentListForm" name="sentListForm" method="post"> |
| 3522 | 2516 |
<input type="hidden" name="pageType" value=""/> |
| 3523 | 2517 |
<input type="hidden" name="pageIndex" value=""/> |
... | ... | @@ -3525,8 +2519,6 @@ |
| 3525 | 2519 |
<input type="hidden" name="searchSortCnd" value="" /> |
| 3526 | 2520 |
<input type="hidden" name="searchSortOrd" value="" /> |
| 3527 | 2521 |
</form> |
| 3528 |
- |
|
| 3529 |
- <!-- 2023 10 16 재전송 : 상세내용 팝업 --> |
|
| 3530 | 2522 |
<div class="tooltip-wrap" style="z-index:110;"> |
| 3531 | 2523 |
<div class="popup-com adr_layer rev_popup01" tabindex="0" data-tooltip-con="rev_popup01" |
| 3532 | 2524 |
data-focus="rev_popup01" data-focus-prev="rev_popup01-close" style="width: 440px;"> |
... | ... | @@ -3542,9 +2534,6 @@ |
| 3542 | 2534 |
</div> |
| 3543 | 2535 |
</div> |
| 3544 | 2536 |
</div> |
| 3545 |
- <!--// 2023 10 16 재전송 : 상세내용 팝업 --> |
|
| 3546 |
- |
|
| 3547 |
- <!-- 2023 10 16 재전송 팝업 --> |
|
| 3548 | 2537 |
<div class="tooltip-wrap"> |
| 3549 | 2538 |
<div class="popup-com import_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 900px;"> |
| 3550 | 2539 |
<div class="popup_heading"> |
... | ... | @@ -3558,43 +2547,21 @@ |
| 3558 | 2547 |
</div> |
| 3559 | 2548 |
</div> |
| 3560 | 2549 |
</div> |
| 3561 |
- <!--// 2023 10 16 재전송 팝업 --> |
|
| 3562 |
- |
|
| 3563 | 2550 |
<div class="tooltip-wrap"> |
| 3564 | 2551 |
<div class="popup-com history_layer popup03" tabindex="0" data-tooltip-con="popup03" data-focus="popup03" data-focus-prev="popup03-close"> |
| 3565 | 2552 |
<div class="popup_heading"> |
| 3566 |
- <p><span>전송내역</p> |
|
| 2553 |
+ <p><span>전송내역</span></p> |
|
| 3567 | 2554 |
<button type="button" class="tooltip-close" data-focus="popup03-close" id="btnLatestAddPhoneClose"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
| 3568 | 2555 |
</div> |
| 3569 | 2556 |
<div class="layer_in"> |
| 3570 |
- <!-- tab button --> |
|
| 3571 |
- <ul class="tabType6"> |
|
| 2557 |
+ <ul class="tabType6"> |
|
| 3572 | 2558 |
<li class="tab active"><button type="button" onclick="TabType(this,'1');">최근 전송내역</button></li> |
| 3573 | 2559 |
<li class="tab"><button type="button" onclick="TabType(this,'2');">자주보내는 번호</button></li> |
| 3574 |
- </ul><!--// tab button --> |
|
| 3575 |
- <!-- 최근 전송내역 --> |
|
| 2560 |
+ </ul> |
|
| 3576 | 2561 |
<div class="history_cont hascont current"> |
| 3577 | 2562 |
<div class="histroy_trans latestMsgArea" id="latestMsgArea"> |
| 3578 | 2563 |
<ul id="latestMsgUl"> |
| 3579 |
- <%-- <c:choose> |
|
| 3580 |
- <c:when test="${not empty resultLatestMsgList}">
|
|
| 3581 |
- <c:forEach var="latestMsgList" items="${resultLatestMsgList}" varStatus="status">
|
|
| 3582 |
- <li id="latestLi"> |
|
| 3583 |
- <input type="checkbox" id="addrChk_${status.count}" name="latAddrChk" value="<c:out value='${latestMsgList.callTo}'/>">
|
|
| 3584 |
- <label for="addrChk_${status.count}" class="label">최근 전송내역</label>
|
|
| 3585 |
- <p><c:out value="${latestMsgList.callTo}"/></p>
|
|
| 3586 |
- <button type="button" id="latestAddrDel"> |
|
| 3587 |
- <img src="/publish/images/popup/close3.png" alt="전화번호 삭제"> |
|
| 3588 |
- </button> |
|
| 3589 |
- </li> |
|
| 3590 |
- </c:forEach> |
|
| 3591 |
- </c:when> |
|
| 3592 |
- <c:otherwise> |
|
| 3593 |
- <li> |
|
| 3594 |
- <p>최근 발송 내역이 없습니다.</p> |
|
| 3595 |
- </li> |
|
| 3596 |
- </c:otherwise> |
|
| 3597 |
- </c:choose> --%> |
|
| 2564 |
+ |
|
| 3598 | 2565 |
</ul> |
| 3599 | 2566 |
</div> |
| 3600 | 2567 |
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;"> |
... | ... | @@ -3602,31 +2569,13 @@ |
| 3602 | 2569 |
<button type="button" id="latestAddPhone">선택추가</button> |
| 3603 | 2570 |
<button type="button" id="latestCancelPhone">선택취소</button> |
| 3604 | 2571 |
</div> |
| 3605 |
- </div><!--// 최근 전송내역 --> |
|
| 3606 |
- <!-- 자주보내는 번호 --> |
|
| 2572 |
+ </div> |
|
| 3607 | 2573 |
<div class="history_cont hascont"> |
| 3608 | 2574 |
<div class="histroy_trans" id="bookMarkMsgArea"> |
| 3609 | 2575 |
<ul id="bookMsgUl"> |
| 3610 | 2576 |
<li> |
| 3611 | 2577 |
<p>데이터 로딩중입니다.</p> |
| 3612 | 2578 |
</li> |
| 3613 |
- <%-- <c:choose> |
|
| 3614 |
- <c:when test="${not empty resultBookMarkMsgList}">
|
|
| 3615 |
- <c:forEach var="bookMarkMsgList" items="${resultBookMarkMsgList}" varStatus="status">
|
|
| 3616 |
- <li id="bookMarkLi"> |
|
| 3617 |
- <input type="checkbox" id="bokAddrChk_${status.count}" name="bookAddrChk" value="<c:out value='${bookMarkMsgList.addrPhoneNo}'/>">
|
|
| 3618 |
- <label for="addrChk_${status.count}" class="label">최근 전송내역</label>
|
|
| 3619 |
- <p><c:out value="${bookMarkMsgList.addrPhoneNo}"/></p>
|
|
| 3620 |
- <button type="button" id="bookMarkAddrDel"><img src="/publish/images/popup/close3.png" alt="전화번호 삭제"></button> |
|
| 3621 |
- </li> |
|
| 3622 |
- </c:forEach> |
|
| 3623 |
- </c:when> |
|
| 3624 |
- <c:otherwise> |
|
| 3625 |
- <li> |
|
| 3626 |
- <p>등록된 자주 보내는 번호 내역이 없습니다.</p> |
|
| 3627 |
- </li> |
|
| 3628 |
- </c:otherwise> |
|
| 3629 |
- </c:choose> --%> |
|
| 3630 | 2579 |
</ul> |
| 3631 | 2580 |
</div> |
| 3632 | 2581 |
<div class="popup_btn_wrap2 hisroy_btn" style="width: 230px;"> |
... | ... | @@ -3634,55 +2583,19 @@ |
| 3634 | 2583 |
<button type="button" id="bookMarkAddPhone">선택추가</button> |
| 3635 | 2584 |
<button type="button" id="bookMarkCancelPhone">선택취소</button> |
| 3636 | 2585 |
</div> |
| 3637 |
- </div><!--// 자주보내는 번호 --> |
|
| 2586 |
+ </div> |
|
| 3638 | 2587 |
</div> |
| 3639 | 2588 |
</div> |
| 3640 |
- </div><!--// 전송내역 팝업 --> |
|
| 3641 |
- <!-- 엑셀 불러오기 --> |
|
| 2589 |
+ </div> |
|
| 2590 |
+ |
|
| 3642 | 2591 |
<form id="excelForm" name="excelForm" method="post"> |
| 3643 | 2592 |
<div class="tooltip-wrap"> |
| 3644 |
-<!-- <div class="popup-com import_layer popup02" tabindex="0" data-tooltip-con="popup02" data-focus="popup02" data-focus-prev="popup02-close"> --> |
|
| 3645 | 2593 |
<div class="popup-com adr_layer popup02" tabindex="0" data-tooltip-con="popup02" data-focus="popup02" data-focus-prev="popup02-close" style="width: 1000px;"> |
| 3646 | 2594 |
<%@include file="/WEB-INF/jsp/web/msgdata/include/msgDataIncludeExcel.jsp" %> |
| 3647 |
- <!-- <div class="popup_heading"> |
|
| 3648 |
- <p><span>엑셀</span> 불러오기</p> |
|
| 3649 |
- <button type="button" class="tooltip-close" data-focus="popup02-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 3650 |
- </div> |
|
| 3651 |
- <div class="layer_in"> |
|
| 3652 |
- 엑셀파일 불러오기 |
|
| 3653 |
- <div class="hascont"> |
|
| 3654 |
- <div class="titBox"> |
|
| 3655 |
- <p>- 최대 2만 건까지 등록할 수 있습니다.</p> |
|
| 3656 |
- <p>- [엑셀 불러오기]시 문서의 A, B, C, D열을 불러옵니다.(지원하는 파일 형식 : xls, xlsx)</p> |
|
| 3657 |
- <p>- 이름 : 20byte, [*1*]~[*4*] : 40byte까지 입력 가능합니다.</p> |
|
| 3658 |
- <p>- 휴대폰 항목은 숫자, 하이픈(-)만 인식하며, 번호 앞에 0이 생략되어도 정상 등록됩니다. |
|
| 3659 |
- </p> |
|
| 3660 |
- <button type="button" class="excel_btn" onclick="location.href='/cmm/fms/FileDown.do?atchFileId=FILE_000000000011651&fileSn=1'"><i></i>샘플파일 다운로드</button> |
|
| 3661 |
- <button type="button" class="excel_btn" onclick="location.href='/download/msg/엑셀주소록_등록양식.xlsx'"><i class="downroad"></i>샘플파일 다운로드</button> |
|
| 3662 |
- </div> |
|
| 3663 |
- <div class="attachedFile"> |
|
| 3664 |
- <label for="" class="attachedFile_label">첨부파일</label> |
|
| 3665 |
- <input type="text" id="excelNm" readonly> |
|
| 3666 |
- <input type="file" id="excelFile" accept=".xls, .xlsx" onchange="excelExport(event); return false;" style="display:none"/> |
|
| 3667 |
- <button type="button" class="btnType btnType6 c3">찾아보기</button> |
|
| 3668 |
- <p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 받는 사람에 등록됩니다.</p> |
|
| 3669 |
- </div> |
|
| 3670 |
- </div>// 엑셀파일 불러오기 |
|
| 3671 |
- <div class="popup_btn_wrap2"> |
|
| 3672 |
- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02" id="excelAdd">추가</button> |
|
| 3673 |
- <button type="button" class="tooltip-close" data-focus="popup02-close" data-focus-next="popup02">닫기</button> |
|
| 3674 |
- </div> |
|
| 3675 |
- </div> |
|
| 3676 |
- |
|
| 3677 |
- |
|
| 3678 |
- |
|
| 3679 |
- --> |
|
| 3680 |
- |
|
| 3681 | 2595 |
</div> |
| 3682 |
- </div><!--// 엑셀 불러오기 --> |
|
| 2596 |
+ </div> |
|
| 3683 | 2597 |
</form> |
| 3684 |
- |
|
| 3685 |
- <!-- 이미지첨부 불러오기 시작--> |
|
| 2598 |
+ |
|
| 3686 | 2599 |
<form id="imgForm" name="imgForm" method="post"> |
| 3687 | 2600 |
<div class="tooltip-wrap"> |
| 3688 | 2601 |
<div class="popup-com import_layer popupImg" tabindex="0" data-tooltip-con="popupImg" data-focus="popupImg" data-focus-prev="popupImg-close"> |
... | ... | @@ -3691,7 +2604,6 @@ |
| 3691 | 2604 |
<button type="button" class="tooltip-close" data-focus="popupImg-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
| 3692 | 2605 |
</div> |
| 3693 | 2606 |
<div class="layer_in"> |
| 3694 |
- <!-- 첨부파일 불러오기 --> |
|
| 3695 | 2607 |
<div class="hascont"> |
| 3696 | 2608 |
<div class="titBox"> |
| 3697 | 2609 |
<p>- 첨부할 이미지를 불러옵니다.(지원하는 파일 형식 : jpg, jpeg)</p> |
... | ... | @@ -3709,7 +2621,7 @@ |
| 3709 | 2621 |
<button type="button" class="btnType btnType6 upImg">찾아보기</button> |
| 3710 | 2622 |
<p><span class="vMiddle">*</span> 첨부된 파일은 <span class="c_e40000">[추가]버튼을 클릭</span>하셔야 내용에 이미지가 등록됩니다.</p> |
| 3711 | 2623 |
</div> |
| 3712 |
- </div><!--// 첨부파일 불러오기 --> |
|
| 2624 |
+ </div> |
|
| 3713 | 2625 |
<div class="popup_btn_wrap2"> |
| 3714 | 2626 |
<button type="button" class="tooltip-close" data-focus="popupImg-close" data-focus-next="popupImg" id="imgAdd" onclick="imgExport(event); return false;">이미지 등록</button> |
| 3715 | 2627 |
<button type="button" class="tooltip-close closeResizeImg" data-focus="popupImg-close" data-focus-next="popupImg">닫기</button> |
... | ... | @@ -3718,13 +2630,11 @@ |
| 3718 | 2630 |
</div> |
| 3719 | 2631 |
</div> |
| 3720 | 2632 |
</form> |
| 3721 |
- <!--// 이미지 첨부 불러오기 끝 --> |
|
| 3722 |
- |
|
| 3723 |
- <!-- 주소록 불러오기 --> |
|
| 2633 |
+ |
|
| 3724 | 2634 |
<div class="tooltip-wrap"> |
| 3725 | 2635 |
<div class="popup-com import_layer popup06 adr_call_popup" tabindex="0" data-tooltip-con="popup06" data-focus="popup06" data-focus-prev="popup06-close" style="width: 1000px"> |
| 3726 | 2636 |
<div class="popup_heading"> |
| 3727 |
- <p><span>주소록 불러오기</p> |
|
| 2637 |
+ <p><span>주소록 불러오기</span></p> |
|
| 3728 | 2638 |
<button type="button" onClick="javascript:addrClose(); return false;"> |
| 3729 | 2639 |
<img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
| 3730 | 2640 |
</div> |
... | ... | @@ -3749,9 +2659,6 @@ |
| 3749 | 2659 |
<div id="addrGroupLoad"> |
| 3750 | 2660 |
</div> |
| 3751 | 2661 |
</div> |
| 3752 |
- <!-- <div class="popup_btn"> |
|
| 3753 |
- <button type="button" class="btnType" onClick="javascript:fnSelectAddrGrpList(); return false;">선택 그룹 추가</button> |
|
| 3754 |
- </div> --> |
|
| 3755 | 2662 |
</div> |
| 3756 | 2663 |
<div class="adr_pop_right"> |
| 3757 | 2664 |
<div class="clearfix"> |
... | ... | @@ -3767,26 +2674,20 @@ |
| 3767 | 2674 |
<input type="text" id="searchAddrKeyword" name="searchAddrKeyword" placeholder="검색어를 입력하세요" onfocus="this.placeholder=''" onblur="this.placeholder='검색어를 입력하세요'" > |
| 3768 | 2675 |
<button type="button" class="btnType btnType17" onClick="javascrit:fnAddrSearch(); return false;">검색</button> |
| 3769 | 2676 |
</div> |
| 3770 |
- <!-- table --> |
|
| 3771 |
- <div class="adr_excel adr_pop_list2 callAddr_box" style="max-width:722px"> |
|
| 3772 |
- </div> |
|
| 3773 |
- <!--// table --> |
|
| 2677 |
+ <div class="adr_excel adr_pop_list2 callAddr_box" style="max-width:722px"></div> |
|
| 3774 | 2678 |
</div> |
| 3775 | 2679 |
<div class="popup_btn_wrap2"> |
| 3776 |
-<!-- <button type="button" onClick="javascript:addrToList(); return false;">추가</button> --> |
|
| 3777 | 2680 |
<button type="button" onClick="javascript:addrToList_advc('all'); return false;">전체추가</button>
|
| 3778 | 2681 |
<button type="button" onClick="javascript:addrToList_advc('select'); return false;">선택추가</button>
|
| 3779 | 2682 |
<button type="button" onClick="javascript:addrClose(); return false;">닫기</button> |
| 3780 | 2683 |
</div> |
| 3781 |
- <%-- 주소록 레이어 팝업 닫기 실행 코드 --%> |
|
| 3782 |
- <input type="hidden" name="btnAddrClose" id="btnAddrClose" class="tooltip-close closeAddr" data-focus="popup06-close" /> |
|
| 2684 |
+ <input type="hidden" name="btnAddrClose" id="btnAddrClose" class="tooltip-close closeAddr" data-focus="popup06-close" /> |
|
| 3783 | 2685 |
</div> |
| 3784 | 2686 |
</form> |
| 3785 | 2687 |
</div> |
| 3786 | 2688 |
</div> |
| 3787 | 2689 |
</div> |
| 3788 |
- </div><!--// 주소록 불러오기 --> |
|
| 3789 |
- <!-- 주소록에 등록 data-tooltip:duplication_layer --> |
|
| 2690 |
+ </div> |
|
| 3790 | 2691 |
<div class="tooltip-wrap"> |
| 3791 | 2692 |
<div class="popup-com addressregi_layer" tabindex="0" data-tooltip-con="addressregi_layer" data-focus="addressregi_layer" data-focus-prev="addressregi_layer-close" style="width: 680px;"> |
| 3792 | 2693 |
<div class="popup_heading"> |
... | ... | @@ -3821,36 +2722,6 @@ |
| 3821 | 2722 |
</div> |
| 3822 | 2723 |
</div> |
| 3823 | 2724 |
</div> |
| 3824 |
- <!--// 주소록에 등록 팝업 --> |
|
| 3825 |
- |
|
| 3826 |
- <!-- 이벤트 잔여 캐시로 발송 가능한 문자 건수 정보 --> |
|
| 3827 |
- <%-- <div class="tooltip-wrap"> |
|
| 3828 |
- <div class="popup-com import_layer popupEventSendInfo" tabindex="0" data-tooltip-con="popupEventSendInfo" data-focus="popupEventSendInfo" data-focus-prev="popupEventSendInfo-close"> |
|
| 3829 |
- <div class="popup_heading"> |
|
| 3830 |
- <p>이벤트 캐시 전송 가능 건수</p> |
|
| 3831 |
- <button type="button" class="tooltip-close" data-focus="popupEventSendInfo-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 3832 |
- </div> |
|
| 3833 |
- <div class="layer_in"> |
|
| 3834 |
- <!-- 발송 건수 정보 표시 --> |
|
| 3835 |
- <div class="hascont"> |
|
| 3836 |
- <div class="titBox"> |
|
| 3837 |
- <p> 첫 결제 이벤트 잔액(캐시) : <fmt:formatNumber value="${eventRemainCash}" pattern="#,###.#"/> 원</p>
|
|
| 3838 |
- <p id="evnShortMsg">단문(<fmt:formatNumber value="${eventMberInfo.eventShortPrice}" pattern="#,###.#"/>) : <fmt:formatNumber value="${(eventRemainCash / eventMberInfo.eventShortPrice) - ((eventRemainCash / eventMberInfo.eventShortPrice) % 1) }" pattern="#,###"/> 건</p>
|
|
| 3839 |
- <p id="evnShortMsg">장문(<fmt:formatNumber value="${eventMberInfo.eventLongPrice}" pattern="#,###.#"/>) : <fmt:formatNumber value="${(eventRemainCash / eventMberInfo.eventLongPrice) - ((eventRemainCash / eventMberInfo.eventLongPrice) % 1)}" pattern="#,###"/> 건</p>
|
|
| 3840 |
- <p id="evnShortMsg">그림 1장(<fmt:formatNumber value="${eventMberInfo.eventPicturePrice}" pattern="#,###.#"/>) : <fmt:formatNumber value="${(eventRemainCash / eventMberInfo.eventPicturePrice) - ((eventRemainCash / eventMberInfo.eventPicturePrice) % 1)}" pattern="#,###"/> 건</p>
|
|
| 3841 |
- <p id="evnShortMsg">그림 2장(<fmt:formatNumber value="${eventMberInfo.eventPicture2Price}" pattern="#,###.#"/>) : <fmt:formatNumber value="${(eventRemainCash / eventMberInfo.eventPicture2Price) - ((eventRemainCash / eventMberInfo.eventPicture2Price) % 1)}" pattern="#,###"/> 건</p>
|
|
| 3842 |
- <p id="evnShortMsg">그림 3장(<fmt:formatNumber value="${eventMberInfo.eventPicture3Price}" pattern="#,###.#"/>) : <fmt:formatNumber value="${(eventRemainCash / eventMberInfo.eventPicture3Price) - ((eventRemainCash / eventMberInfo.eventPicture3Price) % 1)}" pattern="#,###"/> 건</p>
|
|
| 3843 |
- |
|
| 3844 |
- </div> |
|
| 3845 |
- </div><!--// 발송 건수 정보 표시 --> |
|
| 3846 |
- <div class="popup_btn_wrap2"> |
|
| 3847 |
- <button type="button" class="tooltip-close closePopupEventSendInfo" data-focus="popupEventSendInfo-close" data-focus-next="popupEventSendInfo">닫기</button> |
|
| 3848 |
- </div> |
|
| 3849 |
- </div> |
|
| 3850 |
- </div> |
|
| 3851 |
- </div> --%> |
|
| 3852 |
- |
|
| 3853 |
- <!-- 이벤트 잔여 캐시 정보 표시 팝업 --> |
|
| 3854 | 2725 |
<div class="tooltip-wrap"> |
| 3855 | 2726 |
<div class="popup-com event_cash_popup popup07" tabindex="0" data-tooltip-con="popup07" data-focus="popup07" data-focus-prev="popup07-close"> |
| 3856 | 2727 |
<div class="popup_heading"> |
... | ... | @@ -3898,8 +2769,7 @@ |
| 3898 | 2769 |
</div> |
| 3899 | 2770 |
</div> |
| 3900 | 2771 |
</div> |
| 3901 |
- |
|
| 3902 |
- |
|
| 2772 |
+ |
|
| 3903 | 2773 |
<form id="msgForm" name="msgForm" method="post"> |
| 3904 | 2774 |
<input type="hidden" id="msgType" name="msgType" value="4" /><!-- 문자 종류 : 단문 - 4, 장문/그림 - 6 --> |
| 3905 | 2775 |
<input type="hidden" id="imgFilePath" name="imgFilePath" value="" /><!-- 선택 이미지 파일 경로 정보 , 로 구분 최대 3장까지 --> |
... | ... | @@ -3933,21 +2803,17 @@ |
| 3933 | 2803 |
<input type="hidden" id="txtReplYn" name="txtReplYn" value="N"/><!-- 변환문자 유무 --> |
| 3934 | 2804 |
<input type="hidden" id="shortMsgCnt" name="shortMsgCnt" value="0"/><!-- 단문 변환문자 건수 --> |
| 3935 | 2805 |
<input type="hidden" id="longMsgCnt" name="longMsgCnt" value="0"/><!-- 장문 변환문자 건수 --> |
| 3936 |
- |
|
| 3937 | 2806 |
<!-- 주소록 등록 --> |
| 3938 | 2807 |
<input type="hidden" id="addrGrpId" name="addrGrpId" value=""/> |
| 3939 | 2808 |
<input type="hidden" id="addrGrpNm" name="addrGrpNm" value=""/> |
| 3940 |
- |
|
| 3941 | 2809 |
<!-- 이벤트 관련 변수 --> |
| 3942 | 2810 |
<input type="hidden" id="eventStatus" name="eventStatus" value="<c:out value='${eventMberInfo.eventStatus}'/>"/>
|
| 3943 | 2811 |
<input type="hidden" id="eventRemainCash" name="eventRemainCash" value="<c:out value='${eventRemainCash}'/>"/>
|
| 3944 | 2812 |
<input type="hidden" id="eventYn" name="eventYn" value="N"/> |
| 3945 |
- |
|
| 3946 | 2813 |
<!-- 스팸문자 관련 변수 --> |
| 3947 | 2814 |
<input type="hidden" id="spamKeyword" name="spamKeyword"/> |
| 3948 | 2815 |
<input type="hidden" id="spamStatus" name="spamStatus"/> |
| 3949 | 2816 |
<input type="hidden" id="exceptSpamYn" name="exceptSpamYn" value="<c:out value='${exceptSpamYn}'/>"/>
|
| 3950 |
- |
|
| 3951 | 2817 |
<!-- 이벤트 캐시 부족시 일반캐시로 계산을 위해 저장, 우영두 2023.03.28 --> |
| 3952 | 2818 |
<input type="hidden" id="norsPrice" name="norsPrice" value="<c:out value="${norShortPrice}"/>"/><!-- 단문문자 단가(이벤트 단가 제외) -->
|
| 3953 | 2819 |
<input type="hidden" id="normPrice" name="normPrice" value="<c:out value="${norLongPrice}"/>"/><!-- 장문문자 단가(이벤트 단가 제외) -->
|
... | ... | @@ -3957,14 +2823,9 @@ |
| 3957 | 2823 |
<input type="hidden" id="evnPhoneNumCnt" name="evnPhoneNumCnt" value="0"/><!-- 치환 이벤트 발송 수신자 갯수 --> |
| 3958 | 2824 |
<input type="hidden" id="evnShortMsgCnt" name="evnShortMsgCnt" value="0"/><!-- 치환 이벤트 단문 건수 --> |
| 3959 | 2825 |
<input type="hidden" id="evnLongMsgCnt" name="evnLongMsgCnt" value="0"/><!-- 치환 이벤트 장문 건수 --> |
| 3960 |
- |
|
| 3961 | 2826 |
<input type="hidden" id="blineCode" name="blineCode" value="<c:out value="${blineCode}"/>"/>
|
| 3962 |
- |
|
| 3963 | 2827 |
<input type="hidden" id="tabDision" value="<c:out value="${tabDision}"/>"/>
|
| 3964 |
- |
|
| 3965 | 2828 |
<input type="hidden" id="send_adYn" name="send_adYn" value="${tabDision eq 'tab02' ? 'Y' : 'N'}"/>
|
| 3966 |
- |
|
| 3967 |
- <!-- <div class="top_content current" id="tab1_1"> --> |
|
| 3968 | 2829 |
<div class="heading"> |
| 3969 | 2830 |
<h2> |
| 3970 | 2831 |
<c:choose> |
... | ... | @@ -3977,22 +2838,10 @@ |
| 3977 | 2838 |
</c:otherwise> |
| 3978 | 2839 |
</c:choose> |
| 3979 | 2840 |
</h2> |
| 3980 |
- <!-- /web/mjon/msgdata/selectMsgDataSMLViewAjax.do --> |
|
| 3981 |
- <!-- MsgDataSMLView.jsp --> |
|
| 3982 | 2841 |
<button type="button" class="button info" onclick="infoPop('selectMsgDataView1');">사용안내</button>
|
| 3983 | 2842 |
</div> |
| 3984 | 2843 |
<div class="send_general"> |
| 3985 | 2844 |
<div class="send_left"> |
| 3986 |
- <%-- <dl class="myprice_view"> |
|
| 3987 |
- <dt>나의 요금제</dt> |
|
| 3988 |
- <dd> |
|
| 3989 |
- <ul> |
|
| 3990 |
- <li><span class="type">단문</span><span class="price"><c:out value="${shortPrice}"/></span>원</li>
|
|
| 3991 |
- <li><span class="type">장문</span><span class="price"><c:out value="${longPrice}"/></span>원</li>
|
|
| 3992 |
- <li><span class="type">그림</span><span class="price"><c:out value="${picturePrice}"/></span>원 <span class="count">(2장 : <c:out value="${picture2Price}"/>원 / 3장 : <c:out value="${picture3Price}"/>원)</span></li>
|
|
| 3993 |
- </ul> |
|
| 3994 |
- </dd> |
|
| 3995 |
- </dl> --%> |
|
| 3996 | 2845 |
<table class="tType1"> |
| 3997 | 2846 |
<caption>일반 문자보내기 분류 번호 내용 등을 입력하는 표</caption> |
| 3998 | 2847 |
<colgroup> |
... | ... | @@ -4000,35 +2849,29 @@ |
| 4000 | 2849 |
<col style="width: auto;"> |
| 4001 | 2850 |
</colgroup> |
| 4002 | 2851 |
<tbody> |
| 4003 |
- <!-- <tr> |
|
| 4004 |
- <th scope="row">문자분류</th> |
|
| 4005 |
- <td class="send_cf"> |
|
| 4006 |
- <input class="send_adYnN" id="send_adYnN" type="radio"name="send_adYn" value="N" checked="checked"> |
|
| 4007 |
- <label class="send_adYnN" for="send_adYnN">일반</label> |
|
| 4008 |
- <input id="send_adYnY" type="radio" name="send_adYn" value="Y"> |
|
| 4009 |
- <label for="send_adYnY">광고</label> |
|
| 4010 |
- </td> |
|
| 4011 |
- </tr> --> |
|
| 4012 | 2852 |
<tr> |
| 4013 | 2853 |
<th scope="row">발신번호</th> |
| 4014 | 2854 |
<td class="put_num"> |
| 4015 |
- <div class="form_wrap left"> |
|
| 4016 |
- <label for="callFrom" class="label"></label> |
|
| 4017 |
- <select id="callFromList" name="callFromList" class="sel_number"> |
|
| 4018 |
- <c:choose> |
|
| 4019 |
- <c:when test="${not empty resultPhonList}">
|
|
| 4020 |
- <c:forEach var="phonList" items="${resultPhonList}" varStatus="status">
|
|
| 4021 |
- <option value="${phonList}">${phonList}</option>
|
|
| 4022 |
- </c:forEach> |
|
| 4023 |
- </c:when> |
|
| 4024 |
- <c:otherwise> |
|
| 4025 |
- <option value="">등록된 발신 번호가 없습니다.</option> |
|
| 4026 |
- </c:otherwise> |
|
| 4027 |
- </c:choose> |
|
| 4028 |
- </select> |
|
| 4029 |
- <button type="button" class="btnType btnType6" onclick="location.href='/web/user/sendNumberManage.do'">번호등록</button> |
|
| 4030 |
- </div> |
|
| 4031 |
- </td> |
|
| 2855 |
+ <label for="callFrom" class="label"></label> |
|
| 2856 |
+ <select id="callFromList" name="callFromList" class="sel_number"> |
|
| 2857 |
+ <c:choose> |
|
| 2858 |
+ <c:when test="${not empty resultPhonList}">
|
|
| 2859 |
+ <c:forEach var="result" items="${resultPhonList}" varStatus="status">
|
|
| 2860 |
+ <option value="${result.phoneNumber}">
|
|
| 2861 |
+ ${result.phoneNumber}
|
|
| 2862 |
+ (${result.phmLineType eq 'M' ? '무선' : result.phmLineType eq 'R' ? '대표' : result.phmLineType eq 'L' ? '유선' : '-'})
|
|
| 2863 |
+ </option> |
|
| 2864 |
+ </c:forEach> |
|
| 2865 |
+ </c:when> |
|
| 2866 |
+ <c:otherwise> |
|
| 2867 |
+ <option value="">등록된 발신 번호가 없습니다.</option> |
|
| 2868 |
+ </c:otherwise> |
|
| 2869 |
+ </c:choose> |
|
| 2870 |
+ </select> |
|
| 2871 |
+ <button type="button" class="btnType btnType6" onclick="location.href='/web/user/sendNumberManage.do'">번호등록</button> |
|
| 2872 |
+ <div class="badge blue sender_auth_verified" style="display:none;"><i></i>인증완료</div> |
|
| 2873 |
+ <div class="badge yellow auth_popup_open sender_auth_required"><i></i>인증 확인</div> |
|
| 2874 |
+ </td> |
|
| 4032 | 2875 |
</tr> |
| 4033 | 2876 |
<tr class="msg_title"> |
| 4034 | 2877 |
<th scope="row">제목</th> |
... | ... | @@ -4047,15 +2890,12 @@ |
| 4047 | 2890 |
</ul> |
| 4048 | 2891 |
</td> |
| 4049 | 2892 |
</tr> |
| 4050 |
- <!-- 문자 내용 영역 --> |
|
| 4051 | 2893 |
<tr> |
| 4052 | 2894 |
<th scope="row" class="vTop">내용</th> |
| 4053 | 2895 |
<td class="putText"> |
| 4054 | 2896 |
<div class="clearfix"> |
| 4055 | 2897 |
<div class="put_left short"> |
| 4056 |
- <!-- 업로드한 이미지의 썸네일 영역 --> |
|
| 4057 | 2898 |
<ul class="thumb_wrap none liOnImg"></ul> |
| 4058 |
- <!-- //업로드한 이미지의 썸네일 영역 --> |
|
| 4059 | 2899 |
<label for="smsTxtArea" class="label"></label> |
| 4060 | 2900 |
<c:if test="${tabDision eq 'tab02'}">
|
| 4061 | 2901 |
<div class="ad_txt"><p>(광고)</p></div> |
... | ... | @@ -4068,7 +2908,6 @@ |
| 4068 | 2908 |
<div name="afterDeny"> |
| 4069 | 2909 |
<p> |
| 4070 | 2910 |
<span class="fwMd" id="msgLeng"> |
| 4071 |
- |
|
| 4072 | 2911 |
<c:choose> |
| 4073 | 2912 |
<c:when test="${tabDision eq 'tab02'}">
|
| 4074 | 2913 |
27 |
... | ... | @@ -4096,7 +2935,6 @@ |
| 4096 | 2935 |
<a href="#none">사랑</a> |
| 4097 | 2936 |
<a href="#none">그외</a> |
| 4098 | 2937 |
</div> |
| 4099 |
- <!-- 특수문자 부분 --> |
|
| 4100 | 2938 |
<div class="cnt_character on"> |
| 4101 | 2939 |
<div class="box_character"> |
| 4102 | 2940 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4106,7 +2944,6 @@ |
| 4106 | 2944 |
</c:forEach> |
| 4107 | 2945 |
</div> |
| 4108 | 2946 |
</div> |
| 4109 |
- <!-- 웃음 --> |
|
| 4110 | 2947 |
<div class="cnt_character emt_character"> |
| 4111 | 2948 |
<div class="box_character"> |
| 4112 | 2949 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4116,8 +2953,6 @@ |
| 4116 | 2953 |
</c:forEach> |
| 4117 | 2954 |
</div> |
| 4118 | 2955 |
</div> |
| 4119 |
- <!-- //웃음 --> |
|
| 4120 |
- <!-- 슬픔 --> |
|
| 4121 | 2956 |
<div class="cnt_character emt_character"> |
| 4122 | 2957 |
<div class="box_character"> |
| 4123 | 2958 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4127,8 +2962,6 @@ |
| 4127 | 2962 |
</c:forEach> |
| 4128 | 2963 |
</div> |
| 4129 | 2964 |
</div> |
| 4130 |
- <!-- //슬픔 --> |
|
| 4131 |
- <!-- 분노 --> |
|
| 4132 | 2965 |
<div class="cnt_character emt_character"> |
| 4133 | 2966 |
<div class="box_character"> |
| 4134 | 2967 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4138,8 +2971,6 @@ |
| 4138 | 2971 |
</c:forEach> |
| 4139 | 2972 |
</div> |
| 4140 | 2973 |
</div> |
| 4141 |
- <!-- //분노 --> |
|
| 4142 |
- <!-- 사랑 --> |
|
| 4143 | 2974 |
<div class="cnt_character emt_character"> |
| 4144 | 2975 |
<div class="box_character"> |
| 4145 | 2976 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4149,8 +2980,6 @@ |
| 4149 | 2980 |
</c:forEach> |
| 4150 | 2981 |
</div> |
| 4151 | 2982 |
</div> |
| 4152 |
- <!-- //사랑 --> |
|
| 4153 |
- <!-- 그외 --> |
|
| 4154 | 2983 |
<div class="cnt_character emt_character emt_etc "> |
| 4155 | 2984 |
<div class="box_character"> |
| 4156 | 2985 |
<c:forEach var="symbolList" items="${symbolList}" varStatus="status">
|
... | ... | @@ -4160,7 +2989,6 @@ |
| 4160 | 2989 |
</c:forEach> |
| 4161 | 2990 |
</div> |
| 4162 | 2991 |
</div> |
| 4163 |
- <!-- //그외 --> |
|
| 4164 | 2992 |
<button type="button" class="btn_close" onclick="miniPopup(this);">닫기</button> |
| 4165 | 2993 |
</div> |
| 4166 | 2994 |
</div> |
... | ... | @@ -4184,7 +3012,6 @@ |
| 4184 | 3012 |
</div> |
| 4185 | 3013 |
</div> |
| 4186 | 3014 |
<button type="button" class="btnType btnType7" onclick="javascript:fnGoMyMsg(); return false;">내문자함</button> |
| 4187 |
- <%-- <button type="button" data-tooltip="popupImg" class="btnType btnType7">이미지 첨부</button> --%> |
|
| 4188 | 3015 |
<button type="button" class="btnType btnType8" onclick="openPhotoEditor();">이미지 불러오기</button> |
| 4189 | 3016 |
<div class="send_btnWrap"> |
| 4190 | 3017 |
<button type="button" class="btnType btnType9" onclick="javascript:fn_saveMyMsg(); return false;">문자저장</button> |
... | ... | @@ -4199,31 +3026,17 @@ |
| 4199 | 3026 |
<th scope="row" class="vTop">받는사람</th> |
| 4200 | 3027 |
<td class="putText"> |
| 4201 | 3028 |
<div class="clearfix receipt_num"> |
| 4202 |
-<!-- <div class="receipt_num_top"> --> |
|
| 4203 |
-<!-- <label for="callTo" class="label">받는 번호입력</label> --> |
|
| 4204 |
- |
|
| 4205 |
-<!-- <input type="text" id="callTo" name="callTo" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" placeholder="번호를 입력하세요" |
|
| 4206 |
- onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;"> --> |
|
| 4207 |
- |
|
| 4208 |
-<!-- <button type="button" class="btnType btnType6 addCallToF">번호추가</button> --> |
|
| 4209 |
-<!-- <span><span class="vMiddle">*</span> 중복번호는 한번만 추가됩니다.</span> --> |
|
| 4210 |
-<!-- </div> --> |
|
| 4211 |
- |
|
| 4212 | 3029 |
<div class="receipt_num_top"> |
| 4213 | 3030 |
<label for="" class="label">받는 번호입력</label> |
| 4214 |
- <!-- <input type="text" placeholder="번호를 입력하세요" onfocus="this.placeholder=''" onblur="this.placeholder='번호를 입력하세요'" style="width:340px;"> --> |
|
| 4215 |
-<!-- oninput="this.value = this.value.replace(/[^0-9.\n]/g, '').replace(/(\..*)\./g, '$1');" --> |
|
| 4216 | 3031 |
<textarea name="callTo" id="callTo" cols="30" rows="10" class="receipt_num" |
| 4217 | 3032 |
placeholder="번호를 입력하세요" |
| 4218 | 3033 |
onfocus="this.placeholder=''" |
| 4219 | 3034 |
onblur="this.placeholder='번호를 입력하세요'" |
| 4220 | 3035 |
style="width:340px;"></textarea> |
| 4221 |
- <!-- <button type="button" class="btnType btnType6">번호추가</button> --> |
|
| 4222 | 3036 |
<div class="btn_popup_wrap"> |
| 4223 | 3037 |
<button type="button" class="btnType btnType6 btn_add_number addCallToF">번호추가<i class="qmMark"></i></button> |
| 4224 | 3038 |
<span style="display:block;margin:10px 0 0 0;"><span class="vMiddle">*</span> 중복번호는 한번만 추가됩니다.</span> |
| 4225 | 3039 |
<div class="error_hover_cont send_hover_cont"> |
| 4226 |
-<!-- <p>휴대폰 번호 입력 시 해당 휴대폰 번호에 대한 형식이 어긋나거나 휴대폰 번호에 오류가 있는지 등을 검사하는 기능</p> --> |
|
| 4227 | 3040 |
<p>줄바꿈(Enter) 기준으로 핸드폰 번호 입력이 가능합니다.</p> |
| 4228 | 3041 |
<span> |
| 4229 | 3042 |
(예시)<br/> |
... | ... | @@ -4237,23 +3050,6 @@ |
| 4237 | 3050 |
</div> |
| 4238 | 3051 |
<div class="receipt_num_midde"> |
| 4239 | 3052 |
<div class="listType list01 callList_box"> |
| 4240 |
- <!-- |
|
| 4241 |
- <div class="list_table list_head"> |
|
| 4242 |
- <div class="cb_wrap"> |
|
| 4243 |
- <label for="" class="label"></label> |
|
| 4244 |
- <input type="checkbox"> |
|
| 4245 |
- </div> |
|
| 4246 |
- <div class="list_table_num"> |
|
| 4247 |
- <p>번호</p> |
|
| 4248 |
- <img src="/publish/images/sortUp.png"> |
|
| 4249 |
- <img src="/publish/images/sortDown.png"> |
|
| 4250 |
- </div> |
|
| 4251 |
- <div class="list_table_name"> |
|
| 4252 |
- <p>이름</p> |
|
| 4253 |
- <img src="/publish/images/sortUp.png"> |
|
| 4254 |
- <img src="/publish/images/sortDown.png"> |
|
| 4255 |
- </div> |
|
| 4256 |
- </div> --> |
|
| 4257 | 3053 |
</div> |
| 4258 | 3054 |
<div class="put_right"> |
| 4259 | 3055 |
<div class="btn_popup_wrap spc_wrap"> |
... | ... | @@ -4271,13 +3067,6 @@ |
| 4271 | 3067 |
<div class="btn_popup_wrap"> |
| 4272 | 3068 |
<button type="button" data-tooltip="popup05" class="btnType btnType7 tab2" onclick="getMjMsgSentListAll('1');">재전송</button>
|
| 4273 | 3069 |
</div> |
| 4274 |
- <!-- <div class="btn_popup_wrap check_validity_wrap"> |
|
| 4275 |
- <button type="button" class="btnType btnType7 check_validity">오류 검사 <i class="qmMark"></i></button> |
|
| 4276 |
- <div class="error_hover_cont send_hover_cont"> |
|
| 4277 |
- <p>휴대폰 번호 입력 시 해당 휴대폰 번호에 대한 형식이 어긋나거나 휴대폰 번호에 오류가 있는지 등을 검사하는 기능</p> |
|
| 4278 |
- <span>(예시) 010-1234-0001(O) / 010-12345-0001(X)</span> |
|
| 4279 |
- </div> |
|
| 4280 |
- </div> --> |
|
| 4281 | 3070 |
</div> |
| 4282 | 3071 |
</div> |
| 4283 | 3072 |
<div class="list_bottom"> |
... | ... | @@ -4287,7 +3076,6 @@ |
| 4287 | 3076 |
</div> |
| 4288 | 3077 |
<div class="list_bottom_right"> |
| 4289 | 3078 |
<p>총 <span class="c_e40000" id="rowTotCnt">0</span>건 / 중복 <span class="c_002c9a" id="rowDupCnt">0</span>건</p> |
| 4290 |
- <%--<button type="button" class="address_reg2 registAddr">주소록에 등록</button>--%> |
|
| 4291 | 3079 |
<button type="button" class="address_reg2 addressregi_btn">주소록에 등록</button> |
| 4292 | 3080 |
</div> |
| 4293 | 3081 |
</div> |
... | ... | @@ -4314,16 +3102,6 @@ |
| 4314 | 3102 |
<div> |
| 4315 | 3103 |
<input type="radio" id="radio_bill_1" name="radio_bill" checked="checked"> |
| 4316 | 3104 |
<label for="radio_bill_1">보유잔액</label> |
| 4317 |
- <%-- <label for="radio_bill_1">내 충전금 (<span id="spUserMoney"> |
|
| 4318 |
- <c:choose> |
|
| 4319 |
- <c:when test="${not empty userMoney}">
|
|
| 4320 |
- <c:out value="${commaPrice}"/>
|
|
| 4321 |
- </c:when> |
|
| 4322 |
- <c:otherwise> |
|
| 4323 |
- 0 |
|
| 4324 |
- </c:otherwise> |
|
| 4325 |
- </c:choose> |
|
| 4326 |
- </span>원)</label> --%> |
|
| 4327 | 3105 |
<label for="userMoney" class="label">보유잔액</label> |
| 4328 | 3106 |
<input type="text" id="userMoney" name="userMoney" value="<c:out value='${commaPrice}'/>" readonly>
|
| 4329 | 3107 |
<span class="won">원</span> |
... | ... | @@ -4333,8 +3111,7 @@ |
| 4333 | 3111 |
<div><button type="button" data-tooltip="popup07" class="btnType btnType3 btn_event_cash">이벤트 잔액</button></div> |
| 4334 | 3112 |
</c:if> |
| 4335 | 3113 |
</div> |
| 4336 |
- |
|
| 4337 |
- <!--발송금액 아래 등급별 가격안내 추가--> |
|
| 3114 |
+ |
|
| 4338 | 3115 |
<div class="my_price_wrap" id="myPriceWrap" style="display: none;"> |
| 4339 | 3116 |
<div class="center-line"></div> |
| 4340 | 3117 |
<ul> |
... | ... | @@ -4357,26 +3134,10 @@ |
| 4357 | 3134 |
(2장 : <fmt:formatNumber value="${picture2Price}" pattern="###.#" />원 / 3장 : <fmt:formatNumber value="${picture3Price}" pattern="###.#" />원)
|
| 4358 | 3135 |
</li> |
| 4359 | 3136 |
</ul> |
| 4360 |
- </div> |
|
| 4361 |
- <!-- End --> |
|
| 4362 |
- |
|
| 3137 |
+ </div> |
|
| 4363 | 3138 |
</div> |
| 4364 | 3139 |
</th> |
| 4365 | 3140 |
</tr> |
| 4366 |
- <%-- <tr> |
|
| 4367 |
- <th scope="row">추천인 ID</th> |
|
| 4368 |
- <td class="check_num"> |
|
| 4369 |
- <input id="radio5" type="radio"name="recom" checked="checked"> |
|
| 4370 |
- <label for="radio5">없음</label> |
|
| 4371 |
- <input id="radio6" type="radio" name="recom"> |
|
| 4372 |
- <label for="radio6">있음</label> |
|
| 4373 |
- <div> |
|
| 4374 |
- <label for="recommId" class="label"></label> |
|
| 4375 |
- <input type="text" size="20" id="recommId" name="recommId" value="" placeholder="추천인 아이디 입력" onfocus="this.placeholder=''" onblur="this.placeholder='추천인 아이디 입력'"> |
|
| 4376 |
- <button type="button" class="btnType btnType9" id="recommBtn">추천인 확인</button> |
|
| 4377 |
- </div> |
|
| 4378 |
- </td> |
|
| 4379 |
- </tr> --%> |
|
| 4380 | 3141 |
</tbody> |
| 4381 | 3142 |
</table> |
| 4382 | 3143 |
</div> |
... | ... | @@ -4406,7 +3167,6 @@ |
| 4406 | 3167 |
<button type="button" class="fontMinus"><img src="/publish/images/content/font_minus.png"></button> |
| 4407 | 3168 |
</div> |
| 4408 | 3169 |
</div> |
| 4409 |
- <!-- 텍스트 미리보기 --> |
|
| 4410 | 3170 |
<div class="text_preview"> |
| 4411 | 3171 |
<div class="preiew_img preViewShort"></div> |
| 4412 | 3172 |
<div class="preview_auto"> |
... | ... | @@ -4424,7 +3184,6 @@ |
| 4424 | 3184 |
</c:choose> |
| 4425 | 3185 |
</div> |
| 4426 | 3186 |
</div> |
| 4427 |
- <!-- //텍스트 미리보기 --> |
|
| 4428 | 3187 |
</div> |
| 4429 | 3188 |
</div> |
| 4430 | 3189 |
<p class="addText">※ 단말기 설정에 따라 다르게 보일 수 있습니다</p> |
... | ... | @@ -4508,7 +3267,6 @@ |
| 4508 | 3267 |
</div> |
| 4509 | 3268 |
</div> |
| 4510 | 3269 |
</div> |
| 4511 |
- <!-- </div> --><!--// tab content1 --> |
|
| 4512 | 3270 |
</form> |
| 4513 | 3271 |
<form id="latestMsgForm" name="latestMsgForm" method="post"> |
| 4514 | 3272 |
<input type="hidden" id="userId" name="userId" value="${LoginVO.id}"/>
|
... | ... | @@ -4531,3 +3289,4 @@ |
| 4531 | 3289 |
<input type="hidden" name="smsTxt" value=""/> |
| 4532 | 3290 |
</form> |
| 4533 | 3291 |
|
| 3292 |
+<%@ include file="include/authNumberPopup.jspf"%> |
--- src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/MsgDataView.jsp
... | ... | @@ -6,6 +6,13 @@ |
| 6 | 6 |
|
| 7 | 7 |
<!-- <script src="/publish/js/content.js"></script> --> |
| 8 | 8 |
|
| 9 |
+<style type="text/css"> |
|
| 10 |
+/* pop_msg_spam의 is-notice가 있는지 여부에 따라 분기처리 |
|
| 11 |
+ is-notice가 없으면 spam_notice_area, spam_result_btn 숨김처리 */ |
|
| 12 |
+.pop_msg_spam:not(.is-notice) .spam_notice_area, |
|
| 13 |
+.pop_msg_spam:not(.is-notice) .spam_result_btn { display: none; }
|
|
| 14 |
+</style> |
|
| 15 |
+ |
|
| 9 | 16 |
<script type="text/javascript"> |
| 10 | 17 |
|
| 11 | 18 |
var loginVO = '${loginVO}';
|
... | ... | @@ -58,7 +65,7 @@ |
| 58 | 65 |
</script> |
| 59 | 66 |
|
| 60 | 67 |
|
| 61 |
-<script type="text/javascript" src="<c:url value='/js/web/msgdata/msgDataView.js?date=20241218'/>"></script> |
|
| 68 |
+<script type="text/javascript" src="<c:url value='/js/web/msgdata/msgDataView.js?date=20260820'/>"></script> |
|
| 62 | 69 |
<script type="text/javascript" src="<c:url value='/js/web/msgdata/init.js?date=20241218'/>"></script> |
| 63 | 70 |
|
| 64 | 71 |
|
... | ... | @@ -83,7 +90,7 @@ |
| 83 | 90 |
<button type="button" class="tooltip-close" onclick="msgSuccessClose(this);"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
| 84 | 91 |
</div> |
| 85 | 92 |
<div class="layer_in"> |
| 86 |
- <div class="msg_text">발송 성공 : <strong>1</strong> 건,수신거부 : <span>0</span>건의<br>문자가 발송 되었습니다.</div> |
|
| 93 |
+ <div class="msg_text">발송 성공: <strong>1</strong> 건, 수신거부: <span>0</span>건의<br>문자가 발송 되었습니다.</div> |
|
| 87 | 94 |
</div> |
| 88 | 95 |
<div class="popup_btn"> |
| 89 | 96 |
<button type="button" onclick="msgResultLink(); return false;">문자 발송결과 바로가기</button> |
... | ... | @@ -108,16 +115,23 @@ |
| 108 | 115 |
</div> |
| 109 | 116 |
<div class="tooltip-wrap"> |
| 110 | 117 |
<!-- 문자발송 스팸 이용정지 레이어팝업 --> |
| 111 |
- <div class="popup-com pop_msg_spam"> |
|
| 118 |
+ <div class="popup-com pop_msg_spam" style="width:540px;"> |
|
| 112 | 119 |
<div class="popup_heading"> |
| 113 | 120 |
<p>문자 전송 결과</p> |
| 114 | 121 |
<button type="button" class="tooltip-close" onclick="msgSpamClose(this);"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
| 115 | 122 |
</div> |
| 116 |
- <div class="layer_in"> |
|
| 123 |
+ <div class="layer_in" style="padding:50px 30px;"> |
|
| 117 | 124 |
<div class="msg_text"></div> |
| 118 |
- </div> |
|
| 119 |
- <div class="popup_btn"> |
|
| 120 |
- <button type="button" class="tooltip-close" onclick="msgSpamClose(this);">확인</button> |
|
| 125 |
+ <div class="spam_notice_area"> |
|
| 126 |
+ <p class="lightred_box fill" style="margin:30px 0 0 0;"> |
|
| 127 |
+ 문자 내용에 <span class="fwBold c_e40000">금칙어 또는 링크</span>가 탐지되어 발송이 <span class="fwBold c_e40000">보류</span>되었습니다. <br> |
|
| 128 |
+ <span class="desc_text">검토를 거친 이후, 정상적인 문자는 그대로 발송됩니다.</span> |
|
| 129 |
+ </p> |
|
| 130 |
+ </div> |
|
| 131 |
+ <div class="popup_btn" style="margin:30px 0 0 0;"> |
|
| 132 |
+ <button type="button" class="btnType btnType2 tooltip-close spam_result_btn" onclick="msgResultLink(); return false;">문자 발송결과 바로가기</button> |
|
| 133 |
+ <button type="button" class="btnType fill_gray tooltip-close" onclick="msgSpamClose(this);">확인</button> |
|
| 134 |
+ </div> |
|
| 121 | 135 |
</div> |
| 122 | 136 |
</div> |
| 123 | 137 |
</div> |
+++ src/main/webapp/WEB-INF/jsp/web/msgdata/include/authNumberPopup.jspf
... | ... | @@ -0,0 +1,414 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | + | |
| 3 | +<script> | |
| 4 | + var authState = window.msgSenderAuthState || { | |
| 5 | + type: null, | |
| 6 | + phone: null, | |
| 7 | + email: null, | |
| 8 | + continuation: null, | |
| 9 | + checking: false, | |
| 10 | + sending: false, | |
| 11 | + preserveContinuation: false | |
| 12 | + }; | |
| 13 | + window.msgSenderAuthState = authState; | |
| 14 | + | |
| 15 | + var limitTimers = window.msgSenderAuthTimers || {}; | |
| 16 | + window.msgSenderAuthTimers = limitTimers; | |
| 17 | + | |
| 18 | + $(function () { | |
| 19 | + $(".auth_popup_open").off("click.senderAuth").on("click.senderAuth", function () { | |
| 20 | + openSelectedSenderAuthPopup(); | |
| 21 | + }); | |
| 22 | + | |
| 23 | + $("#callFromList").off("change.senderAuth").on("change.senderAuth", function () { | |
| 24 | + authState.continuation = null; | |
| 25 | + refreshSenderAuthStatus(); | |
| 26 | + }); | |
| 27 | + | |
| 28 | + $(".required_auth_btn").off("click.senderAuth").on("click.senderAuth", function () { | |
| 29 | + closeAuthPopup(".required_auth_popup"); | |
| 30 | + openSelectedSenderAuthPopup(); | |
| 31 | + }); | |
| 32 | + | |
| 33 | + $(".required_auth_popup .tooltip-close, .auth_number_popup .tooltip-close") | |
| 34 | + .off("click.senderAuth").on("click.senderAuth", function () { | |
| 35 | + if (!authState.preserveContinuation) authState.continuation = null; | |
| 36 | + }); | |
| 37 | + | |
| 38 | + $(".auth_number_send").off("click.senderAuth").on("click.senderAuth", function () { | |
| 39 | + sendAuthNumber($(this)); | |
| 40 | + }); | |
| 41 | + | |
| 42 | + $(".auth_submit").off("click.senderAuth").on("click.senderAuth", function () { | |
| 43 | + verifyAuthNumber(); | |
| 44 | + }); | |
| 45 | + | |
| 46 | + refreshSenderAuthStatus(); | |
| 47 | + }); | |
| 48 | + | |
| 49 | + function getSelectedSenderPhone() { | |
| 50 | + return $.trim($("#callFromList").val() || "").replace(/[^0-9]/g, ""); | |
| 51 | + } | |
| 52 | + | |
| 53 | + function senderAuthAjax(url, data, onSuccess, onComplete) { | |
| 54 | + $.ajax({ | |
| 55 | + type: "POST", | |
| 56 | + url: url, | |
| 57 | + data: JSON.stringify(data), | |
| 58 | + contentType: "application/json; charset=UTF-8", | |
| 59 | + dataType: "json", | |
| 60 | + success: function (response) { | |
| 61 | + if (!response || response.success !== true) { | |
| 62 | + alert(response && response.message ? response.message : "발신번호 인증 처리에 실패했습니다."); | |
| 63 | + return; | |
| 64 | + } | |
| 65 | + onSuccess(response.data, response.message); | |
| 66 | + }, | |
| 67 | + error: function () { | |
| 68 | + alert("발신번호 인증 처리 중 오류가 발생했습니다."); | |
| 69 | + }, | |
| 70 | + complete: function () { | |
| 71 | + if (onComplete) onComplete(); | |
| 72 | + } | |
| 73 | + }); | |
| 74 | + } | |
| 75 | + | |
| 76 | + function ensureSenderAuthenticated(continuation) { | |
| 77 | + const phone = getSelectedSenderPhone(); | |
| 78 | + if (!phone) { | |
| 79 | + alert("발신번호를 확인해주세요."); | |
| 80 | + return; | |
| 81 | + } | |
| 82 | + if (authState.checking) return; | |
| 83 | + | |
| 84 | + authState.checking = true; | |
| 85 | + senderAuthAjax("/web/mjon/msgdata/sender-auth/status.do", {callFrom: phone}, function (data) { | |
| 86 | + updateSenderAuthBadge(data.verified); | |
| 87 | + if (data.verified) { | |
| 88 | + continuation(); | |
| 89 | + return; | |
| 90 | + } | |
| 91 | + authState.continuation = continuation; | |
| 92 | + openTooltip("required_auth_popup"); | |
| 93 | + }, function () { | |
| 94 | + authState.checking = false; | |
| 95 | + }); | |
| 96 | + } | |
| 97 | + | |
| 98 | + function refreshSenderAuthStatus() { | |
| 99 | + const phone = getSelectedSenderPhone(); | |
| 100 | + if (!phone) { | |
| 101 | + updateSenderAuthBadge(false); | |
| 102 | + return; | |
| 103 | + } | |
| 104 | + senderAuthAjax("/web/mjon/msgdata/sender-auth/status.do", {callFrom: phone}, function (data) { | |
| 105 | + updateSenderAuthBadge(data.verified); | |
| 106 | + }); | |
| 107 | + } | |
| 108 | + | |
| 109 | + function updateSenderAuthBadge(verified) { | |
| 110 | + $(".sender_auth_verified").toggle(verified === true); | |
| 111 | + $(".sender_auth_required").toggle(verified !== true); | |
| 112 | + } | |
| 113 | + | |
| 114 | + function openSelectedSenderAuthPopup() { | |
| 115 | + const phone = getSelectedSenderPhone(); | |
| 116 | + if (!phone) { | |
| 117 | + alert("발신번호를 확인해주세요."); | |
| 118 | + return; | |
| 119 | + } | |
| 120 | + senderAuthAjax("/web/mjon/msgdata/sender-auth/status.do", {callFrom: phone}, function (data) { | |
| 121 | + updateSenderAuthBadge(data.verified); | |
| 122 | + if (data.verified) { | |
| 123 | + alert("이미 인증이 완료된 발신번호입니다."); | |
| 124 | + if (authState.continuation) { | |
| 125 | + const continuation = authState.continuation; | |
| 126 | + authState.continuation = null; | |
| 127 | + continuation(); | |
| 128 | + } | |
| 129 | + return; | |
| 130 | + } | |
| 131 | + openAuthPopup(data.channel, phone, data.maskedDestination); | |
| 132 | + }); | |
| 133 | + } | |
| 134 | + | |
| 135 | + function closeAuthPopup(selector) { | |
| 136 | + authState.preserveContinuation = true; | |
| 137 | + $(selector + " .tooltip-close").first().trigger("click"); | |
| 138 | + authState.preserveContinuation = false; | |
| 139 | + } | |
| 140 | + | |
| 141 | + function openAuthPopup(type, phone, email) { | |
| 142 | + const popupElement = $(".auth_number_popup"); | |
| 143 | + | |
| 144 | + resetAuthPopup(); | |
| 145 | + | |
| 146 | + authState.type = type; | |
| 147 | + authState.phone = phone; | |
| 148 | + authState.email = email || ""; | |
| 149 | + | |
| 150 | + popupElement.find(".auth_phone").val(phone); | |
| 151 | + if (type === "email") { | |
| 152 | + popupElement.find(".auth_title").html( | |
| 153 | + '문자 발송을 위해 <span class="c_002c9a fwBold">발신번호 인증</span>이 필요합니다.' + | |
| 154 | + '<br><span class="c_002c9a fwBold">회원가입 담당자 이메일</span>로 전송된 인증번호를 입력해 주세요.' | |
| 155 | + ); | |
| 156 | + popupElement.find(".auth_email_row").show(); | |
| 157 | + popupElement.find(".auth_email").val(email || ""); | |
| 158 | + popupElement.find(".desc_text").text("인증번호 전송을 눌러 담당자 이메일로 인증번호를 받아주세요."); | |
| 159 | + popupElement.find(".auth_notice").text("Daum 메일은 정상 인증이 어려울 수 있습니다. 회원정보에서 이메일을 변경하여 시도해 주세요."); | |
| 160 | + } else { | |
| 161 | + popupElement.find(".auth_title").html('문자 발송을 위해 <span class="c_002c9a fwBold">발신번호 인증</span>이 필요합니다.' + '<br>발신번호로 전송된 인증번호를 입력해주세요.'); | |
| 162 | + popupElement.find(".auth_email_row").hide(); | |
| 163 | + popupElement.find(".auth_email").val(""); | |
| 164 | + popupElement.find(".desc_text").text("인증번호 전송을 눌러 발신번호로 인증번호를 받아주세요."); | |
| 165 | + popupElement.find(".auth_notice").html( | |
| 166 | + "인증한 발신번호는 로그인 세션이 유지되는 동안 재인증 없이 발송할 수 있습니다." + | |
| 167 | + "<br>(발신번호 변경 시 변경된 발신번호 추가 인증 필요)" | |
| 168 | + ); | |
| 169 | + } | |
| 170 | + | |
| 171 | + openTooltip("auth_number_popup"); | |
| 172 | + } | |
| 173 | + | |
| 174 | + function sendAuthNumber(buttonElement) { | |
| 175 | + if (buttonElement.hasClass("disabled") || authState.sending) { | |
| 176 | + return; | |
| 177 | + } | |
| 178 | + | |
| 179 | + const popupElement = buttonElement.closest(".auth_number_popup"); | |
| 180 | + const descElement = popupElement.find(".desc_text"); | |
| 181 | + authState.sending = true; | |
| 182 | + buttonElement.addClass("disabled"); | |
| 183 | + | |
| 184 | + senderAuthAjax("/web/mjon/msgdata/sender-auth/code.do", {callFrom: authState.phone}, function (data, message) { | |
| 185 | + authState.type = data.channel; | |
| 186 | + authState.email = data.maskedDestination || ""; | |
| 187 | + if (data.channel === "email") popupElement.find(".auth_email").val(authState.email); | |
| 188 | + alert(message || "인증번호가 발송되었습니다."); | |
| 189 | + | |
| 190 | + startLimitTimer({ | |
| 191 | + key: "auth_resend", | |
| 192 | + seconds: data.resendAfter || 30, | |
| 193 | + onTick: function (remaining) { | |
| 194 | + if (remaining > 0) buttonElement.text("재전송 (" + remaining + ")"); | |
| 195 | + }, | |
| 196 | + onComplete: function () { | |
| 197 | + buttonElement.removeClass("disabled").text("재전송"); | |
| 198 | + } | |
| 199 | + }); | |
| 200 | + | |
| 201 | + startLimitTimer({ | |
| 202 | + key: "auth_expire", | |
| 203 | + seconds: data.expiresIn || 180, | |
| 204 | + onTick: function (remaining) { | |
| 205 | + descElement.html('<span class="c_e40000 fwBold">' + formatTime(remaining) + "</span> " + getAuthGuideText()); | |
| 206 | + }, | |
| 207 | + onComplete: function () { | |
| 208 | + descElement.html('<span class="c_e40000 fwBold">시간 초과</span> 인증번호를 다시 요청해 주세요.'); | |
| 209 | + } | |
| 210 | + }); | |
| 211 | + }, function () { | |
| 212 | + authState.sending = false; | |
| 213 | + if (!limitTimers.auth_resend) buttonElement.removeClass("disabled"); | |
| 214 | + }); | |
| 215 | + } | |
| 216 | + | |
| 217 | + function verifyAuthNumber() { | |
| 218 | + const popupElement = $(".auth_number_popup"); | |
| 219 | + const authNumber = $.trim(popupElement.find(".auth_number_input").val()); | |
| 220 | + | |
| 221 | + if (!authNumber) { | |
| 222 | + alert("인증번호를 입력해주세요."); | |
| 223 | + popupElement.find(".auth_number_input").focus(); | |
| 224 | + return; | |
| 225 | + } | |
| 226 | + | |
| 227 | + if (!/^\d{6}$/.test(authNumber)) { | |
| 228 | + alert("인증번호 숫자 6자리를 입력해주세요."); | |
| 229 | + popupElement.find(".auth_number_input").focus(); | |
| 230 | + return; | |
| 231 | + } | |
| 232 | + | |
| 233 | + if (!authState.type || !authState.phone) { | |
| 234 | + alert("인증 정보를 확인할 수 없습니다."); | |
| 235 | + return; | |
| 236 | + } | |
| 237 | + const submitButton = popupElement.find(".auth_submit"); | |
| 238 | + if (submitButton.hasClass("disabled")) return; | |
| 239 | + submitButton.addClass("disabled"); | |
| 240 | + | |
| 241 | + senderAuthAjax("/web/mjon/msgdata/sender-auth/verify.do", { | |
| 242 | + callFrom: authState.phone, | |
| 243 | + code: authNumber | |
| 244 | + }, function (data, message) { | |
| 245 | + stopLimitTimer("auth_resend"); | |
| 246 | + stopLimitTimer("auth_expire"); | |
| 247 | + updateSenderAuthBadge(true); | |
| 248 | + closeAuthPopup(".auth_number_popup"); | |
| 249 | + alert(message || "발신번호 인증이 완료되었습니다."); | |
| 250 | + | |
| 251 | + if (authState.continuation) { | |
| 252 | + const continuation = authState.continuation; | |
| 253 | + authState.continuation = null; | |
| 254 | + continuation(); | |
| 255 | + } | |
| 256 | + }, function () { | |
| 257 | + submitButton.removeClass("disabled"); | |
| 258 | + }); | |
| 259 | + } | |
| 260 | + | |
| 261 | + function getAuthGuideText() { | |
| 262 | + if (authState.type === "email") { | |
| 263 | + return "메일이 도착하지 않으면 스팸함 확인 후 재전송을 눌러 주세요."; | |
| 264 | + } | |
| 265 | + | |
| 266 | + return "인증번호가 도착하지 않으면 재전송을 눌러 주세요."; | |
| 267 | + } | |
| 268 | + | |
| 269 | + function resetAuthPopup() { | |
| 270 | + const popupElement = $(".auth_number_popup"); | |
| 271 | + | |
| 272 | + stopLimitTimer("auth_resend"); | |
| 273 | + stopLimitTimer("auth_expire"); | |
| 274 | + | |
| 275 | + authState.type = null; | |
| 276 | + authState.phone = null; | |
| 277 | + authState.email = null; | |
| 278 | + authState.sending = false; | |
| 279 | + | |
| 280 | + popupElement.find(".auth_number_input").val(""); | |
| 281 | + popupElement.find(".auth_number_send").removeClass("disabled").text("인증번호 전송"); | |
| 282 | + popupElement.find(".auth_submit").removeClass("disabled"); | |
| 283 | + popupElement.find(".auth_email").val(""); | |
| 284 | + popupElement.find(".auth_email_row").hide(); | |
| 285 | + } | |
| 286 | + | |
| 287 | + function startLimitTimer(options) { | |
| 288 | + const key = options.key; | |
| 289 | + let remaining = options.seconds; | |
| 290 | + | |
| 291 | + stopLimitTimer(key); | |
| 292 | + | |
| 293 | + if (options.onStart) { | |
| 294 | + options.onStart(remaining); | |
| 295 | + } | |
| 296 | + if (options.onTick) { | |
| 297 | + options.onTick(remaining); | |
| 298 | + } | |
| 299 | + | |
| 300 | + limitTimers[key] = setInterval(function () { | |
| 301 | + remaining--; | |
| 302 | + if (remaining <= 0) { | |
| 303 | + stopLimitTimer(key); | |
| 304 | + if (options.onTick) { | |
| 305 | + options.onTick(0); | |
| 306 | + } | |
| 307 | + if (options.onComplete) { | |
| 308 | + options.onComplete(); | |
| 309 | + } | |
| 310 | + return; | |
| 311 | + } | |
| 312 | + if (options.onTick) { | |
| 313 | + options.onTick(remaining); | |
| 314 | + } | |
| 315 | + }, 1000); | |
| 316 | + } | |
| 317 | + | |
| 318 | + function stopLimitTimer(key) { | |
| 319 | + if (limitTimers[key]) { | |
| 320 | + clearInterval(limitTimers[key]); | |
| 321 | + delete limitTimers[key]; | |
| 322 | + } | |
| 323 | + } | |
| 324 | + | |
| 325 | + function formatTime(seconds) { | |
| 326 | + const minutes = String(Math.floor(seconds / 60)).padStart(2, "0"); | |
| 327 | + const remainSeconds = String(seconds % 60).padStart(2, "0"); | |
| 328 | + | |
| 329 | + return minutes + ":" + remainSeconds; | |
| 330 | + } | |
| 331 | + | |
| 332 | + function openTooltip(name) { | |
| 333 | + $('[data-tooltip="' + name + '"]').trigger("click"); | |
| 334 | + } | |
| 335 | + | |
| 336 | +</script> | |
| 337 | + | |
| 338 | +<div class="mask"></div> | |
| 339 | +<div class="tooltip-wrap"> | |
| 340 | + <div class="popup-com auth_number_popup" tabindex="0" data-tooltip-con="auth_number_popup" data-focus="auth_number_popup" data-focus-prev="auth_number_popup-close" style="width:640px;"> | |
| 341 | + <div class="popup_heading"> | |
| 342 | + <p>발신번호 인증</p> | |
| 343 | + <button type="button" class="tooltip-close" data-focus="auth_number_popup-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 344 | + </div> | |
| 345 | + | |
| 346 | + <div class="layer_in"> | |
| 347 | + <p class="title_text auth_title"></p> | |
| 348 | + | |
| 349 | + <table class="layer_tType1"> | |
| 350 | + <colgroup> | |
| 351 | + <col style="width:155px;"> | |
| 352 | + <col style="width:auto;"> | |
| 353 | + </colgroup> | |
| 354 | + | |
| 355 | + <tbody> | |
| 356 | + <tr> | |
| 357 | + <th>인증대상 발신번호</th> | |
| 358 | + <td><input type="text" class="readonly w100 auth_phone" readonly></td> | |
| 359 | + </tr> | |
| 360 | + | |
| 361 | + <tr class="auth_email_row" style="display:none;"> | |
| 362 | + <th>인증번호 수신 이메일</th> | |
| 363 | + <td><input type="text" class="readonly w100 auth_email" readonly></td> | |
| 364 | + </tr> | |
| 365 | + | |
| 366 | + <tr> | |
| 367 | + <th>인증번호 입력</th> | |
| 368 | + <td> | |
| 369 | + <div class="form_wrap column"> | |
| 370 | + <div class="form_row"> | |
| 371 | + <input type="text" class="auth_number_input" placeholder="인증번호 입력" maxlength="6" inputmode="numeric"><button type="button" class="btnType btnType6 auth_number_send">인증번호 전송</button> | |
| 372 | + </div> | |
| 373 | + | |
| 374 | + <span class="desc_text"></span> | |
| 375 | + </div> | |
| 376 | + </td> | |
| 377 | + </tr> | |
| 378 | + </tbody> | |
| 379 | + </table> | |
| 380 | + | |
| 381 | + <p class="gray_box fill auth_notice"></p> | |
| 382 | + | |
| 383 | + <div class="btn_wrap popup"> | |
| 384 | + <button type="button" class="btnType fill_blue auth_submit">인증</button> | |
| 385 | + <button type="button" class="btnType fill_gray tooltip-close">취소</button> | |
| 386 | + </div> | |
| 387 | + </div> | |
| 388 | + </div> | |
| 389 | +</div> | |
| 390 | + | |
| 391 | +<div class="tooltip-wrap"> | |
| 392 | + <div class="popup-com required_auth_popup" tabindex="0" data-tooltip-con="required_auth_popup" data-focus="required_auth_popup" data-focus-prev="required_auth_popup-close" style="width:540px;"> | |
| 393 | + <div class="popup_heading"> | |
| 394 | + <p>발신번호 인증 필요</p> | |
| 395 | + <button type="button" class="tooltip-close" data-focus="required_auth_popup-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> | |
| 396 | + </div> | |
| 397 | + | |
| 398 | + <div class="layer_in"> | |
| 399 | + <p class="title_text"> | |
| 400 | + 선택하신 발신번호는 <span class="c_002c9a fwBold">아직 인증되지 않았습니다.</span> | |
| 401 | + <br>문자를 발송하려면 먼저 발신번호 인증이 필요합니다. | |
| 402 | + <br><span class="desc_text">[인증하기]를 누르면 인증 절차가 진행되고, 완료 후 발송하실 수 있습니다.</span> | |
| 403 | + </p> | |
| 404 | + | |
| 405 | + <div class="btn_wrap popup"> | |
| 406 | + <button type="button" class="btnType fill_blue required_auth_btn">인증하기</button> | |
| 407 | + <button type="button" class="btnType fill_gray tooltip-close">취소</button> | |
| 408 | + </div> | |
| 409 | + </div> | |
| 410 | + </div> | |
| 411 | +</div> | |
| 412 | + | |
| 413 | +<button type="button" class="auth_number_popup_open" data-tooltip="auth_number_popup" style="display:none;" aria-hidden="true"></button> | |
| 414 | +<button type="button" class="required_auth_popup_open" data-tooltip="required_auth_popup" style="display:none;" aria-hidden="true"></button> |
--- src/main/webapp/WEB-INF/jsp/web/pop/testSmsSendPop.jsp
+++ src/main/webapp/WEB-INF/jsp/web/pop/testSmsSendPop.jsp
... | ... | @@ -217,21 +217,26 @@ |
| 217 | 217 |
var resultBlockCnt = Number(data.object.resultBlockSts); |
| 218 | 218 |
|
| 219 | 219 |
|
| 220 |
- //차단한 번호 제외하고 발송건수가 1 미만인 경우는 발송이 안된 것 |
|
| 221 |
- if(resultCnt < 1) {
|
|
| 222 |
- alert("테스트 문자가 발송되지 않았습니다. \n"+ resultBlockCnt + "건의 번호가 수신거부 상태입니다.");
|
|
| 223 |
- } else if (resultCnt >= 1) {
|
|
| 224 |
- alert("테스트 문자가 발송되었습니다.");
|
|
| 225 |
- } |
|
| 226 |
- |
|
| 227 | 220 |
//내 충전금액 변경해 주기 - 헤더, 충전금액 두군데 수정 |
| 228 | 221 |
var afterCash = opener.numberWithCommas(data.object.afterCash); |
| 229 |
- |
|
| 222 |
+ |
|
| 230 | 223 |
$("#hdUserMoney",opener.document).text(afterCash); // 헤더 보유잔액 부분
|
| 231 | 224 |
$("#spUserMoney",opener.document).text(afterCash); // 문자발송 내 충전금
|
| 232 | 225 |
$("#userMoney",opener.document).text(afterCash); // 문자발송 내 충전금
|
| 233 | 226 |
$("#userMoney",opener.document).attr('placeholder', afterCash); // 문자발송 내 충전금
|
| 234 |
- |
|
| 227 |
+ |
|
| 228 |
+ //차단한 번호 제외하고 발송건수가 1 미만인 경우는 발송이 안된 것 |
|
| 229 |
+ if(resultCnt < 1) {
|
|
| 230 |
+ alert("테스트 문자가 발송되지 않았습니다. \n"+ resultBlockCnt + "건의 번호가 수신거부 상태입니다.");
|
|
| 231 |
+ } else if (resultCnt >= 1) {
|
|
| 232 |
+ //업무시간 중 스팸 키워드가 감지된 경우, 매칭된 스팸문구를 안내 |
|
| 233 |
+ if(data.object.businessHourSpam == true){
|
|
| 234 |
+ alert("테스트 문자가 접수 되었습니다.\n\n* 문자 내용에 금칙어 또는 링크가 탐지되어 발송이 보류되었습니다.\n검토를 거친 이후, 정상적인 문자는 그대로 발송됩니다.");
|
|
| 235 |
+ }else{
|
|
| 236 |
+ alert("테스트 문자가 발송되었습니다.");
|
|
| 237 |
+ } |
|
| 238 |
+ } |
|
| 239 |
+ |
|
| 235 | 240 |
window.close(); |
| 236 | 241 |
}else{
|
| 237 | 242 |
alert(data.message); |
+++ src/main/webapp/WEB-INF/jsp/web/user/include/secure/certPhone.jspf
... | ... | @@ -0,0 +1,403 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | +<script> | |
| 3 | + var certPhoneState = { | |
| 4 | + registered: [], | |
| 5 | + candidates: [], | |
| 6 | + maxCount: 3, | |
| 7 | + deleteTarget: '' | |
| 8 | + }; | |
| 9 | + | |
| 10 | + $(function() { | |
| 11 | + resetAddPopup(); | |
| 12 | + resetDeletePopup(); | |
| 13 | + loadCertPhoneData(); | |
| 14 | + | |
| 15 | + $(document).on('click', '#phonePlus', function(e) { | |
| 16 | + if (certPhoneState.registered.length >= certPhoneState.maxCount) { | |
| 17 | + e.preventDefault(); | |
| 18 | + e.stopImmediatePropagation(); | |
| 19 | + alert('인증 휴대폰번호는 최대 ' + certPhoneState.maxCount + '개까지 등록할 수 있습니다.'); | |
| 20 | + return false; | |
| 21 | + } | |
| 22 | + resetCertPhoneAuthFlow(); | |
| 23 | + resetAddPopup(); | |
| 24 | + $('#phonePlusPopupOpen').trigger('click'); | |
| 25 | + }); | |
| 26 | + | |
| 27 | + $(document).on('click', '#certPhoneAddExistingSend', function() { | |
| 28 | + sendCertPhoneCode('ADD_EXISTING', $('#certPhoneAddExistingSelect').val(), $(this), | |
| 29 | + $('#certPhoneAddExistingTimer'), $('#certPhoneAddExistingDesc')); | |
| 30 | + }); | |
| 31 | + | |
| 32 | + $(document).on('click', '#certPhoneAddNext', function() { | |
| 33 | + verifyCertPhoneCode('ADD_EXISTING', $('#certPhoneAddExistingSelect').val(), | |
| 34 | + $('#certPhoneAddExistingCode').val(), function() { | |
| 35 | + $('.auth_add_number_popup .stage01').hide(); | |
| 36 | + $('.auth_add_number_popup .stage').eq(0).removeClass('active'); | |
| 37 | + $('.auth_add_number_popup .stage').eq(1).addClass('active'); | |
| 38 | + $('.auth_add_number_popup .stage02').show(); | |
| 39 | + }); | |
| 40 | + }); | |
| 41 | + | |
| 42 | + $(document).on('click', '#certPhoneAddCandidateSend', function() { | |
| 43 | + var phoneNo = normalizeCertPhone($('#certPhoneAddCandidateSelect').val()); | |
| 44 | + if (isRegisteredCertPhone(phoneNo)) { | |
| 45 | + alert('이미 등록된 인증 휴대폰번호입니다.'); | |
| 46 | + return; | |
| 47 | + } | |
| 48 | + sendCertPhoneCode('ADD_NEW', phoneNo, $(this), | |
| 49 | + $('#certPhoneAddCandidateTimer'), $('#certPhoneAddCandidateDesc')); | |
| 50 | + }); | |
| 51 | + | |
| 52 | + $(document).on('click', '#certPhoneAddRegister', function() { | |
| 53 | + var phoneNo = normalizeCertPhone($('#certPhoneAddCandidateSelect').val()); | |
| 54 | + if (isRegisteredCertPhone(phoneNo)) { | |
| 55 | + alert('이미 등록된 인증 휴대폰번호입니다.'); | |
| 56 | + return; | |
| 57 | + } | |
| 58 | + verifyCertPhoneCode('ADD_NEW', phoneNo, $('#certPhoneAddCandidateCode').val(), function() { | |
| 59 | + $.ajax({ | |
| 60 | + type: 'POST', | |
| 61 | + url: '/cert/phone/insertCertPhone.do', | |
| 62 | + dataType: 'json', | |
| 63 | + data: { | |
| 64 | + mbtlnum: phoneNo, | |
| 65 | + certAlias: $.trim($('#certPhoneAddAlias').val()) | |
| 66 | + }, | |
| 67 | + success: function(res) { | |
| 68 | + if (!isCertPhoneSuccess(res)) { | |
| 69 | + alert(getCertPhoneMessage(res, '휴대폰번호 등록에 실패했습니다.')); | |
| 70 | + return; | |
| 71 | + } | |
| 72 | + alert('인증 휴대폰번호를 등록했습니다.'); | |
| 73 | + closeCertPhonePopup($('.auth_add_number_popup')); | |
| 74 | + refreshCertPhoneSections(); | |
| 75 | + }, | |
| 76 | + error: function() { | |
| 77 | + alert('휴대폰번호 등록 중 오류가 발생했습니다.'); | |
| 78 | + } | |
| 79 | + }); | |
| 80 | + }); | |
| 81 | + }); | |
| 82 | + | |
| 83 | + $(document).on('click', '.cert-phone-edit', function() { | |
| 84 | + var $button = $(this); | |
| 85 | + var $row = $button.closest('tr'); | |
| 86 | + var $aliasCell = $row.find('.alias'); | |
| 87 | + | |
| 88 | + if (!$row.find('.cert-phone-alias-input').length) { | |
| 89 | + var currentAlias = $aliasCell.find('.alias_text').text(); | |
| 90 | + var $input = $('<input>', { | |
| 91 | + type: 'text', | |
| 92 | + maxlength: 20, | |
| 93 | + 'class': 'input_text cert-phone-alias-input', | |
| 94 | + value: currentAlias | |
| 95 | + }); | |
| 96 | + $aliasCell.empty().append($input); | |
| 97 | + $button.text('저장'); | |
| 98 | + $input.focus(); | |
| 99 | + return; | |
| 100 | + } | |
| 101 | + | |
| 102 | + $.ajax({ | |
| 103 | + type: 'POST', | |
| 104 | + url: '/cert/phone/updateCertPhone.do', | |
| 105 | + dataType: 'json', | |
| 106 | + data: { | |
| 107 | + mbtlnum: $row.data('phone'), | |
| 108 | + certAlias: $.trim($row.find('.cert-phone-alias-input').val()) | |
| 109 | + }, | |
| 110 | + success: function(res) { | |
| 111 | + if (!isCertPhoneSuccess(res)) { | |
| 112 | + alert(getCertPhoneMessage(res, '별칭 수정에 실패했습니다.')); | |
| 113 | + return; | |
| 114 | + } | |
| 115 | + loadCertPhoneData(); | |
| 116 | + }, | |
| 117 | + error: function() { | |
| 118 | + alert('별칭 수정 중 오류가 발생했습니다.'); | |
| 119 | + } | |
| 120 | + }); | |
| 121 | + }); | |
| 122 | + | |
| 123 | + $(document).on('click', '.cert-phone-delete', function() { | |
| 124 | + certPhoneState.deleteTarget = $(this).closest('tr').data('phone'); | |
| 125 | + resetCertPhoneAuthFlow(); | |
| 126 | + resetDeletePopup(); | |
| 127 | + }); | |
| 128 | + | |
| 129 | + $(document).on('click', '#certPhoneDeleteSend', function() { | |
| 130 | + sendCertPhoneCode('DELETE_EXISTING', $('#certPhoneDeleteExistingSelect').val(), $(this), | |
| 131 | + $('#certPhoneDeleteTimer'), $('#certPhoneDeleteDesc')); | |
| 132 | + }); | |
| 133 | + | |
| 134 | + $(document).on('click', '#certPhoneDeleteConfirm', function() { | |
| 135 | + verifyCertPhoneCode('DELETE_EXISTING', $('#certPhoneDeleteExistingSelect').val(), | |
| 136 | + $('#certPhoneDeleteCode').val(), function() { | |
| 137 | + $.ajax({ | |
| 138 | + type: 'POST', | |
| 139 | + url: '/cert/phone/deleteCertPhone.do', | |
| 140 | + dataType: 'json', | |
| 141 | + data: { mbtlnum: certPhoneState.deleteTarget }, | |
| 142 | + success: function(res) { | |
| 143 | + if (!isCertPhoneSuccess(res)) { | |
| 144 | + alert(getCertPhoneMessage(res, '휴대폰번호 삭제에 실패했습니다.')); | |
| 145 | + return; | |
| 146 | + } | |
| 147 | + alert('인증 휴대폰번호를 삭제했습니다.'); | |
| 148 | + closeCertPhonePopup($('.auth_del_number_popup')); | |
| 149 | + refreshCertPhoneSections(); | |
| 150 | + }, | |
| 151 | + error: function() { | |
| 152 | + alert('휴대폰번호 삭제 중 오류가 발생했습니다.'); | |
| 153 | + } | |
| 154 | + }); | |
| 155 | + }); | |
| 156 | + }); | |
| 157 | + | |
| 158 | + $(document).on('click', '.auth_manage_popup .tooltip-close', function() { | |
| 159 | + stopCertPhoneTimers($(this).closest('.auth_manage_popup')); | |
| 160 | + resetCertPhoneAuthFlow(); | |
| 161 | + }); | |
| 162 | + }); | |
| 163 | + | |
| 164 | + function loadCertPhoneData() { | |
| 165 | + $.ajax({ | |
| 166 | + url: '/web/user/selectAuthPhoneNumber.do', | |
| 167 | + dataType: 'json', | |
| 168 | + success: function(res) { | |
| 169 | + if (!res || !res.success || !res.data) { | |
| 170 | + drawCertPhoneList([]); | |
| 171 | + return; | |
| 172 | + } | |
| 173 | + certPhoneState.registered = res.data.registered || []; | |
| 174 | + certPhoneState.candidates = res.data.candidates || []; | |
| 175 | + certPhoneState.maxCount = res.data.maxCount || 3; | |
| 176 | + $('#certPhoneMaxCount').text(certPhoneState.maxCount); | |
| 177 | + drawCertPhoneList(certPhoneState.registered); | |
| 178 | + fillCertPhoneSelects(); | |
| 179 | + }, | |
| 180 | + error: function() { | |
| 181 | + drawCertPhoneList([]); | |
| 182 | + } | |
| 183 | + }); | |
| 184 | + } | |
| 185 | + | |
| 186 | + function drawCertPhoneList(list) { | |
| 187 | + var $tbody = $('#phoneTable tbody').empty(); | |
| 188 | + if (!list || !list.length) { | |
| 189 | + $tbody.append($('<tr>').append($('<td>', { colspan: 5, text: '등록된 인증 휴대폰번호가 없습니다.' }))); | |
| 190 | + return; | |
| 191 | + } | |
| 192 | + | |
| 193 | + $.each(list, function(index, item) { | |
| 194 | + var isBasic = item.phoneType === 'BASIC'; | |
| 195 | + var phoneNo = normalizeCertPhone(item.mbtlnum); | |
| 196 | + var $row = $('<tr>').attr('data-phone', phoneNo).data('phone', phoneNo); | |
| 197 | + $row.append($('<td>', { text: formatCertPhone(phoneNo) })); | |
| 198 | + $row.append($('<td>', { text: isBasic ? '기본' : '추가' })); | |
| 199 | + $row.append($('<td>', { 'class': 'alias' }).append( | |
| 200 | + $('<span>', { 'class': 'alias_text', text: isBasic ? '대표번호' : (item.certAlias || '') }) | |
| 201 | + )); | |
| 202 | + $row.append($('<td>', { text: isBasic ? '-' : (item.frstRegistPnttm || '-') })); | |
| 203 | + | |
| 204 | + var $manage = $('<td>'); | |
| 205 | + if (isBasic) { | |
| 206 | + $manage.append($('<b>', { 'class': 'c_666 fwMd', text: '가입 휴대폰 번호' })); | |
| 207 | + } else { | |
| 208 | + var $buttons = $('<div>', { 'class': 'btn_area center' }); | |
| 209 | + $buttons.append($('<button>', { | |
| 210 | + type: 'button', | |
| 211 | + 'class': 'btn btn_blue border btn_28 cert-phone-edit', | |
| 212 | + text: '수정' | |
| 213 | + })); | |
| 214 | + $buttons.append($('<button>', { | |
| 215 | + type: 'button', | |
| 216 | + 'class': 'btn btn_lightgray fill btn_28 cert-phone-delete', | |
| 217 | + 'data-tooltip': 'auth_del_number_popup', | |
| 218 | + text: '삭제' | |
| 219 | + })); | |
| 220 | + $manage.append($buttons); | |
| 221 | + } | |
| 222 | + $row.append($manage); | |
| 223 | + $tbody.append($row); | |
| 224 | + }); | |
| 225 | + } | |
| 226 | + | |
| 227 | + function fillCertPhoneSelects() { | |
| 228 | + fillCertPhoneSelect($('#certPhoneAddExistingSelect'), certPhoneState.registered, true); | |
| 229 | + fillCertPhoneSelect($('#certPhoneDeleteExistingSelect'), certPhoneState.registered, true); | |
| 230 | + fillCertPhoneSelect($('#certPhoneAddCandidateSelect'), certPhoneState.candidates, false); | |
| 231 | + $('#certPhoneAddCandidateSend, #certPhoneAddRegister').prop('disabled', certPhoneState.candidates.length === 0); | |
| 232 | + } | |
| 233 | + | |
| 234 | + function fillCertPhoneSelect($select, list, showType) { | |
| 235 | + $select.empty(); | |
| 236 | + if (!list || !list.length) { | |
| 237 | + $select.append($('<option>', { value: '', text: '선택 가능한 번호가 없습니다.' })); | |
| 238 | + $select.prop('disabled', true); | |
| 239 | + return; | |
| 240 | + } | |
| 241 | + $.each(list, function(index, item) { | |
| 242 | + var phoneNo = normalizeCertPhone(item.mbtlnum); | |
| 243 | + var type = item.phoneType === 'BASIC' ? '기본' : '추가'; | |
| 244 | + $select.append($('<option>', { | |
| 245 | + value: phoneNo, | |
| 246 | + text: formatCertPhone(phoneNo) + (showType ? ' (' + type + ')' : '') | |
| 247 | + })); | |
| 248 | + }); | |
| 249 | + $select.prop('disabled', false); | |
| 250 | + } | |
| 251 | + | |
| 252 | + function sendCertPhoneCode(purpose, phoneNo, $button, $timer, $desc) { | |
| 253 | + if (!phoneNo || $button.prop('disabled')) { | |
| 254 | + return; | |
| 255 | + } | |
| 256 | + $.ajax({ | |
| 257 | + type: 'POST', | |
| 258 | + url: '/cert/phone/sendSysMsgDataAjax.do', | |
| 259 | + dataType: 'json', | |
| 260 | + data: { mbtlnum: phoneNo, purpose: purpose }, | |
| 261 | + success: function(res) { | |
| 262 | + if (!isCertPhoneSuccess(res)) { | |
| 263 | + alert(getCertPhoneMessage(res, '인증번호 발송에 실패했습니다.')); | |
| 264 | + return; | |
| 265 | + } | |
| 266 | + var remaining = res.object && res.object.remainingSends != null ? res.object.remainingSends : 0; | |
| 267 | + $desc.html('인증번호를 발송했습니다. 3분 이내에 입력해주세요. (남은 재발송 <b class="fwBold">' + remaining + '</b>회)'); | |
| 268 | + startCertPhoneTimer($button, $timer, $desc, remaining); | |
| 269 | + }, | |
| 270 | + error: function() { | |
| 271 | + alert('인증번호 발송 중 오류가 발생했습니다.'); | |
| 272 | + } | |
| 273 | + }); | |
| 274 | + } | |
| 275 | + | |
| 276 | + function verifyCertPhoneCode(purpose, phoneNo, checkNo, onSuccess) { | |
| 277 | + checkNo = $.trim(checkNo); | |
| 278 | + if (!phoneNo) { | |
| 279 | + alert('휴대폰번호를 선택해 주세요.'); | |
| 280 | + return; | |
| 281 | + } | |
| 282 | + if (!/^\d{6}$/.test(checkNo)) { | |
| 283 | + alert('인증번호 6자리를 입력해 주세요.'); | |
| 284 | + return; | |
| 285 | + } | |
| 286 | + $.ajax({ | |
| 287 | + type: 'POST', | |
| 288 | + url: '/cert/phone/selectSysMsgLogCheck.do', | |
| 289 | + dataType: 'json', | |
| 290 | + data: { mbtlnum: phoneNo, checkNo: checkNo, purpose: purpose }, | |
| 291 | + success: function(res) { | |
| 292 | + if (!isCertPhoneSuccess(res)) { | |
| 293 | + alert(getCertPhoneMessage(res, '인증번호가 일치하지 않습니다.')); | |
| 294 | + return; | |
| 295 | + } | |
| 296 | + onSuccess(); | |
| 297 | + }, | |
| 298 | + error: function() { | |
| 299 | + alert('인증번호 확인 중 오류가 발생했습니다.'); | |
| 300 | + } | |
| 301 | + }); | |
| 302 | + } | |
| 303 | + | |
| 304 | + function startCertPhoneTimer($button, $timer, $desc, remaining) { | |
| 305 | + clearInterval($timer.data('timer')); | |
| 306 | + var time = 180; | |
| 307 | + $timer.show().text('03:00'); | |
| 308 | + $button.prop('disabled', true).addClass('disabled'); | |
| 309 | + | |
| 310 | + var timerId = setInterval(function() { | |
| 311 | + time--; | |
| 312 | + var min = Math.floor(time / 60); | |
| 313 | + var sec = time % 60; | |
| 314 | + $timer.text((min < 10 ? '0' : '') + min + ':' + (sec < 10 ? '0' : '') + sec); | |
| 315 | + if (time <= 0) { | |
| 316 | + clearInterval(timerId); | |
| 317 | + $timer.removeData('timer').hide(); | |
| 318 | + $desc.html('입력 시간이 지났습니다. 새로운 인증번호를 받아주세요. (남은 재발송 <b class="fwBold">' + remaining + '</b>회)'); | |
| 319 | + } | |
| 320 | + }, 1000); | |
| 321 | + | |
| 322 | + $timer.data('timer', timerId); | |
| 323 | + setTimeout(function() { | |
| 324 | + if (remaining > 0) { | |
| 325 | + $button.prop('disabled', false).removeClass('disabled').text('재전송'); | |
| 326 | + } | |
| 327 | + }, 30000); | |
| 328 | + } | |
| 329 | + | |
| 330 | + function resetAddPopup() { | |
| 331 | + stopCertPhoneTimers($('.auth_add_number_popup')); | |
| 332 | + $('.auth_add_number_popup .stage').removeClass('active').eq(0).addClass('active'); | |
| 333 | + $('.auth_add_number_popup .stage01').show(); | |
| 334 | + $('.auth_add_number_popup .stage02').hide(); | |
| 335 | + $('#certPhoneAddExistingCode, #certPhoneAddCandidateCode, #certPhoneAddAlias').val(''); | |
| 336 | + $('#certPhoneAddExistingSend, #certPhoneAddCandidateSend').prop('disabled', false).removeClass('disabled').text('인증요청'); | |
| 337 | + fillCertPhoneSelects(); | |
| 338 | + } | |
| 339 | + | |
| 340 | + function resetDeletePopup() { | |
| 341 | + stopCertPhoneTimers($('.auth_del_number_popup')); | |
| 342 | + $('#certPhoneDeleteTargetText').text(formatCertPhone(certPhoneState.deleteTarget) + ' '); | |
| 343 | + $('#certPhoneDeleteCode').val(''); | |
| 344 | + $('#certPhoneDeleteSend').prop('disabled', false).removeClass('disabled').text('인증요청'); | |
| 345 | + fillCertPhoneSelect($('#certPhoneDeleteExistingSelect'), certPhoneState.registered, true); | |
| 346 | + } | |
| 347 | + | |
| 348 | + function stopCertPhoneTimers($scope) { | |
| 349 | + $scope.find('.timer').each(function() { | |
| 350 | + clearInterval($(this).data('timer')); | |
| 351 | + $(this).removeData('timer').hide(); | |
| 352 | + }); | |
| 353 | + } | |
| 354 | + | |
| 355 | + function resetCertPhoneAuthFlow() { | |
| 356 | + $.ajax({ type: 'POST', url: '/cert/phone/resetAuthFlow.do' }); | |
| 357 | + } | |
| 358 | + | |
| 359 | + function refreshCertPhoneSections() { | |
| 360 | + loadCertPhoneData(); | |
| 361 | + if (typeof selectSecondAuthMethodLog === 'function') { | |
| 362 | + selectSecondAuthMethodLog(1); | |
| 363 | + } | |
| 364 | + } | |
| 365 | + | |
| 366 | + function closeCertPhonePopup($popup) { | |
| 367 | + $popup.find('.tooltip-close').first().trigger('click'); | |
| 368 | + } | |
| 369 | + | |
| 370 | + function isCertPhoneSuccess(res) { | |
| 371 | + return res && res.status === 'OK'; | |
| 372 | + } | |
| 373 | + | |
| 374 | + function getCertPhoneMessage(res, fallback) { | |
| 375 | + if (!res) return fallback; | |
| 376 | + if (res.message) return res.message; | |
| 377 | + if (res.object && res.object.msg) return res.object.msg; | |
| 378 | + return fallback; | |
| 379 | + } | |
| 380 | + | |
| 381 | + function normalizeCertPhone(phoneNo) { | |
| 382 | + return phoneNo == null ? '' : String(phoneNo).replace(/[^0-9]/g, ''); | |
| 383 | + } | |
| 384 | + | |
| 385 | + function isRegisteredCertPhone(phoneNo) { | |
| 386 | + var normalizedPhoneNo = normalizeCertPhone(phoneNo); | |
| 387 | + if (!normalizedPhoneNo) { | |
| 388 | + return false; | |
| 389 | + } | |
| 390 | + return $.grep(certPhoneState.registered, function(item) { | |
| 391 | + return normalizeCertPhone(item.mbtlnum) === normalizedPhoneNo; | |
| 392 | + }).length > 0; | |
| 393 | + } | |
| 394 | + | |
| 395 | + function formatCertPhone(phoneNo) { | |
| 396 | + var value = normalizeCertPhone(phoneNo); | |
| 397 | + if (value.length === 11) return value.replace(/(\d{3})(\d{4})(\d{4})/, '$1-$2-$3'); | |
| 398 | + if (value.length === 10) return value.replace(/(\d{3})(\d{3})(\d{4})/, '$1-$2-$3'); | |
| 399 | + return value || '-'; | |
| 400 | + } | |
| 401 | + | |
| 402 | + | |
| 403 | +</script> |
+++ src/main/webapp/WEB-INF/jsp/web/user/include/secure/secondAuthLog.jspf
... | ... | @@ -0,0 +1,102 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | +<script> | |
| 3 | + $(function() { | |
| 4 | + selectSecondAuthLog(1); | |
| 5 | + }); | |
| 6 | + | |
| 7 | + function selectSecondAuthLog(pageIndex) { | |
| 8 | + $.ajax({ | |
| 9 | + url: '/web/log/selectSecondAuthLog.do', | |
| 10 | + data: { | |
| 11 | + pageIndex: pageIndex | |
| 12 | + }, | |
| 13 | + success: function(res) { | |
| 14 | + if (!res || !res.success || !res.data) { | |
| 15 | + drawSecondAuthLogList([]); | |
| 16 | + $('#secondAuthPagination').empty(); | |
| 17 | + return; | |
| 18 | + } | |
| 19 | + drawSecondAuthLogList(res.data.list); | |
| 20 | + drawPagination(res.data, $('#secondAuthPagination'), selectSecondAuthLog); | |
| 21 | + }, | |
| 22 | + error: function() { | |
| 23 | + drawSecondAuthLogList([]); | |
| 24 | + $('#secondAuthPagination').empty(); | |
| 25 | + } | |
| 26 | + }); | |
| 27 | + } | |
| 28 | + | |
| 29 | + function drawSecondAuthLogList(resultList) { | |
| 30 | + var html = ''; | |
| 31 | + | |
| 32 | + if (!resultList || resultList.length === 0) { | |
| 33 | + html = '<tr><td colspan="5">조회된 로그인 내역이 없습니다.</td></tr>'; | |
| 34 | + } else { | |
| 35 | + $.each(resultList, (index, result) => html += drawSecondAuthLogListItem(index, result)); | |
| 36 | + } | |
| 37 | + | |
| 38 | + $('#secondAuthLogBody').html(html); | |
| 39 | + } | |
| 40 | + function drawSecondAuthLogListItem(index, result) { | |
| 41 | + let loginResult = result.loginResult === '성공' | |
| 42 | + ? escapeHtml(result.loginResult) | |
| 43 | + : '<b class="fwMd c_e40000">' + escapeHtml(result.loginResult + (result.reason ? ' (' + result.reason + ')' : '')) + '</b>'; | |
| 44 | + | |
| 45 | + var html = ''; | |
| 46 | + html += '<tr>'; | |
| 47 | + html += '<td>' + escapeHtml(result.frstRegistPnttm) + '</td>'; | |
| 48 | + html += '<td>' + escapeHtml(result.accessIp) + '</td>'; | |
| 49 | + html += '<td>' + getLoginEnvironment(result.userAgent) + '</td>'; | |
| 50 | + html += '<td>' + escapeHtml(result.receive) + '</td>'; | |
| 51 | + html += '<td>' + loginResult + '</td>'; | |
| 52 | + html += '</tr>'; | |
| 53 | + | |
| 54 | + return html; | |
| 55 | + } | |
| 56 | + | |
| 57 | + function getLoginEnvironment(userAgent) { | |
| 58 | + if (!userAgent) { | |
| 59 | + return '-'; | |
| 60 | + } | |
| 61 | + | |
| 62 | + return /Android|iPhone|iPad|iPod|Mobile/i.test(userAgent) ? '모바일' : 'PC'; | |
| 63 | + } | |
| 64 | + | |
| 65 | + function escapeHtml(value) { | |
| 66 | + if (value === null || value === undefined) { | |
| 67 | + return '-'; | |
| 68 | + } | |
| 69 | + | |
| 70 | + return $('<div>').text(value).html(); | |
| 71 | + } | |
| 72 | + | |
| 73 | +</script> | |
| 74 | + | |
| 75 | +<div class="title_area"> | |
| 76 | + <p class="dashboard_title">로그인 내역 <span class="small_text">로그인 내역은 최대 3개월까지만 보관됩니다.</span></p> | |
| 77 | +</div> | |
| 78 | + | |
| 79 | +<div class="table_wrap"> | |
| 80 | + <table> | |
| 81 | + <colgroup> | |
| 82 | + <col style="width:auto;"> | |
| 83 | + <col style="width:auto;"> | |
| 84 | + <col style="width:10%;"> | |
| 85 | + <col style="width:18%;"> | |
| 86 | + <col style="width:18%;"> | |
| 87 | + </colgroup> | |
| 88 | + <thead> | |
| 89 | + <tr> | |
| 90 | + <th scope="col">로그인 일시</th> | |
| 91 | + <th scope="col">로그인 IP</th> | |
| 92 | + <th scope="col">환경</th> | |
| 93 | + <th scope="col">휴대폰번호</th> | |
| 94 | + <th scope="col">인증결과</th> | |
| 95 | + </tr> | |
| 96 | + </thead> | |
| 97 | + <tbody id="secondAuthLogBody"> | |
| 98 | + </tbody> | |
| 99 | + </table> | |
| 100 | +</div> | |
| 101 | + | |
| 102 | +<ul id="secondAuthPagination" class="pagination"></ul> |
+++ src/main/webapp/WEB-INF/jsp/web/user/include/secure/secondAuthMethodLog.jspf
... | ... | @@ -0,0 +1,106 @@ |
| 1 | +<%@ page pageEncoding="UTF-8" %> | |
| 2 | +<script> | |
| 3 | + $(function() { | |
| 4 | + selectSecondAuthMethodLog(1); | |
| 5 | + }); | |
| 6 | + | |
| 7 | + function selectSecondAuthMethodLog(pageIndex) { | |
| 8 | + $.ajax({ | |
| 9 | + url: '/web/user/selectAuthMethodChangeHistory.do', | |
| 10 | + data: { | |
| 11 | + pageIndex: pageIndex | |
| 12 | + }, | |
| 13 | + success: function(res) { | |
| 14 | + if (!res || !res.success || !res.data) { | |
| 15 | + drawSecondAuthMethodLogList([]); | |
| 16 | + return; | |
| 17 | + } | |
| 18 | + | |
| 19 | + drawSecondAuthMethodLogList(res.data.list); | |
| 20 | + drawPagination(res.data, $('#secondAuthMethodPagination'), selectSecondAuthMethodLog); | |
| 21 | + }, | |
| 22 | + error: function() { | |
| 23 | + drawSecondAuthMethodLogList([]); | |
| 24 | + } | |
| 25 | + }); | |
| 26 | + } | |
| 27 | + | |
| 28 | + function drawSecondAuthMethodLogList(resultList) { | |
| 29 | + var html = ''; | |
| 30 | + | |
| 31 | + if (!resultList || resultList.length === 0) { | |
| 32 | + html = '<tr><td colspan="5">인증수단 변경 이력이 없습니다.</td></tr>'; | |
| 33 | + } else { | |
| 34 | + $.each(resultList, function(index, result) { | |
| 35 | + html += '<tr>'; | |
| 36 | + html += '<td>' + escapeSecondAuthMethodHtml(result.frstRegistPnttm) + '</td>'; | |
| 37 | + html += '<td>' + getSecondAuthMethodActionName(result.actionType) + '</td>'; | |
| 38 | + html += '<td>' + escapeSecondAuthMethodHtml(result.phoneNo) + '</td>'; | |
| 39 | + html += '<td>' + getSecondAuthMethodVerifyName(result.verifyType) + '</td>'; | |
| 40 | + html += '<td>' + escapeSecondAuthMethodHtml(result.accessIp) + '</td>'; | |
| 41 | + html += '</tr>'; | |
| 42 | + }); | |
| 43 | + } | |
| 44 | + | |
| 45 | + $('#secondAuthMethodLogBody').html(html); | |
| 46 | + } | |
| 47 | + | |
| 48 | + function getSecondAuthMethodActionName(actionType) { | |
| 49 | + var names = { | |
| 50 | + REGISTER: '등록', | |
| 51 | + UPDATE: '변경', | |
| 52 | + DELETE: '삭제' | |
| 53 | + }; | |
| 54 | + return escapeSecondAuthMethodHtml(names[actionType] || actionType); | |
| 55 | + } | |
| 56 | + | |
| 57 | + function getSecondAuthMethodVerifyName(verifyType) { | |
| 58 | + var names = { | |
| 59 | + SMS: 'SMS 인증', | |
| 60 | + KMC: 'KMC 본인인증', | |
| 61 | + INFO_CHANGE: '회원정보 변경' | |
| 62 | + }; | |
| 63 | + return escapeSecondAuthMethodHtml(names[verifyType] || verifyType); | |
| 64 | + } | |
| 65 | + | |
| 66 | + function escapeSecondAuthMethodHtml(value) { | |
| 67 | + if (value === null || value === undefined || value === '') { | |
| 68 | + return '-'; | |
| 69 | + } | |
| 70 | + return $('<div>').text(value).html(); | |
| 71 | + } | |
| 72 | +</script> | |
| 73 | + | |
| 74 | +<div class="title_area"> | |
| 75 | + <p class="dashboard_title">인증수단 변경 이력 | |
| 76 | + <span class="small_text">등록·변경·삭제 이력은 <b>최대 1년</b>간 보관됩니다.</span> | |
| 77 | + </p> | |
| 78 | +</div> | |
| 79 | + | |
| 80 | +<div class="table_wrap" id="secondAuthMethodLogTable"> | |
| 81 | + <table> | |
| 82 | + <colgroup> | |
| 83 | + <col style="width:auto;"> | |
| 84 | + <col style="width:10%;"> | |
| 85 | + <col style="width:auto;"> | |
| 86 | + <col style="width:15%;"> | |
| 87 | + <col style="width:15%;"> | |
| 88 | + </colgroup> | |
| 89 | + <thead> | |
| 90 | + <tr> | |
| 91 | + <th scope="col">처리일시</th> | |
| 92 | + <th scope="col">처리유형</th> | |
| 93 | + <th scope="col">휴대폰번호</th> | |
| 94 | + <th scope="col">본인확인</th> | |
| 95 | + <th scope="col">처리 IP</th> | |
| 96 | + </tr> | |
| 97 | + </thead> | |
| 98 | + <tbody id="secondAuthMethodLogBody"> | |
| 99 | + <tr> | |
| 100 | + <td colspan="5">인증수단 변경 이력을 조회하고 있습니다.</td> | |
| 101 | + </tr> | |
| 102 | + </tbody> | |
| 103 | + </table> | |
| 104 | +</div> | |
| 105 | + | |
| 106 | +<ul id="secondAuthMethodPagination" class="pagination"></ul> |
--- src/main/webapp/WEB-INF/jsp/web/user/mberSecureLogin.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/mberSecureLogin.jsp
... | ... | @@ -1,982 +1,271 @@ |
| 1 |
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
| 2 |
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
|
| 3 |
-<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> |
|
| 4 |
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> |
|
| 1 |
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> |
|
| 2 |
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
| 3 |
+<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %> |
|
| 4 |
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> |
|
| 5 | 5 |
|
| 6 | 6 |
|
| 7 | 7 |
<script language=javascript> |
| 8 | 8 |
|
| 9 |
+ function drawPagination(pagination, element, onClick) {
|
|
| 10 |
+ var html = ''; |
|
| 9 | 11 |
|
| 10 |
-//보안 로그인 |
|
| 11 |
-$(document).ready(function(){
|
|
| 12 |
- |
|
| 13 |
- // 허용 IP 등록 |
|
| 14 |
- $(".btn_allow_ip_add").click(function () {
|
|
| 15 |
- |
|
| 16 |
- var ip = $('#cennectIp').val();
|
|
| 17 |
- |
|
| 18 |
- if (confirm("현재 접속중인 IP["+ip+"]를 접속 허용 IP로 등록하시겠습니까?")) {
|
|
| 19 |
- |
|
| 20 |
- $.ajax({
|
|
| 21 |
- type: "POST", |
|
| 22 |
- url: "/cert/ip/insertCennetCertIp.do", |
|
| 23 |
- data: null, |
|
| 24 |
- dataType:'json', |
|
| 25 |
- async: false, |
|
| 26 |
- success: function (returnData) {
|
|
| 27 |
- |
|
| 28 |
- if(returnData.status == 'OK'){
|
|
| 29 |
- alert("접속 허용 IP["+ip+"] 등록이 완료되었습니다.");
|
|
| 30 |
- location.reload(); |
|
| 31 |
- } |
|
| 32 |
- else |
|
| 33 |
- {
|
|
| 34 |
- alert("오류가 발생하였습니다.");
|
|
| 35 |
- } |
|
| 36 |
- }, |
|
| 37 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 38 |
- }); |
|
| 39 |
- |
|
| 40 |
- } else {}
|
|
| 41 |
- }); |
|
| 42 |
- |
|
| 43 |
- |
|
| 44 |
- // secuLoginFlag 값에 따라 해당하는 탭에 'on' 클래스 추가 |
|
| 45 |
- if ('${mberManageVO.secuLoginFlag}' === 'Y') {
|
|
| 46 |
- $('.security_tab a').filter(function() {
|
|
| 47 |
- return $(this).text() === 'ON'; |
|
| 48 |
- }).addClass('on');
|
|
| 49 |
- $('.security_tab').addClass('on');
|
|
| 50 |
- } else {
|
|
| 51 |
- $('.security_tab a').filter(function() {
|
|
| 52 |
- return $(this).text() === 'OFF'; |
|
| 53 |
- }).addClass('on');
|
|
| 54 |
- $('.security_tab').addClass('off');
|
|
| 55 |
- } |
|
| 56 |
- // on/off 시 confirm 창 노출 |
|
| 57 |
- $('.security_tab').click(function (e) {
|
|
| 58 |
- if ($(this).find("a.on").text().trim() == "ON") {
|
|
| 59 |
- if (!confirm("가입자 휴대폰번호로 본인인증 후 해제가 가능합니다. 해제 시 계정정보 유출에 따른 피해가 발생할 수 있으므로 이를 권장하지 않습니다.")) {
|
|
| 60 |
- $(this).find("a.on").siblings("a").removeClass("on");
|
|
| 61 |
- } else {
|
|
| 62 |
- openKMCISWindow(); |
|
| 63 |
-// $(this).find("a.on").removeClass("on").siblings("a").addClass("on");
|
|
| 64 |
-// $(this).removeClass("on").addClass("off");
|
|
| 65 |
- } |
|
| 66 |
- } else if($(this).find("a.on").text().trim() == "OFF") {
|
|
| 67 |
- if (!confirm("보안로그인 설정 시 미리 등록한 IP로 접속하거나 휴대폰 SMS 추가 인증을 진행하셔야 합니다.")) {
|
|
| 68 |
- $(this).find("a.on").siblings("a").removeClass("on");
|
|
| 69 |
- |
|
| 70 |
- } else {
|
|
| 71 |
- $(this).find("a.on").removeClass("on").siblings("a").addClass("on");
|
|
| 72 |
- $(this).removeClass("off").addClass("on");
|
|
| 73 |
- callTo(); |
|
| 74 |
- } |
|
| 75 |
- } |
|
| 76 |
- |
|
| 77 |
- }); |
|
| 78 |
- |
|
| 79 |
- // 인증번호 발송 버튼 |
|
| 80 |
- $('#certReqBtn').on('click', function(){
|
|
| 81 |
- var certReqPhone = $('#certReqPhone').val();
|
|
| 82 |
- |
|
| 83 |
- if (certReqPhone==''){
|
|
| 84 |
- alert("핸드폰번호를 입력해주세요.");
|
|
| 85 |
- return; |
|
| 86 |
- } |
|
| 87 |
- |
|
| 88 |
- // 2. 휴대폰 번호 유효성 검사 |
|
| 89 |
- const phoneRegex = /^(010(\d{3}\d{4}|\d{4}\d{4})|011(\d{3}\d{4}|\d{4}\d{4}))$/;
|
|
| 90 |
- if (!phoneRegex.test(certReqPhone)) {
|
|
| 91 |
- alert("유효한 핸드폰 번호를 입력해주세요.");
|
|
| 92 |
- return; |
|
| 93 |
- } |
|
| 94 |
- |
|
| 95 |
- var params = {"mbtlnum" : certReqPhone }
|
|
| 96 |
- $.ajax({
|
|
| 97 |
- type: "POST", |
|
| 98 |
- url : "<c:url value='/cert/phone/sendSysMsgDataAjax.do' />", |
|
| 99 |
- data: params, |
|
| 100 |
- dataType:'json', |
|
| 101 |
- async: false, |
|
| 102 |
- success: function (returnData) {
|
|
| 103 |
- console.log('returnData : ', returnData);
|
|
| 104 |
- if(returnData.status == 'OK'){
|
|
| 105 |
- alert(returnData.object.msg); |
|
| 106 |
- $("#certReqPhone").prop("disabled", true);
|
|
| 107 |
- } |
|
| 108 |
- else if(returnData.status == 'CONFLICT') |
|
| 109 |
- {
|
|
| 110 |
- alert(returnData.message); |
|
| 111 |
- return false; |
|
| 112 |
- } |
|
| 113 |
- else |
|
| 114 |
- {
|
|
| 115 |
- alert("오류가 발생하였습니다.");
|
|
| 116 |
- } |
|
| 117 |
- }, |
|
| 118 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 119 |
- }); |
|
| 120 |
- }); |
|
| 121 |
- |
|
| 122 |
- // 인증 버튼 |
|
| 123 |
- $('#certConfirmBtn').on('click', function(){
|
|
| 124 |
- var certReqPhone = $('#certReqPhone').val();
|
|
| 125 |
- var certNumber = $('#certNumber').val();
|
|
| 126 |
- |
|
| 127 |
- if (certNumber==''){
|
|
| 128 |
- alert("인증번호를 입력해주세요.");
|
|
| 129 |
- return; |
|
| 130 |
- } |
|
| 131 |
- var params = {"mbtlnum" : certReqPhone, "checkNo" : certNumber }
|
|
| 132 |
- $.ajax({
|
|
| 133 |
- type: "POST", |
|
| 134 |
- url : "<c:url value='/cert/phone/selectSysMsgLogCheck.do' />", |
|
| 135 |
- data: params, |
|
| 136 |
- dataType:'json', |
|
| 137 |
- async: false, |
|
| 138 |
- success: function (returnData) {
|
|
| 139 |
- console.log('returnData : ', returnData);
|
|
| 140 |
- if(returnData.status == 'OK'){
|
|
| 141 |
-// alert(returnData.object.msg); |
|
| 142 |
- regCertPhone(params); |
|
| 143 |
- } |
|
| 144 |
- else if(returnData.status == 'BAD_REQUEST'){
|
|
| 145 |
- alert(returnData.message); |
|
| 146 |
- } |
|
| 147 |
- else |
|
| 148 |
- {
|
|
| 149 |
- alert("오류가 발생하였습니다.");
|
|
| 150 |
- } |
|
| 151 |
- }, |
|
| 152 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 153 |
- }); |
|
| 154 |
- }); |
|
| 155 |
- |
|
| 156 |
- |
|
| 157 |
- |
|
| 158 |
- $('#showLoginBtn').on('click', function() {
|
|
| 159 |
- if ($('#securityLogin').is(':visible')) {
|
|
| 160 |
- $('#securityLogin').hide();
|
|
| 161 |
- } else {
|
|
| 162 |
- $('#securityLogin').show();
|
|
| 163 |
- } |
|
| 164 |
- }); |
|
| 165 |
- |
|
| 166 |
- |
|
| 167 |
- |
|
| 168 |
- // IP 추가 버튼 클릭 시 tr 추가 |
|
| 169 |
- $(".btn_ip_plus").click(function () {
|
|
| 170 |
- |
|
| 171 |
- var chk = false; |
|
| 172 |
- |
|
| 173 |
- $.ajax({
|
|
| 174 |
- type: "POST", |
|
| 175 |
- url: "/cert/ip/selectMberCertIpList.do", |
|
| 176 |
- data: null, |
|
| 177 |
- dataType:'json', |
|
| 178 |
- async: false, |
|
| 179 |
- success: function (returnData) {
|
|
| 180 |
- console.log('returnData : ', returnData);
|
|
| 181 |
- if (returnData.status === "OK") {
|
|
| 182 |
- const objects = returnData.object; // 배열 데이터 |
|
| 183 |
- |
|
| 184 |
- // 배열의 개수 구하기 |
|
| 185 |
- const count = objects.length; |
|
| 186 |
- console.log('count :', count);
|
|
| 187 |
- if(count > 9){
|
|
| 188 |
- alert("접속 IP 등록은 10개까지 가능합니다.");
|
|
| 189 |
- chk = true; |
|
| 190 |
- return false; |
|
| 191 |
- } |
|
| 192 |
- } else {
|
|
| 193 |
- alert("데이터를 불러오는 데 실패했습니다.");
|
|
| 194 |
- } |
|
| 195 |
- }, |
|
| 196 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 197 |
- }); |
|
| 198 |
- |
|
| 199 |
- if(chk){
|
|
| 200 |
- return false; |
|
| 201 |
- } |
|
| 202 |
- |
|
| 203 |
- |
|
| 204 |
- // 추가할 HTML 구조 |
|
| 205 |
- const ipTr = ` |
|
| 206 |
- <tr class="ip-new"> |
|
| 207 |
- <td><input type="text" class="input_text" |
|
| 208 |
- oninput="this.value = this.value.replace(/[^0-9.]/g, '');" maxlength="15"/></td> |
|
| 209 |
- <td><input type="text" maxLength="25" class="input_text"></td> |
|
| 210 |
- <td>-</td> |
|
| 211 |
- <td> |
|
| 212 |
- <button type="button" class="btnType btnType5" id="ipRegBtn">등록</button> |
|
| 213 |
- </td> |
|
| 214 |
- </tr> |
|
| 215 |
- `; |
|
| 216 |
- |
|
| 217 |
- // 이미 추가된 `.ip-row`가 있는지 확인 |
|
| 218 |
- if ($("#ipTable tbody .ip-new").length === 0) {
|
|
| 219 |
- $("#ipTable tbody").prepend(ipTr); // 중복되지 않으면 추가
|
|
| 220 |
- } else {
|
|
| 221 |
- alert("이미 추가된 항목이 있습니다.");
|
|
| 222 |
- } |
|
| 223 |
- }); |
|
| 224 |
- |
|
| 225 |
- |
|
| 226 |
- // IP 등록버튼 |
|
| 227 |
- $(document).on('click', '#ipRegBtn', function () {
|
|
| 228 |
- // 현재 클릭된 버튼의 부모 tr 요소 |
|
| 229 |
- const $currentRow = $(this).closest('tr');
|
|
| 230 |
- |
|
| 231 |
- // 입력값 가져오기 |
|
| 232 |
- const ipValue = $currentRow.find('td:eq(0) input').val(); // 첫 번째 열 (IP)
|
|
| 233 |
- const memoValue = $currentRow.find('td:eq(1) input').val(); // 두 번째 열 (메모)
|
|
| 234 |
- |
|
| 235 |
- // 예외 처리 |
|
| 236 |
- if (!ipValue) {
|
|
| 237 |
- alert("등록할 IP를 입력해주세요.");
|
|
| 238 |
- $currentRow.find('td:eq(0) input').focus();
|
|
| 239 |
- return; |
|
| 240 |
- } |
|
| 241 |
- |
|
| 242 |
- |
|
| 243 |
- const ipRegex = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; |
|
| 244 |
- |
|
| 245 |
- if (!ipRegex.test(ipValue)) {
|
|
| 246 |
- alert("유효하지 않은 IP 주소입니다.");
|
|
| 247 |
- return false; |
|
| 248 |
- } |
|
| 249 |
- |
|
| 250 |
- var params = {
|
|
| 251 |
- "certIp" : ipValue |
|
| 252 |
- , "certMemo" : memoValue |
|
| 253 |
- } |
|
| 254 |
- |
|
| 255 |
- if(!confirm("IP를 등록 하시겠습니까?")){
|
|
| 256 |
- return false; |
|
| 257 |
- } |
|
| 258 |
- $.ajax({
|
|
| 259 |
- type: "POST", |
|
| 260 |
- url: "/cert/ip/insertCertIp.do", |
|
| 261 |
- data: params, |
|
| 262 |
- dataType:'json', |
|
| 263 |
- async: false, |
|
| 264 |
- success: function (returnData) {
|
|
| 265 |
- if(returnData.status == 'OK'){
|
|
| 266 |
- findAllCertIp(); |
|
| 267 |
- }else if(returnData.status == 'CONFLICT'){
|
|
| 268 |
- alert(returnData.message); |
|
| 269 |
- return false; |
|
| 270 |
- } |
|
| 271 |
- else |
|
| 272 |
- {
|
|
| 273 |
- alert("오류가 발생하였습니다.");
|
|
| 274 |
- } |
|
| 275 |
- }, |
|
| 276 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 277 |
- }); |
|
| 278 |
- }); |
|
| 279 |
- |
|
| 280 |
- |
|
| 281 |
- $(document).on('click', '.phoneModiBtn', function () {
|
|
| 282 |
- // 현재 클릭된 버튼의 tr 요소를 가져옴 |
|
| 283 |
- const $tr = $(this).closest('tr');
|
|
| 284 |
- |
|
| 285 |
- // 별칭과 메모 td 요소를 가져옴 |
|
| 286 |
- const $aliasTd = $tr.find('td').eq(1); // 두 번째 컬럼(별칭)
|
|
| 287 |
- const $memoTd = $tr.find('td').eq(2); // 세 번째 컬럼(메모)
|
|
| 288 |
- |
|
| 289 |
- // 기존 텍스트 값 저장 |
|
| 290 |
- const aliasValue = $aliasTd.text().trim(); // 별칭 값 |
|
| 291 |
- const memoValue = $memoTd.text().trim(); // 메모 값 |
|
| 292 |
- |
|
| 293 |
- console.log('aliasValue : ', aliasValue);
|
|
| 294 |
- console.log('memoValue : ', memoValue);
|
|
| 295 |
- |
|
| 296 |
- // td 내용을 input 필드로 변경 |
|
| 297 |
- $aliasTd.html('<input type="text" class="input_text" maxlength="12" value="' + aliasValue + '">');
|
|
| 298 |
- $memoTd.html('<input type="text" class="input_text" maxlength="25" value="' + memoValue + '">');
|
|
| 299 |
- |
|
| 300 |
- // aliasTd 내의 input 필드에 포커스 설정 |
|
| 301 |
- const $aliasInput = $aliasTd.find('.input_text');
|
|
| 302 |
- $aliasInput.focus().val($aliasInput.val()); // 포커스 후 커서를 맨 끝으로 이동 |
|
| 303 |
- |
|
| 304 |
- $(this).removeClass("phoneModiBtn").attr("onclick", "fn_phoneSave(this);").text("저장");
|
|
| 305 |
- }); |
|
| 306 |
- |
|
| 307 |
- $(document).on('click', '#phonePlus', function () {
|
|
| 308 |
- |
|
| 309 |
- $.ajax({
|
|
| 310 |
- type: "POST", |
|
| 311 |
- url: "/cert/phone/selectMberCertPhoneList.do", |
|
| 312 |
- data: null, |
|
| 313 |
- dataType:'json', |
|
| 314 |
- async: false, |
|
| 315 |
- success: function (returnData) {
|
|
| 316 |
- console.log('returnData : ', returnData);
|
|
| 317 |
- if (returnData.status === "OK") {
|
|
| 318 |
- const objects = returnData.object; // 배열 데이터 |
|
| 319 |
- |
|
| 320 |
- // 배열의 개수 구하기 |
|
| 321 |
- const count = objects.length; |
|
| 322 |
- console.log('count :', count);
|
|
| 323 |
- if(count < 5){
|
|
| 324 |
- $('#phonePlusPopupOpen').click()
|
|
| 325 |
- }else{
|
|
| 326 |
- alert("인증 휴대폰 번호는 5개까지 등록 가능합니다.");
|
|
| 327 |
- return false; |
|
| 328 |
- } |
|
| 329 |
- } else {
|
|
| 330 |
- alert("데이터를 불러오는 데 실패했습니다.");
|
|
| 331 |
- } |
|
| 332 |
- }, |
|
| 333 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 334 |
- }); |
|
| 335 |
- }); |
|
| 336 |
- |
|
| 337 |
- |
|
| 338 |
- |
|
| 339 |
- findAllCertIp(); |
|
| 340 |
- findAllCertPhone(); |
|
| 341 |
- |
|
| 342 |
- |
|
| 343 |
- console.log('${mberCertLoginLogVO.secuLoginFlag}');
|
|
| 344 |
- var secuLoginFlag = '${mberCertLoginLogVO.secuLoginFlag}';
|
|
| 345 |
- if(secuLoginFlag == 'Y'){
|
|
| 346 |
- $('#secuOffBtn').click();
|
|
| 347 |
- }else if(secuLoginFlag == 'N'){
|
|
| 348 |
- $('#secuOnBtn').click();
|
|
| 349 |
- |
|
| 350 |
- } |
|
| 351 |
- // 새로고침 시 값을 초기화 |
|
| 352 |
- history.replaceState({}, null, location.pathname);
|
|
| 353 |
- |
|
| 354 |
-}); |
|
| 355 |
- |
|
| 356 |
-function fn_phoneSave(obj){
|
|
| 357 |
- // 현재 클릭된 버튼의 tr 요소를 가져옴 |
|
| 358 |
- const $tr = $(obj).closest('tr'); // 'this' 대신 전달된 'obj' 사용
|
|
| 359 |
- |
|
| 360 |
- // 각 td 요소에서 데이터를 추출 |
|
| 361 |
- const mbtlnum = $tr.find('td').eq(0).text().trim(); // 첫 번째 컬럼(번호)
|
|
| 362 |
- const certAlias = $tr.find('td').eq(1).find('input').val().trim(); // 두 번째 컬럼(별칭)
|
|
| 363 |
- const certMemo = $tr.find('td').eq(2).find('input').val().trim(); // 세 번째 컬럼(메모)
|
|
| 364 |
- |
|
| 365 |
- // 콘솔 출력 |
|
| 366 |
- console.log('mbtlnum : ', mbtlnum);
|
|
| 367 |
- console.log('certAlias : ', certAlias);
|
|
| 368 |
- console.log('certMemo : ', certMemo);
|
|
| 369 |
- |
|
| 370 |
- |
|
| 371 |
- var params = {
|
|
| 372 |
- "mbtlnum" : mbtlnum |
|
| 373 |
- , "certAlias" : certAlias |
|
| 374 |
- , "certMemo" : certMemo |
|
| 375 |
- } |
|
| 376 |
- |
|
| 377 |
- $.ajax({
|
|
| 378 |
- type: "POST", |
|
| 379 |
- url: "/cert/phone/updateCertPhone.do", |
|
| 380 |
- data: params, |
|
| 381 |
- dataType:'json', |
|
| 382 |
- async: false, |
|
| 383 |
- success: function (returnData) {
|
|
| 384 |
- if(returnData.status == 'OK'){
|
|
| 385 |
- findAllCertPhone(); |
|
| 386 |
- } |
|
| 387 |
- else |
|
| 388 |
- {
|
|
| 389 |
- alert("오류가 발생하였습니다.");
|
|
| 390 |
- } |
|
| 391 |
- }, |
|
| 392 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 393 |
- }); |
|
| 394 |
- |
|
| 395 |
- |
|
| 396 |
-} |
|
| 397 |
- |
|
| 398 |
- |
|
| 399 |
-function regCertPhone(params){
|
|
| 400 |
- |
|
| 401 |
- $.ajax({
|
|
| 402 |
- type: "POST", |
|
| 403 |
- url: "/cert/phone/insertCertPhone.do", |
|
| 404 |
- data: params, |
|
| 405 |
- dataType:'json', |
|
| 406 |
- async: false, |
|
| 407 |
- success: function (returnData) {
|
|
| 408 |
- console.log('returnData : ', returnData);
|
|
| 409 |
- if(returnData.status == 'OK'){
|
|
| 410 |
- $('.tooltip-close').click()
|
|
| 411 |
- alert(returnData.message); |
|
| 412 |
- findAllCertPhone(); |
|
| 413 |
- }else if(returnData.status == 'CONFLICT'){
|
|
| 414 |
- alert(returnData.message); |
|
| 415 |
- return false; |
|
| 416 |
- } |
|
| 417 |
- else |
|
| 418 |
- {
|
|
| 419 |
- alert("오류가 발생하였습니다.");
|
|
| 420 |
- } |
|
| 421 |
- }, |
|
| 422 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 423 |
- }); |
|
| 424 |
- |
|
| 425 |
- |
|
| 426 |
-} |
|
| 427 |
- |
|
| 428 |
-function findAllCertIp(){
|
|
| 429 |
- |
|
| 430 |
- $.ajax({
|
|
| 431 |
- type: "POST", |
|
| 432 |
- url: "/cert/ip/selectMberCertIpList.do", |
|
| 433 |
- data: null, |
|
| 434 |
- dataType:'json', |
|
| 435 |
- async: false, |
|
| 436 |
- success: function (returnData) {
|
|
| 437 |
- if (returnData.status === "OK") {
|
|
| 438 |
- const objects = returnData.object; // 배열 데이터 |
|
| 439 |
- |
|
| 440 |
- // tbody의 기존 내용 삭제 |
|
| 441 |
- const $tbody = $("#ipTable tbody");
|
|
| 442 |
- $tbody.empty(); |
|
| 443 |
- if (objects.length === 0) {
|
|
| 444 |
- // 데이터가 없을 때 tr과 td 추가 |
|
| 445 |
- const $emptyRow = $("<tr></tr>").append(
|
|
| 446 |
- $("<td></td>")
|
|
| 447 |
- .attr("colspan", 4)
|
|
| 448 |
- .text("등록된 IP 주소가 없습니다.")
|
|
| 449 |
- .addClass("empty-row") // 스타일을 추가할 경우
|
|
| 450 |
- ); |
|
| 451 |
- $tbody.append($emptyRow); |
|
| 452 |
- } else {
|
|
| 453 |
- // 배열 데이터를 기반으로 tr 생성 후 tbody에 추가 |
|
| 454 |
- $.each(objects, function(index, obj) {
|
|
| 455 |
- const $tr = $("<tr></tr>"); // tr 요소 생성
|
|
| 456 |
- |
|
| 457 |
- // 각 td 요소 생성 |
|
| 458 |
- const $certIp = $("<td></td>").text(obj.certIp || "");
|
|
| 459 |
- const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
|
| 460 |
- const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
|
| 461 |
- const $deleteBtn = $("<button></button>")
|
|
| 462 |
- .addClass("btnType btn_text btn_lightgray fill btn_28")
|
|
| 463 |
- .text("삭제")
|
|
| 464 |
- .attr("type", "button")
|
|
| 465 |
- .attr("id", "ipDelBtn")
|
|
| 466 |
- .on("click", function() {
|
|
| 467 |
- deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행 |
|
| 468 |
- }); |
|
| 469 |
- |
|
| 470 |
- // 관리 버튼을 감쌀 td 생성 |
|
| 471 |
- const $deleteTd = $("<td></td>").append($deleteBtn);
|
|
| 472 |
- |
|
| 473 |
- // tr에 td 추가 |
|
| 474 |
- $tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd); |
|
| 475 |
- |
|
| 476 |
- // tbody에 tr 추가 |
|
| 477 |
- $tbody.append($tr); |
|
| 478 |
- }); |
|
| 479 |
- } |
|
| 480 |
- } else {
|
|
| 481 |
- alert("데이터를 불러오는 데 실패했습니다.");
|
|
| 482 |
- } |
|
| 483 |
- }, |
|
| 484 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 485 |
- }); |
|
| 486 |
-} |
|
| 487 |
- |
|
| 488 |
-function findAllCertPhone(){
|
|
| 489 |
- |
|
| 490 |
- $.ajax({
|
|
| 491 |
- type: "POST", |
|
| 492 |
- url: "/cert/phone/selectMberCertPhoneList.do", |
|
| 493 |
- data: null, |
|
| 494 |
- dataType:'json', |
|
| 495 |
- async: false, |
|
| 496 |
- success: function (returnData) {
|
|
| 497 |
- console.log('returnData : ', returnData);
|
|
| 498 |
- if (returnData.status === "OK") {
|
|
| 499 |
- const objects = returnData.object; // 배열 데이터 |
|
| 500 |
- |
|
| 501 |
- // tbody의 기존 내용 삭제 |
|
| 502 |
- const $tbody = $("#phoneTable tbody");
|
|
| 503 |
- $tbody.empty(); |
|
| 504 |
- |
|
| 505 |
- // 배열 데이터를 기반으로 tr 생성 후 tbody에 추가 |
|
| 506 |
- $.each(objects, function(index, obj) {
|
|
| 507 |
- const $tr = $("<tr></tr>"); // tr 요소 생성
|
|
| 508 |
- |
|
| 509 |
- // 각 td 요소 생성 |
|
| 510 |
- const $mbtlnum = $("<td></td>").text(obj.mbtlnum || "");
|
|
| 511 |
- const $certAlias = $("<td></td>").text(obj.certAlias || "-");
|
|
| 512 |
- const $certMemo = $("<td></td>").text(obj.certMemo || "-");
|
|
| 513 |
- const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
|
| 514 |
- |
|
| 515 |
- |
|
| 516 |
- const $buttonTd = $("<td></td>");
|
|
| 517 |
- |
|
| 518 |
- if (obj.frstRegistPnttm !== "-") {
|
|
| 519 |
- const $modiBtn = $("<button></button>")
|
|
| 520 |
- .addClass("btnType btnType5 btn_edit phoneModiBtn")
|
|
| 521 |
- .text("수정")
|
|
| 522 |
- .attr("type", "button")
|
|
| 523 |
- .attr("style", "margin:0 5px 0 0;");
|
|
| 524 |
- |
|
| 525 |
- |
|
| 526 |
- const $deleteBtn = $("<button></button>")
|
|
| 527 |
- .addClass("btnType btn_text btn_lightgray fill btn_28")
|
|
| 528 |
- .text("삭제")
|
|
| 529 |
- .attr("type", "button")
|
|
| 530 |
- .attr("id", "phoneDelBtn")
|
|
| 531 |
- .on("click", function() {
|
|
| 532 |
- fn_PDelRow(obj.mbtlnum); // 삭제 버튼 클릭 시 실행 |
|
| 533 |
- }); |
|
| 534 |
- $buttonTd.append($modiBtn, $deleteBtn); |
|
| 535 |
- }else{
|
|
| 536 |
- // 등록일시가 없으면 빈 td로 유지 |
|
| 537 |
- $buttonTd.text("-");
|
|
| 538 |
- } |
|
| 539 |
- // 관리 버튼을 감쌀 td 생성 |
|
| 540 |
- |
|
| 541 |
- // tr에 td 추가 |
|
| 542 |
- $tr.append($mbtlnum, $certAlias, $certMemo, $frstRegistPnttm, $buttonTd); |
|
| 543 |
- |
|
| 544 |
- // tbody에 tr 추가 |
|
| 545 |
- $tbody.append($tr); |
|
| 546 |
- }); |
|
| 547 |
- } else {
|
|
| 548 |
- alert("데이터를 불러오는 데 실패했습니다.");
|
|
| 549 |
- } |
|
| 550 |
- }, |
|
| 551 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 552 |
- }); |
|
| 553 |
-} |
|
| 554 |
- |
|
| 555 |
-function fn_PDelRow(p_mbtlnum){
|
|
| 556 |
- console.log('p_mbtlnum : ', p_mbtlnum);
|
|
| 557 |
- var params = {
|
|
| 558 |
- "mbtlnum" : p_mbtlnum |
|
| 559 |
- } |
|
| 560 |
- if(!confirm("인증 휴대폰번호를 삭제 하시겠습니까?")){
|
|
| 561 |
- return false; |
|
| 562 |
- } |
|
| 563 |
- $.ajax({
|
|
| 564 |
- type: "POST", |
|
| 565 |
- url: "/cert/phone/deleteCertPhone.do", |
|
| 566 |
- data: params, |
|
| 567 |
- dataType:'json', |
|
| 568 |
- async: false, |
|
| 569 |
- success: function (returnData) {
|
|
| 570 |
- if(returnData.status == 'OK'){
|
|
| 571 |
- findAllCertPhone(); |
|
| 572 |
- } |
|
| 573 |
- else |
|
| 574 |
- {
|
|
| 575 |
- alert("오류가 발생하였습니다.");
|
|
| 576 |
- } |
|
| 577 |
- }, |
|
| 578 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 579 |
- }); |
|
| 580 |
- |
|
| 581 |
-} |
|
| 582 |
-//IP 삭제 |
|
| 583 |
-function deleteRow(p_ip){
|
|
| 584 |
- |
|
| 585 |
- |
|
| 586 |
- var myIp = $('#cennectIp').val();
|
|
| 587 |
- console.log('p_ip : ', p_ip);
|
|
| 588 |
- |
|
| 589 |
- |
|
| 590 |
- var params = {
|
|
| 591 |
- "certIp" : p_ip |
|
| 592 |
- } |
|
| 593 |
- if(!confirm("IP를 삭제 하시겠습니까?")){
|
|
| 594 |
- return false; |
|
| 595 |
- } |
|
| 596 |
- $.ajax({
|
|
| 597 |
- type: "POST", |
|
| 598 |
- url: "/cert/ip/deleteCertIp.do", |
|
| 599 |
- data: params, |
|
| 600 |
- dataType:'json', |
|
| 601 |
- async: false, |
|
| 602 |
- success: function (returnData) {
|
|
| 603 |
- if(returnData.status == 'OK'){
|
|
| 604 |
- if(myIp == p_ip){
|
|
| 605 |
- location.reload(); |
|
| 606 |
- |
|
| 607 |
- } |
|
| 608 |
- |
|
| 609 |
- findAllCertIp(); |
|
| 610 |
- } |
|
| 611 |
- else |
|
| 612 |
- {
|
|
| 613 |
- alert("오류가 발생하였습니다.");
|
|
| 614 |
- } |
|
| 615 |
- }, |
|
| 616 |
- error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
|
| 617 |
- }); |
|
| 618 |
-} |
|
| 619 |
- |
|
| 620 |
- |
|
| 621 |
- |
|
| 622 |
- |
|
| 623 |
- |
|
| 624 |
- |
|
| 625 |
-//휴대푠 번호 등록 [시작]-------------------------------------------------------------------------------------------- |
|
| 626 |
-window.name = "kmcis_web_sample"; |
|
| 627 |
-var KMCIS_window; |
|
| 628 |
-//휴대폰 인증팝업 열기 |
|
| 629 |
- function openKMCISWindow(){
|
|
| 630 |
- //본인인증시도 로그 |
|
| 631 |
- certAccessLog(); |
|
| 632 |
- var UserAgent = navigator.userAgent; |
|
| 633 |
- /* 모바일 접근 체크*/ |
|
| 634 |
- // 모바일일 경우 (변동사항 있을경우 추가 필요) |
|
| 635 |
- if (UserAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || UserAgent.match(/LG|SAMSUNG|Samsung/) != null) {
|
|
| 636 |
- document.reqKMCISForm.target = 'KMCISWindow'; // 모바일 |
|
| 637 |
- } else { // 모바일이 아닐 경우
|
|
| 638 |
- KMCIS_window = window.open('', 'KMCISWindow', 'width=425, height=550, resizable=0, scrollbars=no, status=0, titlebar=0, toolbar=0, left=435, top=250' );
|
|
| 639 |
- |
|
| 640 |
- if(KMCIS_window == null){
|
|
| 641 |
- alert(" ※ 윈도우 XP SP2 또는 인터넷 익스플로러 7 사용자일 경우에는 \n 화면 상단에 있는 팝업 차단 알림줄을 클릭하여 팝업을 허용해 주시기 바랍니다. \n\n※ MSN,야후,구글 팝업 차단 툴바가 설치된 경우 팝업허용을 해주시기 바랍니다.");
|
|
| 642 |
- } |
|
| 643 |
- |
|
| 644 |
- document.reqKMCISForm.target = 'KMCISWindow'; |
|
| 645 |
- } |
|
| 646 |
- |
|
| 647 |
- document.reqKMCISForm.action = 'https://www.kmcert.com/kmcis/web/kmcisReq.jsp'; |
|
| 648 |
- document.reqKMCISForm.submit(); |
|
| 649 |
-} |
|
| 650 |
- |
|
| 651 |
-///web/user/selectSecurityAuthn.do 리다이렉트 URL |
|
| 652 |
- |
|
| 653 |
-//자식창에서 호출 |
|
| 654 |
-function callTo() {
|
|
| 655 |
- $.ajax({
|
|
| 656 |
- url: '/web/user/mberSecureLoginAjax.do', |
|
| 657 |
- type: 'POST', |
|
| 658 |
- /*contentType: 'application/json', |
|
| 659 |
- data: JSON.stringify({
|
|
| 660 |
- secuLoginFlag: '${mberManageVO.secuLoginFlag}'
|
|
| 661 |
- }), */ |
|
| 662 |
- success: function(response) {
|
|
| 663 |
- if(response === 'success'){
|
|
| 664 |
- alert('변경이 완료되었습니다.');
|
|
| 665 |
- location.reload(); |
|
| 666 |
- }else{
|
|
| 667 |
- alert('변경에 실패했습니다. 다시 시도해 주세요.');
|
|
| 668 |
- location.reload(); |
|
| 669 |
- } |
|
| 670 |
- |
|
| 671 |
- }, |
|
| 672 |
- error: function(error) {
|
|
| 673 |
- alert("error");
|
|
| 12 |
+ if (!pagination || pagination.totalPages === 0) {
|
|
| 13 |
+ element.empty(); |
|
| 14 |
+ return; |
|
| 674 | 15 |
} |
| 675 |
- }); |
|
| 676 |
-} |
|
| 677 | 16 |
|
| 678 |
-//자식창에서 호출 |
|
| 679 |
-function callToTwo(msg, winRef) {
|
|
| 680 |
- if (winRef) {
|
|
| 681 |
- winRef.close(); |
|
| 17 |
+ var currentPage = pagination.currentPage; |
|
| 18 |
+ var totalPages = pagination.totalPages; |
|
| 19 |
+ var pageSize = 10; |
|
| 20 |
+ var firstPage = Math.floor((currentPage - 1) / pageSize) * pageSize + 1; |
|
| 21 |
+ var lastPage = Math.min(firstPage + pageSize - 1, totalPages); |
|
| 22 |
+ |
|
| 23 |
+ html += '<li class="page_first"><button type="button" data-page="1"' + (currentPage === 1 ? ' disabled' : '') + '><img src="/publish/images/content/page_first.png" alt="첫 페이지"></button></li>'; |
|
| 24 |
+ html += '<li class="page_prev"><button type="button" data-page="' + Math.max(1, firstPage - 1) + '"' + (firstPage === 1 ? ' disabled' : '') + '><img src="/publish/images/content/page_prev.png" alt="이전 페이지"></button></li>'; |
|
| 25 |
+ |
|
| 26 |
+ for (var page = firstPage; page <= lastPage; page++) {
|
|
| 27 |
+ if (page === currentPage) {
|
|
| 28 |
+ html += '<li class="on"><button type="button" title="현재페이지">' + page + '</button></li>'; |
|
| 29 |
+ } else {
|
|
| 30 |
+ html += '<li><button type="button" data-page="' + page + '" title="' + page + '페이지">' + page + '</button></li>'; |
|
| 31 |
+ } |
|
| 32 |
+ } |
|
| 33 |
+ |
|
| 34 |
+ html += '<li class="page_next"><button type="button" data-page="' + Math.min(totalPages, lastPage + 1) + '"' + (lastPage === totalPages ? ' disabled' : '') + '><img src="/publish/images/content/page_next.png" alt="다음 페이지"></button></li>'; |
|
| 35 |
+ html += '<li class="page_last"><button type="button" data-page="' + totalPages + '"' + (currentPage === totalPages ? ' disabled' : '') + '><img src="/publish/images/content/page_last.png" alt="마지막 페이지"></button></li>'; |
|
| 36 |
+ |
|
| 37 |
+ element.html(html); |
|
| 38 |
+ |
|
| 39 |
+ element.find('button[data-page]:not(:disabled)').on('click', function () {
|
|
| 40 |
+ onClick($(this).data('page'));
|
|
| 41 |
+ }); |
|
| 682 | 42 |
} |
| 683 |
- alert(msg); |
|
| 684 |
- localtion.reload(); |
|
| 685 |
-} |
|
| 686 |
- |
|
| 687 |
- |
|
| 688 |
-function fn_phonePopClean(){
|
|
| 689 |
- console.log('ddd')
|
|
| 690 |
- $('#certReqPhone').val('');
|
|
| 691 |
- $('#certNumber').val('');
|
|
| 692 |
-} |
|
| 693 |
- |
|
| 694 |
-function linkPage(pageNo){
|
|
| 695 |
- var listForm = document.listForm ; |
|
| 696 |
- listForm.pageIndex.value = pageNo ; |
|
| 697 |
- listForm.submit(); |
|
| 698 |
-} |
|
| 699 |
- |
|
| 700 |
-//휴대푠 번호 등록 [끝]-------------------------------------------------------------------------------------------- |
|
| 701 | 43 |
|
| 702 | 44 |
</script> |
| 703 |
-<form name="reqKMCISForm" method="post" action="#"> |
|
| 704 |
- <input type="hidden" id="tr_url" name="tr_url" value = "${certVO.tr_url}">
|
|
| 705 |
- <input type="hidden" id="tr_add" name="tr_add" value = "${certVO.tr_add}">
|
|
| 706 |
- <input type="hidden" id="tr_cert" name="tr_cert" value = "${certVO.tr_cert}">
|
|
| 707 |
- <input type="hidden" name="tr_ver" value = "V2"> |
|
| 708 |
-</form> |
|
| 709 |
-<form name="listForm" action="<c:url value='/web/user/mberSecureLogin.do'/>" method="post"> |
|
| 710 |
- <input name="pageIndex" type="hidden" value="<c:out value='${mberCertLoginLogVO.pageIndex}'/>"/>
|
|
| 711 |
-</form> |
|
| 712 |
- <div class="mask"></div> |
|
| 45 |
+<div class="mask"></div> |
|
| 713 | 46 |
|
| 714 |
- <!-- 휴대폰인증 팝업 --> |
|
| 715 |
- <div class="tooltip-wrap"> |
|
| 716 |
- <div class="popup-com certify_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 500px;"> |
|
| 717 |
- <div class="popup_heading"> |
|
| 718 |
- <p>휴대폰 인증</p> |
|
| 719 |
- <button type="button" class="tooltip-close" data-focus="popup05-close" onclick="fn_phonePopClean()"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 720 |
- </div> |
|
| 721 |
- <div class="layer_in"> |
|
| 722 |
- <div class="hascont"> |
|
| 723 |
- <table class="layer_tType1"> |
|
| 724 |
- <caption>본인인증(step1) 표</caption> |
|
| 725 |
- <colgroup> |
|
| 726 |
- <col style="width: 95px"> |
|
| 727 |
- <col style="width: auto"> |
|
| 728 |
- </colgroup> |
|
| 729 |
- <tbody> |
|
| 730 |
- <tr> |
|
| 731 |
- <th>핸드폰번호</th> |
|
| 732 |
- <td> |
|
| 733 |
- <label for="" class="label">핸드폰번호 입력</label> |
|
| 734 |
- <input type="text" placeholder="‘-’없이 번호만 입력 " id="certReqPhone" onfocus="this.placeholder=''" |
|
| 735 |
- onblur="this.placeholder='‘-’없이 번호만 입력 '" class="inputLight" style="width: 200px;" |
|
| 736 |
- oninput="this.value = this.value.replace(/[^0-9]/g, '');" maxlength="14"/> |
|
| 737 |
- <button type="button" id="certReqBtn" class="btnType btnType6" style="width:90px">인증요청</button> |
|
| 738 |
- </td> |
|
| 739 |
- </tr> |
|
| 740 |
- <tr> |
|
| 741 |
- <th>인증번호</th> |
|
| 742 |
- <td> |
|
| 743 |
- <label for="" class="label">인증번호 입력</label> |
|
| 744 |
- <input type="text" placeholder="인증번호 6자리 입력" id="certNumber" maxlength="7" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 6자리 입력'" class="inputLight" style="width: 200px;"> |
|
| 745 |
- <button type="button" id="certConfirmBtn" class="btnType btnType6" style="width:90px">확인</button> |
|
| 746 |
- </td> |
|
| 747 |
- </tr> |
|
| 748 |
- </tbody> |
|
| 749 |
- </table> |
|
| 750 |
- <div class="popup_btn_wrap2"> |
|
| 751 |
- <button type="button" class="tooltip-close" data-focus="popup05-close" data-focus-next="popup05">닫기</button> |
|
| 752 |
- </div> |
|
| 753 |
- </div> |
|
| 754 |
- </div> |
|
| 755 |
- </div> |
|
| 756 |
- </div> |
|
| 757 |
- <!--// 휴대폰인증 팝업 --> |
|
| 47 |
+<div class="tooltip-wrap"> |
|
| 48 |
+ <div class="popup-com auth_manage_popup auth_add_number_popup" tabindex="0" data-tooltip-con="auth_add_number_popup" |
|
| 49 |
+ data-focus="auth_add_number_popup" data-focus-prev="auth_add_number_popup-close" style="width:550px;"> |
|
| 50 |
+ <div class="popup_heading"> |
|
| 51 |
+ <p>인증 휴대폰번호 추가</p> |
|
| 52 |
+ <button type="button" class="tooltip-close" data-focus="auth_add_number_popup-close"><img |
|
| 53 |
+ src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 54 |
+ </div> |
|
| 55 |
+ <div class="layer_in" style="padding:20px 30px 30px 30px;"> |
|
| 56 |
+ |
|
| 57 |
+ <ul class="stage_area"> |
|
| 58 |
+ <li class="stage active"><p><strong>1</strong>본인확인</p></li> |
|
| 59 |
+ <li class="stage"><p><strong>2</strong>번호 선택·인증</p></li> |
|
| 60 |
+ </ul> |
|
| 61 |
+ |
|
| 62 |
+ <div class="stage_content stage01"> |
|
| 63 |
+ <div class="gray_box fill"> |
|
| 64 |
+ 인증 휴대폰번호를 추가하려면 기존 등록된 휴대폰 번호로 본인 확인을 해야합니다. |
|
| 65 |
+ </div> |
|
| 66 |
+ |
|
| 67 |
+ |
|
| 68 |
+ <table class="layer_tType1"> |
|
| 69 |
+ <caption>본인인증(step1) 표</caption> |
|
| 70 |
+ <colgroup> |
|
| 71 |
+ <col style="width: 95px;"> |
|
| 72 |
+ <col style="width: auto;"> |
|
| 73 |
+ </colgroup> |
|
| 74 |
+ <tbody> |
|
| 75 |
+ <tr> |
|
| 76 |
+ <th>본인확인</th> |
|
| 77 |
+ <td> |
|
| 78 |
+ <div class="form_row"> |
|
| 79 |
+ <select id="certPhoneAddExistingSelect" class="select_number"></select> |
|
| 80 |
+ <button type="button" id="certPhoneAddExistingSend" class="btnType btnType6 btn_auth_send">인증요청</button> |
|
| 81 |
+ </div> |
|
| 82 |
+ </td> |
|
| 83 |
+ </tr> |
|
| 84 |
+ <tr> |
|
| 85 |
+ <th>인증번호</th> |
|
| 86 |
+ <td> |
|
| 87 |
+ <div class="form_row"> |
|
| 88 |
+ <input type="text" id="certPhoneAddExistingCode" maxlength="6" inputmode="numeric" |
|
| 89 |
+ placeholder="인증번호 6자리 입력" class="inputLight"> |
|
| 90 |
+ <div class="timer" id="certPhoneAddExistingTimer">03:00</div> |
|
| 91 |
+ </div> |
|
| 92 |
+ </td> |
|
| 93 |
+ </tr> |
|
| 94 |
+ </tbody> |
|
| 95 |
+ </table> |
|
| 96 |
+ <div class="desc_text" id="certPhoneAddExistingDesc">인증번호를 받지 못했다면 인증요청을 다시 눌러주세요. (남은 재발송 <b class="fwBold">3</b>회)</div> |
|
| 97 |
+ <div class="popup_btn_wrap2"> |
|
| 98 |
+ <button type="button" id="certPhoneAddNext" class="btnType btnType2 btn_next">다음</button> |
|
| 99 |
+ <button type="button" class="tooltip-close" data-focus="auth_add_number_popup-close" |
|
| 100 |
+ data-focus-next="auth_add_number_popup">닫기 |
|
| 101 |
+ </button> |
|
| 102 |
+ </div> |
|
| 103 |
+ </div> |
|
| 104 |
+ |
|
| 105 |
+ <div class="stage_content stage02"> |
|
| 106 |
+ <div class="gray_box fill"> |
|
| 107 |
+ 승인 완료된 발신번호 중 휴대폰번호만 선택할 수 있습니다. |
|
| 108 |
+ </div> |
|
| 109 |
+ |
|
| 110 |
+ |
|
| 111 |
+ <table class="layer_tType1"> |
|
| 112 |
+ <caption>본인인증(step1) 표</caption> |
|
| 113 |
+ <colgroup> |
|
| 114 |
+ <col style="width: 95px"> |
|
| 115 |
+ <col style="width: auto"> |
|
| 116 |
+ </colgroup> |
|
| 117 |
+ <tbody> |
|
| 118 |
+ <tr> |
|
| 119 |
+ <th>휴대폰번호</th> |
|
| 120 |
+ <td> |
|
| 121 |
+ <div class="form_row"> |
|
| 122 |
+ <select id="certPhoneAddCandidateSelect" class="select_number"></select> |
|
| 123 |
+ <button type="button" id="certPhoneAddCandidateSend" class="btnType btnType6 btn_auth_send">인증요청</button> |
|
| 124 |
+ </div> |
|
| 125 |
+ </td> |
|
| 126 |
+ </tr> |
|
| 127 |
+ <tr> |
|
| 128 |
+ <th>인증번호</th> |
|
| 129 |
+ <td> |
|
| 130 |
+ <div class="form_row"> |
|
| 131 |
+ <input type="text" id="certPhoneAddCandidateCode" maxlength="6" inputmode="numeric" |
|
| 132 |
+ placeholder="인증번호 6자리 입력" class="inputLight"> |
|
| 133 |
+ <div class="timer" id="certPhoneAddCandidateTimer">03:00</div> |
|
| 134 |
+ </div> |
|
| 135 |
+ </td> |
|
| 136 |
+ </tr> |
|
| 137 |
+ <tr> |
|
| 138 |
+ <th>별칭</th> |
|
| 139 |
+ <td> |
|
| 140 |
+ <div class="form_row"> |
|
| 141 |
+ <input type="text" id="certPhoneAddAlias" maxlength="20" |
|
| 142 |
+ placeholder="예: 업무용(선택)" class="inputLight"> |
|
| 143 |
+ </div> |
|
| 144 |
+ </td> |
|
| 145 |
+ </tr> |
|
| 146 |
+ </tbody> |
|
| 147 |
+ </table> |
|
| 148 |
+ <div class="desc_text" id="certPhoneAddCandidateDesc">유선번호·대표번호는 등록할 수 없습니다.</div> |
|
| 149 |
+ <div class="popup_btn_wrap2"> |
|
| 150 |
+ <button type="button" id="certPhoneAddRegister" class="btnType btnType2" |
|
| 151 |
+ data-focus="auth_add_number_popup-close" data-focus-next="auth_add_number_popup">등록 |
|
| 152 |
+ </button> |
|
| 153 |
+ <button type="button" class="tooltip-close" data-focus="auth_add_number_popup-close" |
|
| 154 |
+ data-focus-next="auth_add_number_popup">취소 |
|
| 155 |
+ </button> |
|
| 156 |
+ </div> |
|
| 157 |
+ </div> |
|
| 158 |
+ |
|
| 159 |
+ </div> |
|
| 160 |
+ </div> |
|
| 161 |
+</div> |
|
| 162 |
+ |
|
| 163 |
+<div class="tooltip-wrap"> |
|
| 164 |
+ <div class="popup-com auth_manage_popup auth_del_number_popup" tabindex="0" data-tooltip-con="auth_del_number_popup" |
|
| 165 |
+ data-focus="auth_del_number_popup" data-focus-prev="auth_del_number_popup-close" style="width:550px;"> |
|
| 166 |
+ <div class="popup_heading"> |
|
| 167 |
+ <p>인증 휴대폰번호 삭제</p> |
|
| 168 |
+ <button type="button" class="tooltip-close" data-focus="auth_del_number_popup-close"><img |
|
| 169 |
+ src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button> |
|
| 170 |
+ </div> |
|
| 171 |
+ <div class="layer_in" style="padding:20px 30px 30px 30px;"> |
|
| 172 |
+ <div class="gray_box fill"><span id="certPhoneDeleteTargetText"></span>을 인증수단에서 삭제합니다. 삭제 후에는 이 번호로 인증번호를 받을 수 없습니다.</div> |
|
| 173 |
+ <table class="layer_tType1"> |
|
| 174 |
+ <caption>인증 휴대폰번호 삭제 본인확인 표</caption> |
|
| 175 |
+ <colgroup><col style="width:95px"><col style="width:auto"></colgroup> |
|
| 176 |
+ <tbody> |
|
| 177 |
+ <tr> |
|
| 178 |
+ <th>본인확인</th> |
|
| 179 |
+ <td><div class="form_row"> |
|
| 180 |
+ <select id="certPhoneDeleteExistingSelect" class="select_number"></select> |
|
| 181 |
+ <button type="button" id="certPhoneDeleteSend" class="btnType btnType6 btn_auth_send">인증요청</button> |
|
| 182 |
+ </div></td> |
|
| 183 |
+ </tr> |
|
| 184 |
+ <tr> |
|
| 185 |
+ <th>인증번호</th> |
|
| 186 |
+ <td><div class="form_row"> |
|
| 187 |
+ <input type="text" id="certPhoneDeleteCode" maxlength="6" inputmode="numeric" placeholder="인증번호 6자리 입력" class="inputLight"> |
|
| 188 |
+ <div class="timer" id="certPhoneDeleteTimer">03:00</div> |
|
| 189 |
+ </div></td> |
|
| 190 |
+ </tr> |
|
| 191 |
+ </tbody> |
|
| 192 |
+ </table> |
|
| 193 |
+ <div class="desc_text" id="certPhoneDeleteDesc">인증번호를 받지 못했다면 인증요청을 다시 눌러주세요. (남은 재발송 <b class="fwBold">3</b>회)</div> |
|
| 194 |
+ <div class="popup_btn_wrap2"> |
|
| 195 |
+ <button type="button" id="certPhoneDeleteConfirm" class="btnType btnType2">삭제</button> |
|
| 196 |
+ <button type="button" class="tooltip-close" data-focus="auth_del_number_popup-close" |
|
| 197 |
+ data-focus-next="auth_del_number_popup">닫기</button> |
|
| 198 |
+ </div> |
|
| 199 |
+ </div> |
|
| 200 |
+ </div> |
|
| 201 |
+</div> |
|
| 202 |
+ |
|
| 203 |
+<%@ include file="include/secure/certPhone.jspf" %> |
|
| 758 | 204 |
|
| 759 | 205 |
<div class="inner"> |
| 760 |
- <!-- send top --> |
|
| 761 |
- <div class="send_top"> |
|
| 762 |
- <!-- tab button --> |
|
| 763 |
- <%@include file="/WEB-INF/jsp/web/user/mypageHeader.jsp"%> |
|
| 764 |
- <!--// tab button --> |
|
| 765 |
- <!-- 마이페이지 - 회원해지 --> |
|
| 766 |
- <div class="mypage_content current" id="tab5_7"> |
|
| 767 |
- <div class="heading"> |
|
| 768 |
- <h2>보안로그인</h2> |
|
| 769 |
- </div> |
|
| 770 |
- <div class="my_dashboard"> |
|
| 206 |
+ <div class="send_top"> |
|
| 207 |
+ <%@include file="/WEB-INF/jsp/web/user/mypageHeader.jsp" %> |
|
| 208 |
+ <div class="mypage_content current" id="tab5_7"> |
|
| 209 |
+ <div class="heading"> |
|
| 210 |
+ <h2>보안로그인</h2> |
|
| 211 |
+ </div> |
|
| 212 |
+ <div class="my_dashboard"> |
|
| 771 | 213 |
|
| 772 |
- <!-- 보안로그인 --> |
|
| 773 |
- <div class="security_login"> |
|
| 214 |
+ <!-- 보안로그인 --> |
|
| 215 |
+ <div class="security_login"> |
|
| 774 | 216 |
|
| 775 |
- <ul class="explanation_wrap box info"> |
|
| 776 |
- <li>· 사이트 부정로그인으로 인한 피해를 방지할 수 있는 2차 로그인 인증 서비스입니다. </li> |
|
| 777 |
- <li>· 인증 휴대폰번호 추가 등록 또는 IP 접속 허용을 통해 편리한 사용이 가능합니다.</li> |
|
| 778 |
- <li>· 보안로그인 기능을 사용할 경우 로그인 시 등록한 휴대폰번호로 추가 인증이 진행됩니다.</li> |
|
| 779 |
- </ul> |
|
| 217 |
+ <ul class="explanation_wrap box info"> |
|
| 218 |
+ <li>· 사이트 부정로그인으로 인한 피해를 방지할 수 있는 2차 로그인 인증 서비스입니다.</li> |
|
| 219 |
+ <li>· 인증 휴대폰번호는 가입 휴대폰번호와 발신번호 등록이 완료된 휴대폰번호 중에서 추가할 수 있습니다.</li> |
|
| 220 |
+ <li>· 인증 휴대폰번호 추가·삭제 시에는 이미 등록된 번호로 본인 확인을 거쳐야 합니다.</li> |
|
| 221 |
+ </ul> |
|
| 780 | 222 |
|
| 781 | 223 |
|
| 782 |
- <!-- 보안로그인 설정(허용 IP 아닌 경우) --> |
|
| 783 |
- <div class="security_set box"> |
|
| 784 |
- <div class="title_wrap"> |
|
| 785 |
- <p class="dashboard_title">보안로그인</p> |
|
| 786 |
- <div class="title_box ip_add_wrap"> |
|
| 787 |
- <span>현재 접속중인 IP : <b><c:out value="${cennectIP }"/> <c:if test="${chkcertRegIP }"> [허용 IP] </c:if> </b></span>
|
|
| 788 |
- <input type="hidden" id="cennectIp" value="<c:out value="${cennectIP }"/>"/>
|
|
| 789 |
- <c:if test="${!chkcertRegIP }">
|
|
| 790 |
- <button type="button" class="btnType btnType6 btn_allow_ip_add">허용 IP 등록</button> |
|
| 791 |
- </c:if> |
|
| 792 |
- </div> |
|
| 793 |
- </div> |
|
| 224 |
+ <div class="title_area"> |
|
| 225 |
+ <p class="dashboard_title">인증 휴대폰번호 관리 |
|
| 226 |
+ <span class="small_text">최대 <b id="certPhoneMaxCount">3</b>개까지 등록할 수 있습니다.</span> |
|
| 227 |
+ </p> |
|
| 228 |
+ <button type="button" id="phonePlus" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button> |
|
| 229 |
+ <button type="button" data-tooltip="auth_add_number_popup" id="phonePlusPopupOpen" style="display:none;"></button> |
|
| 230 |
+ </div> |
|
| 794 | 231 |
|
| 795 |
- <div class="set_area"> |
|
| 796 |
- <c:if test="${not empty certLogRegDate }">
|
|
| 797 |
- <p class="lately_date">최근 변경일시 : <span><c:out value="${certLogRegDate }"/></span></p>
|
|
| 798 |
- </c:if> |
|
| 232 |
+ <div class="table_wrap" id="phoneTable"> |
|
| 233 |
+ <table> |
|
| 234 |
+ <colgroup> |
|
| 235 |
+ <col style="width: auto;"> |
|
| 236 |
+ <col style="width: 10%;"> |
|
| 237 |
+ <col style="width: auto;"> |
|
| 238 |
+ <col style="width: 15%;"> |
|
| 239 |
+ <col style="width: 15%;"> |
|
| 240 |
+ </colgroup> |
|
| 241 |
+ <thead> |
|
| 242 |
+ <tr> |
|
| 243 |
+ <th scope="col">휴대폰번호</th> |
|
| 244 |
+ <th scope="col">구분</th> |
|
| 245 |
+ <th scope="col">별칭</th> |
|
| 246 |
+ <th scope="col">등록일시</th> |
|
| 247 |
+ <th scope="col">관리</th> |
|
| 248 |
+ </tr> |
|
| 249 |
+ </thead> |
|
| 250 |
+ <tbody> |
|
| 251 |
+ <tr> |
|
| 252 |
+ <td colspan="5">인증 휴대폰번호를 조회하고 있습니다.</td> |
|
| 253 |
+ </tr> |
|
| 254 |
+ </tbody> |
|
| 255 |
+ </table> |
|
| 256 |
+ </div> |
|
| 257 |
+ <p class="desc_text">기본 번호(가입 휴대폰번호)는 회원정보 변경 메뉴에서 본인인증 후 변경할 수 있습니다.</p> |
|
| 258 |
+ <!-- //인증 휴대폰번호 관리 --> |
|
| 799 | 259 |
|
| 800 |
- <input type="hidden" id="secuLoginFlag" value="${secuLoginFlag}" />
|
|
| 801 |
- <div class="tab_depth1 security_tab"> |
|
| 802 |
- <a href="#none" id="secuOnBtn">ON</a> |
|
| 803 |
- <a href="#none" id="secuOffBtn">OFF</a> |
|
| 804 |
- </div> |
|
| 805 |
- </div> |
|
| 806 |
- </div> |
|
| 807 |
- <!-- //보안로그인 설정(허용 IP 아닌 경우) --> |
|
| 260 |
+ <%@ include file="include/secure/secondAuthMethodLog.jspf" %> |
|
| 808 | 261 |
|
| 809 |
- <!-- 보안로그인 설정(허용 IP인 경우) --> |
|
| 810 |
-<!-- <div class="security_set box"> --> |
|
| 811 |
-<!-- <div class="title_wrap"> --> |
|
| 812 |
-<!-- <p class="dashboard_title">보안로그인</p> --> |
|
| 813 |
-<!-- <div class="title_box ip_add_wrap"> --> |
|
| 814 |
-<!-- <span>현재 접속중인 IP : <b>000.000.000.00 [허용 IP]</b></span> --> |
|
| 815 |
-<!-- </div> --> |
|
| 816 |
-<!-- </div> --> |
|
| 817 |
- |
|
| 818 |
-<!-- <div class="set_area"> --> |
|
| 819 |
-<!-- <p class="lately_date">최근 변경일시 : <span>2024-11-01 12:49</span></p> --> |
|
| 820 |
- |
|
| 821 |
-<!-- <div class="tab_depth1"> --> |
|
| 822 |
-<!-- <a href="#none" class="on">ON</a> --> |
|
| 823 |
-<!-- <a href="#none">OFF</a> --> |
|
| 824 |
-<!-- </div> --> |
|
| 825 |
-<!-- </div> --> |
|
| 826 |
-<!-- </div> --> |
|
| 827 |
- <!-- //보안로그인 설정(허용 IP인 경우) --> |
|
| 828 |
- |
|
| 829 |
- <!-- 인증 휴대폰번호 관리 --> |
|
| 830 |
- <div class="title_area"> |
|
| 831 |
- <p class="dashboard_title">인증 휴대폰번호 관리</p> |
|
| 832 |
- <p class="qmMark">?</p> |
|
| 833 |
- <div class="hover_cont" style="width:330px;left:240px;top:25px;"> |
|
| 834 |
- <p>인증에 사용할 휴대폰번호를 추가로 등록하여 관리할 수 있습니다. <br> |
|
| 835 |
- (등록 시 휴대폰 인증 필요)</p> |
|
| 836 |
- </div> |
|
| 837 |
- <button type="button" id="phonePlus" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button> |
|
| 838 |
- <input type="hidden" data-tooltip="popup05" id="phonePlusPopupOpen"/> |
|
| 839 |
- </div> |
|
| 840 |
- |
|
| 841 |
- <div class="table_wrap" id="phoneTable"> |
|
| 842 |
- <table> |
|
| 843 |
- <colgroup> |
|
| 844 |
- <col style="width: 140px;"> |
|
| 845 |
- <col style="width: auto;"> |
|
| 846 |
- <col style="width: auto;"> |
|
| 847 |
- <col style="width: 160px;"> |
|
| 848 |
- <col style="width: 140px;"> |
|
| 849 |
- </colgroup> |
|
| 850 |
- <thead> |
|
| 851 |
- <tr> |
|
| 852 |
- <th scope="col">휴대폰번호</th> |
|
| 853 |
- <th scope="col">별칭</th> |
|
| 854 |
- <th scope="col">메모</th> |
|
| 855 |
- <th scope="col">등록일시</th> |
|
| 856 |
- <th scope="col">관리</th> |
|
| 857 |
- </tr> |
|
| 858 |
- </thead> |
|
| 859 |
- <tbody> |
|
| 860 |
- <tr> |
|
| 861 |
- <td colspan="5">등록된 IP 주소가 없습니다.</td> |
|
| 862 |
- </tr> |
|
| 863 |
- <!-- <tr> |
|
| 864 |
- <td>010-0000-0000</td> |
|
| 865 |
- <td class="td_memo">메모 내용</td> |
|
| 866 |
- <td>2024-11-04 11:54</td> |
|
| 867 |
- <td> |
|
| 868 |
- <button type="button" class="btnType btnType5 btn_edit" style="margin:0 5px 0 0;" onclick="memoEdit(this);">수정 |
|
| 869 |
- </button><button type="button" class="btnType btn_text btn_lightgray fill btn_28">삭제</button> |
|
| 870 |
- </td> |
|
| 871 |
- </tr> --> |
|
| 872 |
- </tbody> |
|
| 873 |
- </table> |
|
| 874 |
- </div> |
|
| 875 |
- <!-- //인증 휴대폰번호 관리 --> |
|
| 876 |
- |
|
| 877 |
- <!-- 접속 IP관리 --> |
|
| 878 |
- <div class="title_area"> |
|
| 879 |
- <p class="dashboard_title">접속 IP 관리</p> |
|
| 880 |
- <p class="qmMark">?</p> |
|
| 881 |
- <div class="hover_cont" style="width:380px;left:160px;top:25px;"> |
|
| 882 |
- <p>접속 IP를 미리 등록할 경우 2차 로그인 인증 없이 접속이 가능합니다. <br> |
|
| 883 |
- <span>(공용 PC는 보안상의 이유로 등록을 권장하지 않습니다.)</span></p> |
|
| 884 |
- </div> |
|
| 885 |
- <button type="button" class="btn_plus btn_ip_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button> |
|
| 886 |
- </div> |
|
| 887 |
- |
|
| 888 |
- <div class="table_wrap" id="ipTable"> |
|
| 889 |
- <table> |
|
| 890 |
- <colgroup> |
|
| 891 |
- <col style="width: 26%;"> |
|
| 892 |
- <col style="width: auto;"> |
|
| 893 |
- <col style="width: 26%;"> |
|
| 894 |
- <col style="width: 100px;"> |
|
| 895 |
- </colgroup> |
|
| 896 |
- <thead> |
|
| 897 |
- <tr> |
|
| 898 |
- <th scope="col">허용IP</th> |
|
| 899 |
- <th scope="col">메모</th> |
|
| 900 |
- <th scope="col">등록일시</th> |
|
| 901 |
- <th scope="col">관리</th> |
|
| 902 |
- </tr> |
|
| 903 |
- </thead> |
|
| 904 |
- <tbody> |
|
| 905 |
- <tr> |
|
| 906 |
- <td colspan="4">등록된 IP 주소가 없습니다.</td> |
|
| 907 |
- </tr> |
|
| 908 |
-<!-- <tr> --> |
|
| 909 |
-<!-- <td>192.168.0.0</td> --> |
|
| 910 |
-<!-- <td>dadfadfjadkfjalkdjfajflajdlfjaldjflajd</td> --> |
|
| 911 |
-<!-- <td>2024-11-11 11:11</td> --> |
|
| 912 |
-<!-- <td><button type="button" class="btnType btn_text btn_lightgray fill btn_28">삭제</button></td> --> |
|
| 913 |
-<!-- </tr> --> |
|
| 914 |
- </tbody> |
|
| 915 |
- </table> |
|
| 916 |
- </div> |
|
| 917 |
- <!-- //접속 IP관리 --> |
|
| 918 |
- |
|
| 919 |
- |
|
| 920 |
- <!-- 로그인 내역 --> |
|
| 921 |
- <div class="title_area"> |
|
| 922 |
- <p class="dashboard_title">로그인 내역 <span class="small_text">로그인 내역은 최대 3개월까지만 보관됩니다.</span></p> |
|
| 923 |
- </div> |
|
| 924 |
- |
|
| 925 |
- <div class="table_wrap"> |
|
| 926 |
- <table> |
|
| 927 |
- <colgroup> |
|
| 928 |
- <col style="width:calc(100% /3);"> |
|
| 929 |
- <col style="width:calc(100% /3);"> |
|
| 930 |
- <col style="width:calc(100% /3);"> |
|
| 931 |
- </colgroup> |
|
| 932 |
- <thead> |
|
| 933 |
- <tr> |
|
| 934 |
- <th scope="col">로그인 일시</th> |
|
| 935 |
- <th scope="col">로그인 IP</th> |
|
| 936 |
- <th scope="col">로그인 환경</th> |
|
| 937 |
- </tr> |
|
| 938 |
- </thead> |
|
| 939 |
- <tbody> |
|
| 940 |
- <c:forEach var="result" items="${resultList}" varStatus="status">
|
|
| 941 |
- <tr> |
|
| 942 |
- <td><c:out value="${result.loginDt}"/></td>
|
|
| 943 |
- <td><c:out value="${result.loginIp}"/></td>
|
|
| 944 |
- <td><c:out value="${result.loginDevice}"/></td>
|
|
| 945 |
- </tr> |
|
| 946 |
- </c:forEach> |
|
| 947 |
- </tbody> |
|
| 948 |
- </table> |
|
| 949 |
- </div> |
|
| 950 |
- <!-- //로그인 내역 --> |
|
| 951 |
- <!-- pagination --> |
|
| 952 |
- <!-- <ul class="pagination"> |
|
| 953 |
- <li class="page_first"><button><img src="/publish/images/content/page_first.png" alt=""></button></li> |
|
| 954 |
- <li class="page_prev"><button><img src="/publish/images/content/page_prev.png" alt=""></button></li> |
|
| 955 |
- <li class="on"><button>1</button></li> |
|
| 956 |
- <li><button>2</button></li> |
|
| 957 |
- <li><button>3</button></li> |
|
| 958 |
- <li><button>4</button></li> |
|
| 959 |
- <li><button>5</button></li> |
|
| 960 |
- <li><button>6</button></li> |
|
| 961 |
- <li><button>7</button></li> |
|
| 962 |
- <li><button>8</button></li> |
|
| 963 |
- <li><button>9</button></li> |
|
| 964 |
- <li><button>10</button></li> |
|
| 965 |
- <li class="page_next"><button><img src="/publish/images/content/page_next.png" alt=""></button></li> |
|
| 966 |
- <li class="page_last"><button><img src="/publish/images/content/page_last.png" alt=""></button></li> |
|
| 967 |
- </ul>pagination |
|
| 968 |
- --> |
|
| 969 |
- <c:if test="${!empty resultList}">
|
|
| 970 |
- <ul class="pagination"> |
|
| 971 |
- <ui:pagination paginationInfo = "${paginationInfo}" type="imageWeb" jsFunction="linkPage" />
|
|
| 972 |
- </ul> |
|
| 973 |
- </c:if> |
|
| 974 |
- </div> |
|
| 975 |
- <!-- //보안로그인 --> |
|
| 976 |
- </div> |
|
| 977 |
- </div> |
|
| 978 |
- <!--// 마이페이지 - 회원해지 --> |
|
| 979 |
- </div> |
|
| 980 |
- <!--// send top --> |
|
| 262 |
+ <%@ include file="include/secure/secondAuthLog.jspf" %> |
|
| 263 |
+ </div> |
|
| 264 |
+ <!-- //보안로그인 --> |
|
| 265 |
+ </div> |
|
| 266 |
+ </div> |
|
| 267 |
+ <!--// 마이페이지 - 회원해지 --> |
|
| 268 |
+ </div> |
|
| 269 |
+ <!--// send top --> |
|
| 981 | 270 |
</div> |
| 982 | 271 |
<!--// content 영역 --> |
+++ src/main/webapp/WEB-INF/jsp/web/user/sendNumberEmployeeCertPopup.jspf
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/user/sendNumberListAjax.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/sendNumberListAjax.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/user/sendNumberManage.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/sendNumberManage.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/WEB-INF/jsp/web/user/sendNumberManageRegister.jsp
+++ src/main/webapp/WEB-INF/jsp/web/user/sendNumberManageRegister.jsp
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/js/web/msgdata/msgDataView.js
+++ src/main/webapp/js/web/msgdata/msgDataView.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/mail/mail_member_dormant.html
+++ src/main/webapp/mail/mail_member_dormant.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/pb/css/content.css
+++ src/main/webapp/pb/css/content.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/pb/js/common.js
+++ src/main/webapp/pb/js/common.js
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/pb/layout/_header.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/pb/layout/_lnb.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/api_guide.html
+++ src/main/webapp/publish/api_guide.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/api_send_history.html
+++ src/main/webapp/publish/api_send_history.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/common.css
+++ src/main/webapp/publish/css/common.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/content.css
+++ src/main/webapp/publish/css/content.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/font.css
+++ src/main/webapp/publish/css/font.css
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/css/jquery-ui.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/main.css
+++ src/main/webapp/publish/css/main.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/css/popupLayer.css
+++ src/main/webapp/publish/css/popupLayer.css
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/email_form_terms_2026_clause.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/font/Pretendard-Black.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Black.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Bold.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Bold.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-ExtraBold.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-ExtraBold.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-ExtraLight.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-ExtraLight.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Light.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Light.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Medium.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Medium.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Regular.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Regular.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-SemiBold.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-SemiBold.subset.woff2
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Thin.subset.woff
| Binary file is not shown |
+++ src/main/webapp/publish/font/Pretendard-Thin.subset.woff2
| Binary file is not shown |
--- src/main/webapp/publish/guide.html
+++ src/main/webapp/publish/guide.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/index.html
+++ src/main/webapp/publish/index.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/index_2025.html
+++ src/main/webapp/publish/index_2025.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/js/common.js
+++ src/main/webapp/publish/js/common.js
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/js/jquery-ui.min.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/js/main.js
+++ src/main/webapp/publish/js/main.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/js/popupLayer.js
+++ src/main/webapp/publish/js/popupLayer.js
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/layout/_header.html
+++ src/main/webapp/publish/layout/_header.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/mypage1.html
+++ src/main/webapp/publish/mypage1.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/mypage5_bak.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/mypage_security_login.html
+++ src/main/webapp/publish/mypage_security_login.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/mypage_security_login_bak.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/security_login.html
+++ src/main/webapp/publish/security_login.html
| This diff is skipped because there are too many other diffs. |
--- src/main/webapp/publish/sub1.html
+++ src/main/webapp/publish/sub1.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/sub1_2026.html
| This diff is skipped because there are too many other diffs. |
+++ src/main/webapp/publish/sub1_bak.html
| This diff is skipped because there are too many other diffs. |
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?