From 6c4efa81af71f8903f20c1e66511b73300c17695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=98=84=EC=84=B1=ED=95=84?= Date: Fri, 5 Dec 2025 15:35:52 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=EC=95=84=EC=9D=B4=EB=94=94=20=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0=20-=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AccountRecoveryController.java | 5 +- .../user/service/PortalUserAuthService.java | 38 +- .../static/sass/pages/_account-recovery.scss | 486 +++++++++++++----- .../templates/views/apps/login/findId.html | 119 ++--- .../views/apps/login/findIdResult.html | 94 ++-- 5 files changed, 488 insertions(+), 254 deletions(-) diff --git a/src/main/java/com/eactive/apim/portal/apps/login/controller/AccountRecoveryController.java b/src/main/java/com/eactive/apim/portal/apps/login/controller/AccountRecoveryController.java index 4d6030e..447fd28 100644 --- a/src/main/java/com/eactive/apim/portal/apps/login/controller/AccountRecoveryController.java +++ b/src/main/java/com/eactive/apim/portal/apps/login/controller/AccountRecoveryController.java @@ -6,6 +6,7 @@ import com.eactive.apim.portal.apps.user.dto.PortalUserDTO; import com.eactive.apim.portal.apps.user.service.PortalUserAuthService; import java.util.HashMap; +import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -79,7 +80,7 @@ public class AccountRecoveryController { } try { - PortalUserDTO foundId = portalUserAuthService.findUsersByNameAndMobile(findIdDTO.getUserName(), findIdDTO.getMobileNumber()); + List foundUsers = portalUserAuthService.findAllUsersByNameAndMobile(findIdDTO.getUserName(), findIdDTO.getMobileNumber()); // 인증 관련 세션 정보 제거 session.removeAttribute("mobileNumber"); @@ -87,7 +88,7 @@ public class AccountRecoveryController { //redirect 가 아닌 경우에는 model 을 사용해서 페이지 렌더링 처리 model.addAttribute("findIdDTO", findIdDTO); - model.addAttribute("foundId", foundId); + model.addAttribute("foundUsers", foundUsers); return ACCOUNT_RECOVERY_RESULT; } catch (UserNotFoundException e) { diff --git a/src/main/java/com/eactive/apim/portal/apps/user/service/PortalUserAuthService.java b/src/main/java/com/eactive/apim/portal/apps/user/service/PortalUserAuthService.java index b95b60e..5b90790 100644 --- a/src/main/java/com/eactive/apim/portal/apps/user/service/PortalUserAuthService.java +++ b/src/main/java/com/eactive/apim/portal/apps/user/service/PortalUserAuthService.java @@ -18,6 +18,16 @@ import com.eactive.apim.portal.template.entity.MessageRequest; import com.eactive.apim.portal.template.repository.MessageRequestRepository; import com.eactive.apim.portal.template.service.MessageHandlerService; import com.eactive.apim.portal.template.service.MessageRecipient; +import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.List; +import java.util.stream.Collectors; +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; import lombok.RequiredArgsConstructor; import org.apache.xerces.impl.dv.util.Base64; import org.springframework.security.core.authority.SimpleGrantedAuthority; @@ -28,16 +38,6 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.crypto.BadPaddingException; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import java.nio.charset.StandardCharsets; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.time.format.DateTimeFormatter; -import java.util.HashMap; -import java.util.List; - @Service @Transactional @RequiredArgsConstructor @@ -73,17 +73,21 @@ public class PortalUserAuthService implements UserDetailsService { } } - public PortalUserDTO findUsersByNameAndMobile(String userName, String mobileNumber) { + public List findAllUsersByNameAndMobile(String userName, String mobileNumber) { try { - PortalUser user = portalUserRepository.findByUserNameAndMobileNumber(userName, mobileNumber); - if (user == null) { + // 전화번호에서 - 제거하여 조회 + String normalizedMobileNumber = mobileNumber != null ? mobileNumber.replace("-", "") : null; + List users = portalUserRepository.findAllByUserNameAndMobileNumber(userName, normalizedMobileNumber); + if (users == null || users.isEmpty()) { throw new UserNotFoundException("입력하신 사용자 정보가 올바르지 않습니다. 다시 확인해 주세요."); } - PortalUserDTO dto = portalUserMapper.toDTO(user); - dto.setMaskedEmailAddr(StringMaskingUtil.maskEmail(dto.getLoginId())); - dto.setLoginId(null); - return dto; + return users.stream().map(user -> { + PortalUserDTO dto = portalUserMapper.toDTO(user); + dto.setMaskedEmailAddr(StringMaskingUtil.maskEmail(dto.getLoginId())); + dto.setLoginId(null); + return dto; + }).collect(Collectors.toList()); } catch (UserNotFoundException e) { throw e; diff --git a/src/main/resources/static/sass/pages/_account-recovery.scss b/src/main/resources/static/sass/pages/_account-recovery.scss index fd6437c..a710b5b 100644 --- a/src/main/resources/static/sass/pages/_account-recovery.scss +++ b/src/main/resources/static/sass/pages/_account-recovery.scss @@ -1,26 +1,26 @@ // ----------------------------------------------------------------------------- -// Account Recovery Page Styles (Find ID / Reset Password) - Modern Design -// Matches login.html design system for consistency +// Account Recovery Page Styles (Find ID / Reset Password) - Figma: 1029-2249 +// Matches terms_agreements.html tab design for consistency // ----------------------------------------------------------------------------- .account-recovery-page { display: flex; - align-items: center; + align-items: flex-start; justify-content: center; - background: #EDF9FE; - padding: 40px 20px; + background: transparent; + padding: 0; position: relative; - min-height: calc(100vh - 200px); - margin-top: 60px; - margin-bottom: 60px; - border-radius: 12px; + min-height: auto; + margin: 0; } .account-recovery-container { width: 100%; - max-width: 540px; + max-width: 1228px; margin: 0 auto; position: relative; + padding: $spacing-lg +; } .account-recovery-card { @@ -28,7 +28,7 @@ padding: 0; display: flex; flex-direction: column; - align-items: center; + align-items: stretch; position: relative; @media (max-width: 576px) { @@ -36,72 +36,66 @@ } } -// Logo +// Logo - 숨김 처리 (Figma 디자인에 없음) .account-recovery-logo { - width: 90px; - height: 90px; - margin-bottom: 24px; - - img { - width: 100%; - height: 100%; - object-fit: contain; - } + display: none; } -// Title +// Title - 숨김 처리 (페이지 타이틀 배너에서 표시) .account-recovery-title { - font-family: 'Noto Sans KR', sans-serif; - font-size: 28px; - font-weight: 700; - color: #000000; - text-align: center; - margin: 0 0 32px 0; - line-height: 1.3; - - @media (max-width: 576px) { - font-size: 24px; - margin-bottom: 24px; - } + display: none; } -// Tab Navigation +// Tab Navigation (Figma 디자인: 약관 페이지와 동일) .account-recovery-tabs { display: flex; gap: 0; - margin-bottom: 40px; + margin-bottom: 0; width: 100%; - background: #F8F9FA; - border-radius: 12px; - padding: 4px; + background: transparent; + border-radius: 0; + padding: 0; .tab-link { flex: 1; - padding: 14px 24px; + display: flex; + align-items: center; + justify-content: center; + padding: 18px 24px; font-family: 'Noto Sans KR', sans-serif; - font-size: 16px; - font-weight: 600; - color: #64748B; + font-size: 22px; + font-weight: 700; + color: #8c959f; text-decoration: none; text-align: center; - background: transparent; - border-radius: 8px; + background: #eceff4; + border-radius: 0; transition: all 0.3s ease; + // 왼쪽 탭 둥근 모서리 + &:first-child { + border-radius: 30px 0 0 0; + } + + // 오른쪽 탭 둥근 모서리 + &:last-child { + border-radius: 0 30px 0 0; + } + &:hover { - color: #0049B4; - background: rgba(0, 73, 180, 0.05); + color: #3ba4ed; + background: #e4e8ed; } &.active { color: #FFFFFF; - background: #0049B4; - box-shadow: 0 2px 4px rgba(0, 73, 180, 0.2); + background: #3ba4ed; + font-weight: 700; } @media (max-width: 576px) { - padding: 12px 16px; - font-size: 15px; + padding: 14px 16px; + font-size: 16px; } } } @@ -143,53 +137,82 @@ } } -// Form +// Form Content Area (Figma: 아이디찾기BG_box) .account-recovery-form { width: 100%; margin-bottom: 0; + background: #F6F9FB; + padding: 40px; + border-radius: 0 0 12px 12px; + + @media (max-width: 576px) { + padding: 24px 16px; + } .form-group { - margin-bottom: 24px; + display: flex; + align-items: center; + gap: 20px; + margin-bottom: 20px; &:last-of-type { margin-bottom: 0; } + + @media (max-width: 768px) { + flex-direction: column; + align-items: stretch; + gap: 10px; + } } .form-label { - display: block; + display: flex; + align-items: center; + flex-shrink: 0; + width: 170px; font-family: 'Noto Sans KR', sans-serif; - font-size: 15px; - font-weight: 600; - color: #1A1A2E; - margin-bottom: 10px; + font-size: 20px; + font-weight: 400; + color: #212529; + margin-bottom: 0; + + .required { + color: #ed5b5b; + margin-left: 2px; + } + + @media (max-width: 768px) { + width: 100%; + font-size: 16px; + } } .form-input { - width: 100%; - height: 70px; - padding: 0 24px; + flex: 1; + height: 60px; + padding: 0 20px; font-family: 'Noto Sans KR', sans-serif; - font-size: 16px; + font-size: 20px; font-weight: 400; - color: #1A1A2E; + color: #212529; background: #FFFFFF; - border: 1px solid #DDDDDD; + border: 1px solid #dadada; border-radius: 12px; outline: none; transition: all 0.3s ease; &::placeholder { - color: #94A3B8; + color: #dadada; } &:hover { - border-color: #CBD5E1; + border-color: #3ba4ed; } &:focus { - border-color: #0049B4; - box-shadow: 0 0 0 4px rgba(0, 73, 180, 0.08); + border-color: #3ba4ed; + box-shadow: 0 0 0 2px rgba(59, 164, 237, 0.1); } &:disabled { @@ -200,37 +223,43 @@ } &.error { - border-color: #FF6B6B; + border-color: #ed5b5b; + } + + @media (max-width: 576px) { + height: 50px; + font-size: 16px; } } .form-select { - width: 100%; - height: 70px; - padding: 0 24px; + height: 60px; + padding: 0 40px 0 20px; font-family: 'Noto Sans KR', sans-serif; - font-size: 16px; + font-size: 20px; font-weight: 400; - color: #1A1A2E; + color: #515151; background: #FFFFFF; - border: 1px solid #DDDDDD; + border: 1px solid #dadada; border-radius: 12px; outline: none; cursor: pointer; transition: all 0.3s ease; appearance: none; - background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + -webkit-appearance: none; + -moz-appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5' viewBox='0 0 10 5'%3E%3Cpath fill='%231D1B20' d='M5 5L0 0h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; - background-position: right 24px center; - padding-right: 50px; + background-position: right 16px center; + background-size: 10px 5px; &:hover { - border-color: #CBD5E1; + border-color: #3ba4ed; } &:focus { - border-color: #0049B4; - box-shadow: 0 0 0 4px rgba(0, 73, 180, 0.08); + border-color: #3ba4ed; + box-shadow: 0 0 0 2px rgba(59, 164, 237, 0.1); } &:disabled { @@ -245,95 +274,130 @@ padding: 12px; font-size: 16px; } + + @media (max-width: 576px) { + height: 50px; + font-size: 16px; + } } } -// Phone Input Group +// Phone Input Group (Figma: 휴대폰번호+텍스트필드) .phone-input-group { display: flex; align-items: center; - gap: 12px; + gap: 14px; + flex: 1; .phone-prefix { - flex: 0 0 140px; + width: 180px; + flex-shrink: 0; } .phone-middle, .phone-last { - flex: 1; + width: 180px; + flex-shrink: 0; } .phone-separator { - font-size: 16px; - color: #64748B; - font-weight: 500; + display: flex; + align-items: center; + justify-content: center; + width: 14px; + height: 1px; + background: #515151; + flex-shrink: 0; } - @media (max-width: 576px) { - .phone-prefix { - flex: 0 0 110px; + @media (max-width: 768px) { + flex-wrap: wrap; + gap: 10px; + + .phone-prefix, + .phone-middle, + .phone-last { + width: calc(33% - 20px); + min-width: 80px; } .phone-separator { - font-size: 14px; + width: 10px; + } + } + + @media (max-width: 576px) { + .phone-prefix, + .phone-middle, + .phone-last { + width: 100%; + } + + .phone-separator { + display: none; } } } -// Auth Number Group +// Auth Number Group (Figma: 인증번호+텍스트필드) .auth-number-group { - margin-top: 24px; + margin-top: 0; } .auth-input-group { position: relative; + display: flex; + align-items: center; + flex: 1; .auth-input { - padding-right: 100px; + flex: 1; + padding-right: 80px; } .auth-timer { position: absolute; - right: 24px; + right: 20px; top: 50%; transform: translateY(-50%); font-family: 'Noto Sans KR', sans-serif; - font-size: 16px; - font-weight: 600; - color: #FF6B6B; + font-size: 20px; + font-weight: 400; + color: #ed5b5b; pointer-events: none; @media (max-width: 576px) { - font-size: 14px; + font-size: 16px; right: 16px; } } } -// Buttons +// Buttons (Figma: 인증번호 받기/확인) .auth-request-button, .auth-verify-button { - width: 100%; - height: 70px; - padding: 0 32px; + width: 172px; + height: 60px; + padding: 10px; font-family: 'Noto Sans KR', sans-serif; - font-size: 17px; + font-size: 18px; font-weight: 700; color: #FFFFFF; - background: #0049B4; + background: #a4d6ea; border: none; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; - margin-top: 16px; + margin: 0; + flex-shrink: 0; line-height: 1; &:hover { - background: darken(#0049B4, 5%); + background: darken(#a4d6ea, 5%); } &:active { - background: darken(#0049B4, 10%); + background: darken(#a4d6ea, 10%); } &:disabled { @@ -342,49 +406,53 @@ } @media (max-width: 576px) { - height: 60px; + width: 100%; + height: 50px; font-size: 16px; + margin-top: 10px; } } -// Form Actions - Account Recovery specific styles -// Scoped to avoid conflict with common .form-actions in _forms.scss +// Form Actions (Figma: btn_취소, btn_신청) .account-recovery-card .form-actions { display: flex; - gap: 12px; - margin-top: 32px; - padding-top: 0; + justify-content: center; + gap: 20px; + margin-top: 40px; + padding: 40px 0; border-top: none; + background: transparent; .cancel-button, .submit-button { - flex: 1; - height: 70px; - padding: 0 32px; + width: 200px; + height: 60px; + padding: 10px; font-family: 'Noto Sans KR', sans-serif; - font-size: 17px; + font-size: 18px; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; line-height: 1; + // 태그 지원 + display: flex; + align-items: center; + justify-content: center; + text-decoration: none; } .cancel-button { - color: #64748B; - background: #FFFFFF; - border: 2px solid #E2E8F0; + color: #5f666c; + background: #e5e7eb; &:hover { - background: #F8F9FA; - border-color: #CBD5E1; - color: #475569; + background: darken(#e5e7eb, 5%); } &:active { - background: #F1F5F9; - border-color: #94A3B8; + background: darken(#e5e7eb, 10%); } } @@ -409,10 +477,12 @@ @media (max-width: 576px) { flex-direction: column; gap: 12px; + padding: 24px 0; .cancel-button, .submit-button { - height: 60px; + width: 100%; + height: 50px; font-size: 16px; } } @@ -511,3 +581,163 @@ margin-top: 24px; } } + +// Result Page Styles (아이디 찾기 결과 페이지) +.account-recovery-result { + width: 100%; + background: #F6F9FB; + padding: 60px 40px; + border-radius: 0 0 12px 12px; + text-align: center; + + @media (max-width: 576px) { + padding: 40px 20px; + } + + .result-header { + margin-bottom: 40px; + + .result-icon { + font-size: 60px; + color: #6BCF7F; + margin-bottom: 20px; + display: block; + + @media (max-width: 576px) { + font-size: 48px; + } + } + + .result-title { + font-family: 'Noto Sans KR', sans-serif; + font-size: 24px; + font-weight: 700; + color: #212529; + margin-bottom: 12px; + + @media (max-width: 576px) { + font-size: 20px; + } + } + + .result-description { + font-family: 'Noto Sans KR', sans-serif; + font-size: 16px; + font-weight: 400; + color: #5f666c; + margin: 0; + + strong { + color: #0049B4; + font-weight: 700; + } + + @media (max-width: 576px) { + font-size: 14px; + } + } + } +} + +// Found Users List +.found-users-list { + max-width: 600px; + margin: 0 auto 40px; + + .found-user-item { + background: #FFFFFF; + border: 1px solid #dadada; + border-radius: 12px; + padding: 20px 24px; + margin-bottom: 12px; + transition: all 0.3s ease; + + &:last-child { + margin-bottom: 0; + } + + &:hover { + border-color: #3ba4ed; + box-shadow: 0 2px 8px rgba(59, 164, 237, 0.15); + } + + .user-info { + display: flex; + align-items: center; + justify-content: center; + gap: 12px; + flex-wrap: wrap; + + @media (max-width: 576px) { + flex-direction: column; + gap: 6px; + } + } + + .user-email { + font-family: 'Noto Sans KR', sans-serif; + font-size: 20px; + font-weight: 700; + color: #212529; + + @media (max-width: 576px) { + font-size: 18px; + } + } + + .user-date { + font-family: 'Noto Sans KR', sans-serif; + font-size: 16px; + font-weight: 400; + color: #8c959f; + + @media (max-width: 576px) { + font-size: 14px; + } + } + } +} + +// Result Info Box +.result-info-box { + max-width: 600px; + margin: 0 auto; + background: rgba(0, 73, 180, 0.05); + border: 1px solid rgba(0, 73, 180, 0.2); + border-radius: 12px; + padding: 16px 24px; + + .info-text { + font-family: 'Noto Sans KR', sans-serif; + font-size: 15px; + font-weight: 400; + color: #5f666c; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + flex-wrap: wrap; + + i { + color: #0049B4; + font-size: 16px; + } + + .info-link { + color: #0049B4; + font-weight: 700; + text-decoration: underline; + transition: color 0.3s ease; + + &:hover { + color: darken(#0049B4, 10%); + } + } + + @media (max-width: 576px) { + font-size: 14px; + text-align: center; + } + } +} diff --git a/src/main/resources/templates/views/apps/login/findId.html b/src/main/resources/templates/views/apps/login/findId.html index f0743b6..62155e1 100644 --- a/src/main/resources/templates/views/apps/login/findId.html +++ b/src/main/resources/templates/views/apps/login/findId.html @@ -1,35 +1,33 @@ + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_title_layout}"> +
+
+ +

아이디 찾기

+
+