Ver Fonte

회원 마이페이지 작업 중 성별관련 소스 수정

jsshin há 5 anos atrás
pai
commit
f19bb11805

+ 9 - 0
src/main/java/com/style24/front/biz/dao/TsfCustomerDao.java

@@ -124,4 +124,13 @@ public interface TsfCustomerDao {
 	 * @since 2021. 03. 11
 	 */
 	int updatePasswordDate(Customer customer);
+
+	/**
+	 * 본인인증을 통한 정보수정
+	 * @param customer - 고객정보
+	 * @return int - 결과
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	int updateCustomerAuth(Customer customer);
 }

+ 58 - 31
src/main/java/com/style24/front/biz/service/TsfCustomerService.java

@@ -1,20 +1,8 @@
 package com.style24.front.biz.service;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import com.style24.core.biz.service.TscEnvsetService;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.authority.SimpleGrantedAuthority;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.gagaframework.web.parameter.GagaMap;
+import com.gagaframework.web.security.GagaPasswordEncoder;
 import com.style24.core.biz.service.TscCustomerService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.session.TscSession;
@@ -27,11 +15,18 @@ import com.style24.persistence.domain.CustSnsInfo;
 import com.style24.persistence.domain.Customer;
 import com.style24.persistence.domain.Login;
 import com.style24.persistence.domain.WishList;
-
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
-import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.security.GagaPasswordEncoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 
 /**
  * 고객(회원) Service
@@ -283,8 +278,6 @@ public class TsfCustomerService {
 		boolean isJoin = true;
 		customer.setEncodedPasswd(" ");
 		customer.setCustId(customer.getSnsType()+"_"+customer.getSnsId());
-		String gender = "G007_"+customer.getSexGb();
-		customer.setSexGb(gender);
 		customer.encryptData();
 
 		customer.setSiteCd(TscConstants.Site.STYLE24.value());
@@ -654,6 +647,7 @@ public class TsfCustomerService {
 	 * @author jsshin
 	 * @since 2021. 03. 08
 	 */
+	@Transactional("shopTxnManager")
 	public GagaMap releaseDormantCustomer(Customer customer) {
 		GagaMap result = new GagaMap();
 
@@ -680,6 +674,7 @@ public class TsfCustomerService {
 	 * @author jsshin
 	 * @since 2021. 03. 11
 	 */
+	@Transactional("shopTxnManager")
 	public GagaMap saveCertification(Customer customer) {
 		GagaMap resultMap = new GagaMap();
 		customer.setRegNo(customer.getCustNo());
@@ -713,6 +708,7 @@ public class TsfCustomerService {
 	 * @author jsshin
 	 * @since 2021. 03. 11
 	 */
+	@Transactional("shopTxnManager")
 	public GagaMap updatePasswordDate(Customer customer) {
 		GagaMap resultMap = new GagaMap();
 		boolean isSuccess = false;
@@ -733,20 +729,51 @@ public class TsfCustomerService {
 
 		return resultMap;
 	}
-	
+
 	/**
-	 * 해당 고객번호로 가입된 정보 확인
-	 * @param custNo - 연계정보
-	 * @return Customer
-	 * @author eskim
-	 * @since 2021. 03. 12
+	 * 비밀번호 맞는지 확인
+	 * @param customer - 고객정보
+	 * @return boolean
+	 * @author jsshin
+	 * @since 2021. 03. 15
 	 */
-	public Customer getCustomerFindByCustNo(int custNo) {
-		TscSession.setAttribute("maskingYn","Y");
-		Customer customer = new Customer();
-		customer.setCustNo(custNo);
-		customer.setSiteCd(TscConstants.Site.STYLE24.value());
+	public boolean customerPasswordConfirm(Customer customer) {
+		boolean isMatch = false;
+		Login login = new Login();
+		login.setCustNo(TsfSession.getInfo().getCustNo());
+		Login loginCheckInfo = loginService.getLoginCheckInfo(login);
+
+		if (loginCheckInfo != null) {
+			isMatch = passwordEncoder.matchesSha256(customer.getPasswd(), loginCheckInfo.getPasswd());
+		}
+
+		return isMatch;
+	}
+
+	/**
+	 * 본인인증을 통한 이름, 휴대전화번호 수정
+	 * @param customer - 고객정보
+	 * @return GagaMap
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	@Transactional("shopTxnManager")
+	public GagaMap updateCustomerAuth(Customer customer) {
+		GagaMap result = new GagaMap();
+		customer.setRegNo(customer.getCustNo());
+		customer.setUpdNo(customer.getCustNo());
+		customer.setHypenCellPhone();
 		customer.encryptData();
-		return customerDao.getCustomerInfo(customer);
+		// 1. 이력쌓고
+		coreCustomerService.createCustomerHistory(customer);
+
+		// 2. 이름, 휴대전화 번호 저장
+		int updateCnt = customerDao.updateCustomerAuth(customer);
+
+		boolean iSsuccess = updateCnt > 0; // 변경 성공시 true
+
+		result.setBoolean("iSsuccess", iSsuccess);
+
+		return result;
 	}
 }

+ 2 - 3
src/main/java/com/style24/front/biz/thirdparty/KaKaoLogin.java

@@ -5,9 +5,9 @@ import com.gagaframework.web.util.GagaFileUtil;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonObject;
-import com.google.i18n.phonenumbers.NumberParseException;
 import com.google.i18n.phonenumbers.PhoneNumberUtil;
 import com.google.i18n.phonenumbers.Phonenumber;
+import com.style24.core.support.env.TscConstants;
 import com.style24.front.support.security.session.TsfSession;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -25,7 +25,6 @@ import org.springframework.web.client.RestTemplate;
 import javax.annotation.PostConstruct;
 import java.net.URI;
 import java.util.Locale;
-import java.util.UUID;
 
 
 /**
@@ -190,7 +189,7 @@ public class KaKaoLogin {
 
 			String sexGb = "";
 			if (StringUtils.isNotBlank(kakaoAccount.getString("gender"))) {
-				sexGb = kakaoAccount.getString("gender").equals("male") ? "M" : "F";
+				sexGb = kakaoAccount.getString("gender").equals("male") ? TscConstants.Gender.MALE.value() : TscConstants.Gender.FEMALE.value();
 			}
 
 			String birthSm = "";

+ 7 - 10
src/main/java/com/style24/front/biz/thirdparty/NaverLogin.java

@@ -1,14 +1,13 @@
 package com.style24.front.biz.thirdparty;
 
-import java.net.URI;
-
-import javax.annotation.PostConstruct;
-
+import com.gagaframework.web.parameter.GagaMap;
+import com.gagaframework.web.util.GagaFileUtil;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
+import com.style24.core.support.env.TscConstants;
 import com.style24.front.support.security.session.TsfSession;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
@@ -21,10 +20,8 @@ import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.web.client.RestTemplate;
 
-import lombok.extern.slf4j.Slf4j;
-
-import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.util.GagaFileUtil;
+import javax.annotation.PostConstruct;
+import java.net.URI;
 
 
 /**
@@ -162,7 +159,7 @@ public class NaverLogin {
 			String email = response.getString("email");
 			String cellphnno = response.getString("mobile");
 			String birthYmd = response.getString("birthyear") + response.getString("birthday").replaceAll("-","");
-			String sexGb = response.getString("gender");
+			String sexGb = response.getString("gender").equals("M")? TscConstants.Gender.MALE.value() : TscConstants.Gender.FEMALE.value();
 			String ci = this.requestReplace(response.getString("ci"),"encodeData");
 
 			resultMap.setString("snsId", snsId);

+ 5 - 4
src/main/java/com/style24/front/biz/thirdparty/NiceCertify.java

@@ -5,6 +5,7 @@ import NiceID.Check.CPClient;
 import com.gagaframework.web.parameter.GagaMap;
 import com.gagaframework.web.util.GagaDateUtil;
 import com.gagaframework.web.util.GagaFileUtil;
+import com.style24.core.support.env.TscConstants;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.domain.Customer;
 import lombok.extern.slf4j.Slf4j;
@@ -194,9 +195,9 @@ public class NiceCertify {
 		String sforeignerYn = ""; // 외국인여부(외국인:Y)
 
 		if ("0".equals(sGender)) {
-			sGender = "F";
+			sGender = TscConstants.Gender.FEMALE.value();
 		} else if ("1".equals(sGender)) {
-			sGender = "M";
+			sGender = TscConstants.Gender.MALE.value();
 		}
 
 		if (StringUtils.isNotBlank(sBirthDate)) {
@@ -330,9 +331,9 @@ public class NiceCertify {
 			sAdult = "Y";//성인
 		}
 		if ("0".equals(sGenderCode)) {
-			sGender = "F";
+			sGender = TscConstants.Gender.FEMALE.value();
 		} else if ("1".equals(sGenderCode)) {
-			sGender = "M";
+			sGender = TscConstants.Gender.MALE.value();
 		}
 
 		if ("0".equals(sForeigner)) {

+ 17 - 10
src/main/java/com/style24/front/biz/web/TsfCustomerController.java

@@ -3,28 +3,24 @@ package com.style24.front.biz.web;
 import com.gagaframework.web.parameter.GagaMap;
 import com.style24.core.biz.service.TscClauseService;
 import com.style24.core.support.env.TscConstants;
+import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.core.support.session.TscSession;
+import com.style24.front.biz.service.TsfCustomerService;
 import com.style24.front.biz.service.TsfKakaoService;
 import com.style24.front.biz.thirdparty.NiceCertify;
+import com.style24.front.support.controller.TsfBaseController;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.domain.Customer;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.ibatis.mapping.ResultMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-
-import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.front.biz.service.TsfCustomerService;
-import com.style24.front.support.controller.TsfBaseController;
-
-import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.support.SessionStatus;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
@@ -568,6 +564,8 @@ public class TsfCustomerController extends TsfBaseController {
 		custInfo = customerService.getCustomerFindByCi(customer.getCi());	// CI 중복체크
 		if (custInfo != null) {
 			result.setString("maskingCustId", custInfo.getMaskingCustId());
+			result.setString("custStat", custInfo.getCustStat());
+			result.setString("cellPhnno", customer.getCellPhnno());
 			result.setBoolean("isFind", true);
 			return result;
 		}
@@ -575,6 +573,8 @@ public class TsfCustomerController extends TsfBaseController {
 		custInfo = customerService.getCustomerFindByCellPhnno(customer.getCellPhnno());	// 휴대전화 중복체크
 		if (custInfo != null) {
 			result.setString("maskingCustId", custInfo.getMaskingCustId());
+			result.setString("custStat", custInfo.getCustStat());
+			result.setString("cellPhnno", customer.getCellPhnno());
 			result.setBoolean("isFind", true);
 			return result;
 		}
@@ -610,8 +610,7 @@ public class TsfCustomerController extends TsfBaseController {
 		GagaMap authInfo = niceCertify.getCertifyCellPhoneResultInfo(customer);
 
 		// 2.인증통해 받은 데이터 매핑
-		String gender = "G007_"+authInfo.getString("sGender");
-		customer.setSexGb(gender);
+		customer.setSexGb(authInfo.getString("sGender"));
 		customer.setCustNm(authInfo.getString("sName"));
 		customer.setBirthYmd(authInfo.getString("sBirthDate"));
 		customer.setForeignerYn(authInfo.getString("sforeignerYn"));
@@ -790,6 +789,14 @@ public class TsfCustomerController extends TsfBaseController {
 		return mav;
 	}
 
+	/**
+	 * 비밀번호 변경 일시 변경
+	 *
+	 * @return GagaMap - 결과
+	 * @param customer - 고객정보
+	 * @author jsshin
+	 * @since 2021. 03. 11
+	 */
 	@PostMapping("/password/date/update")
 	@ResponseBody
 	public GagaMap updatePasswordDate(@RequestBody Customer customer) {

+ 124 - 17
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -1,19 +1,7 @@
 package com.style24.front.biz.web;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
+import com.gagaframework.web.parameter.GagaMap;
+import com.gagaframework.web.rest.server.GagaResponseStatus;
 import com.style24.core.biz.service.TscCustomerService;
 import com.style24.core.biz.service.TscKakaoPayService;
 import com.style24.core.biz.service.TscOrderChangeService;
@@ -30,6 +18,7 @@ import com.style24.front.biz.service.TsfPointService;
 import com.style24.front.biz.service.TsfRendererService;
 import com.style24.front.biz.service.TsfReviewService;
 import com.style24.front.biz.service.TsfWishlistService;
+import com.style24.front.biz.thirdparty.NiceCertify;
 import com.style24.front.support.controller.TsfBaseController;
 import com.style24.front.support.security.session.TsfSession;
 import com.style24.persistence.TscPageRequest;
@@ -39,11 +28,22 @@ import com.style24.persistence.domain.GiftCard;
 import com.style24.persistence.domain.Order;
 import com.style24.persistence.domain.Point;
 import com.style24.persistence.domain.WishList;
-
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
 
-import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.rest.server.GagaResponseStatus;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 
 /**
  * 마이페이지 Controller
@@ -101,6 +101,9 @@ public class TsfMypageController extends TsfBaseController {
 	@Autowired
 	private TscKakaoPayService kakaoPayService;
 
+	@Autowired
+	private NiceCertify niceCertify;
+
 	/**
 	 * 마이페이지 메인 화면
 	 *
@@ -678,4 +681,108 @@ public class TsfMypageController extends TsfBaseController {
 		result.set("giftcardOwnList",giftcardService.getGiftcardOwnList(giftcard));
 		return result;
 	}
+
+
+	/*신주승 시작*/
+
+	/**
+	 * 마이페이지 - 회원정보확인 화면
+	 *
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	*/
+	@GetMapping("/customer/confirm/form")
+	public ModelAndView getCustomerConfirmForm() {
+		ModelAndView mav = new ModelAndView();
+		mav.addObject("custId", TsfSession.getInfo().getCustId());
+		mav.setViewName(super.getDeviceViewName("mypage/MypageCustConfirmForm"));
+		return mav;
+	}
+
+	/**
+	 * 마이페이지 - 회원정보확인처리
+	 *
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	@PostMapping("/customer/password/confirm")
+	@ResponseBody
+	public GagaMap customerPasswordConfirm(@RequestBody Customer customer) {
+		GagaMap result = new GagaMap();
+		boolean isMatch = customerService.customerPasswordConfirm(customer);
+		result.setBoolean("isMatch", isMatch);
+		return result;
+	}
+
+
+	/**
+	 * 마이페이지 - 회원정보수정 화면
+	 *
+	 * @param confirmYn - 정보확인여부
+	 * @return ModelAndView
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	@GetMapping("/customer/modify/form")
+	public ModelAndView getCustomerModifyForm(@RequestParam(required = false)String confirmYn) {
+		ModelAndView mav = new ModelAndView();
+		String referer = StringUtils.defaultIfBlank(TsfSession.getHttpServletRequest().getHeader("referer"),"");
+		boolean redirect = false;
+
+		if(StringUtils.isBlank(referer)) {
+			redirect = true;
+		} else if(!referer.contains("/mypage/customer/confirm/form")) {
+			redirect = true;
+		} else if(!"Y".equals(confirmYn)) {
+			redirect = true;
+		}
+
+		if (redirect) {
+			mav.setViewName("redirect:/mypage/customer/confirm/form");
+			return mav;
+		}
+
+		mav.addObject("bankList", rendererService.getCommonCodeList("G050", "Y"));
+		mav.addObject("genderGbList", rendererService.getCommonCodeList("G007", "Y"));
+
+		mav.setViewName(super.getDeviceViewName("/mypage/MypageCustModifyForm"));
+		return mav;
+	}
+
+	/**
+	 * 마이페이지 - 회원정보조회
+	 *
+	 * @return Customer - 고객정보
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	@PostMapping("/customer/info")
+	@ResponseBody
+	public Customer getCustomerInfo() {
+		Integer custNo = TsfSession.getInfo().getCustNo();
+		return customerService.getCustomerFindByCustNo(custNo);
+	}
+
+	/**
+	 * 마이페이지 - 개명본인인증, 휴대폰 변경
+	 *
+	 * @return GagaMap - 결과
+	 * @param customer - 본인인증 값
+	 * @author jsshin
+	 * @since 2021. 03. 15
+	 */
+	@PostMapping("/customer/auth/update")
+	@ResponseBody
+	public GagaMap updateCustomerAuth(@RequestBody Customer customer) {
+		GagaMap authInfo = niceCertify.getCertifyCellPhoneResultInfo(customer);
+		customer.setSexGb(authInfo.getString("sGender"));
+		customer.setCustNo(TsfSession.getInfo().getCustNo());
+		customer.setCellPhnno(authInfo.getString("sMobileNo"));
+		customer.setCustNm(authInfo.getString("sName"));
+		customer.setBirthYmd(authInfo.getString("sBirthDate"));
+		return customerService.updateCustomerAuth(customer);
+	}
+	/*신주승 끝*/
 }

+ 16 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfCustomer.xml

@@ -197,6 +197,7 @@
 		     , LOGIN_LDT
 		     , CI
 		     , AUTH_DT
+		     , SNS_TYPE
 		     , MANAGED_RSN
 		     , MANAGED_DTL_RSN
 		     , MANAGED_DT
@@ -249,6 +250,7 @@
 		            NOW()
 		       ELSE NULL
 		       END                                 AS AUTH_DT
+		     , #{snsType}                          AS SNS_TYPE
 		     , #{managedRsn}                       AS MANAGED_RSN
 		     , #{managedDtlRsn}                    AS MANAGED_DTL_RSN
 		     , #{managedDt}                        AS MANAGED_DT
@@ -522,6 +524,7 @@
 
 	<!--비밀번호 변경 날짜 업데이트-->
 	<update id="updatePasswordDate" parameterType="Customer">
+		/* TsfCustomer.updatePasswordDate */
 		UPDATE TB_CUSTOMER
 		SET    PASSWD_CHG_DT = DATE_ADD(NOW(), INTERVAL -#{pwdChangeDay} DAY )
 		     , UPD_NO = #{updNo}
@@ -529,4 +532,17 @@
 		WHERE  CUST_NO = #{custNo}
 	</update>
 
+	<!--이름 휴대전화 번호 변경-->
+	<update id="updateCustomerAuth" parameterType="Customer">
+		/* TsfCustomer.updateCustomerAuth */
+		UPDATE TB_CUSTOMER
+		SET    CUST_NM = #{encodedCustNm}
+		     , CELL_PHNNO = #{encodedCellPhnno}
+		     , SEX_GB = #{encodedSexGb}
+		     , BIRTH_YMD = #{encodedBirthYmd}
+		     , UPD_DT = NOW()
+		     , UPD_NO = #{updNo}
+		WHERE  CUST_NO = #{custNo}
+	</update>
+
 </mapper>

+ 9 - 1
src/main/webapp/WEB-INF/views/web/customer/JoinFormWeb.html

@@ -396,9 +396,17 @@
 		$cellPhnno.val(result.cellPhnno);
 
 		if (result.isFind) { // 가입된 고객 정보가 있으면
-			$dupPhnno.text(result.maskingCustId+'로 가입된 이력이 있습니다.');
+			let msg = result.maskingCustId+"로 가입된 이력이 있습니다.";
+			if (result.custStat === 'G104_30') {
+				msg += "<br/> 탈퇴한 회원입니다. 탈퇴 후 60일 동안 재가입이 불가능합니다.";
+			}
+			if (result.custStat === 'G104_20') {
+				msg += "<br/> 휴면회원입니다. 해당 아이디로 휴면해제하시면 되겠습니다.";
+			}
+			$dupPhnno.html(msg);
 			$dupPhnno.show();
 			$dupPhnnoDiv.show();
+			$btnCellPhoneCertify.hide();
 			$btnCellPhoneCertify.text('휴대폰 인증');
 			$btnCellPhoneCertify.attr('disabled', false);
 			authCheck = false;

+ 132 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageCustConfirmFormWeb.html

@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org"
+	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+	  layout:decorator="web/common/layout/MypageLayoutWeb">
+<!--
+ *******************************************************************************
+ * @source  : MypageCustConfirmFormWeb.html
+ * @desc    : 마이페이지 > 회원정보 확인 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.03.15   jsshin      최초 작성
+ *******************************************************************************
+ -->
+
+<body>
+<th:block layout:fragment="content">
+	<div class="my_cont">
+		<div class="sec_head">
+			<h3>내정보 관리</h3>
+			<p class="sec_desc">
+				정보를 안전하게 보호하기 위하여 비밀번호를 다시 확인 합니다.
+			</p>
+		</div>
+		<div class="sec_body mypage_body">
+			<form id="confirmForm" class="form_wrap" role="form" method="post">
+				<div class="order_list">
+					<section class="order_row">
+						<div class="order_tit">
+							<h3 class="subH3">회원정보 확인</h3>
+						</div>
+						<div class="tbl type1 info_tbl">
+							<table>
+								<colgroup>
+									<col width="200">
+									<col width="*">
+								</colgroup>
+								<tbody>
+									<tr>
+										<th>아이디</th>
+										<td>
+											<input type="text" id="custId" name="custId" class="form_control" th:value="${custId}" readonly="readonly"/>
+										</td>
+									</tr>
+									<tr>
+										<th>비밀번호</th>
+										<td>
+											<input type="password" id="passwd" name="passwd" class="form_control" placeholder="비밀번호를 입력해주세요."/>
+										</td>
+									</tr>
+								</tbody>
+							</table>
+						</div>
+					</section>
+					<div class="btn_wrap half mt60">
+						<button type="button" class="btn btn_default cancle_btn" onclick="cfnGoToPage(_PAGE_MAIN);">
+							<span>취소</span>
+						</button>
+						<button type="button" id="btnConfirm" class="btn btn_dark submit_btn">
+							<span>확인</span>
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+<script th:inline="javascript">
+	/*<![CDATA[*/
+	$(document).ready(function() {
+		// 마이페이지 LNB 설정
+		fnSetMypageLnbList(10);
+
+		// 마이페이지 location 설정
+		fnSetMypageLocation('내정보 관리');
+
+	});
+
+	//엔터키 확인
+	$('#confirmForm input[name=passwd]').keypress(function (event) {
+		if (event.which === 13) {
+			event.preventDefault();
+			fnValidConfirm();
+		}
+	});
+
+	// 확인버튼
+	$('#btnConfirm').on('click', function () {
+		fnValidConfirm();
+	});
+
+	// 확인
+	var fnValidConfirm = function () {
+		var $passwd = $('#confirmForm input[name=passwd]');
+		if (gagajf.isNull($passwd.val())) {
+			$passwd.blur();
+			mcxDialog.alertC("비밀번호를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function () {
+					$passwd.focus();
+				}
+			});
+			return;
+		}
+		gagajf.ajaxFormSubmit("/mypage/customer/password/confirm", '#confirmForm', fnConfirmCallback);
+	};
+
+	var fnConfirmCallback = function (result) {
+		let confirmYn = 'Y';
+		let $passwd = $('#confirmForm input[name=passwd]');
+		if (result.isMatch) {
+			confirmYn = 'Y';
+			cfnGoToPage(_PAGE_MYPAGE_CUSTOMER_MODIFY+'?confirmYn='+ confirmYn);
+		} else {
+			mcxDialog.alert('비밀번호가 일치하지 않습니다.');
+			$passwd.val('');
+			$passwd.focus();
+			return;
+		}
+	};
+	/*]]>*/
+</script>
+
+</th:block>
+
+</body>
+</html>
+
+

+ 290 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageCustModifyFormWeb.html

@@ -0,0 +1,290 @@
+<!DOCTYPE html>
+<html lang="ko"
+	  xmlns:th="http://www.thymeleaf.org"
+	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+	  layout:decorator="web/common/layout/MypageLayoutWeb">
+<!--
+ *******************************************************************************
+ * @source  : MypageCustModifyForm.html
+ * @desc    : 마이페이지 > 회원정보 수정 Page
+ *============================================================================
+ * STYLE24
+ * Copyright(C) 2021 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2021.03.15   jsshin      최초 작성
+ *******************************************************************************
+ -->
+<body>
+<th:block layout:fragment="content">
+	<div class="my_cont">
+		<div class="sec_head">
+			<h3>회원정보 수정</h3>
+		</div>
+		<div class="sec_body mypage_body">
+			<form id="custModiFyForm" class="form_wrap" role="form" method="post">
+				<div class="order_list">
+					<section class="order_row">
+						<div class="order_tit">
+							<h3 class="subH3">회원정보</h3>
+							<button type="button" class="btn_popup" onclick="cfnOpenCellphoneCertify();">개명 본인인증</button>
+						</div>
+						<div class="tbl type1 info_tbl">
+							<!-- 인증회원 -->
+							<table>
+								<colgroup>
+									<col width="200">
+									<col width="*">
+								</colgroup>
+								<tr>
+									<th>이름(성별)</th>
+									<td id="custNm" name="custNm"></td>
+								</tr>
+								<tr>
+									<th>생년월일</th>
+									<td id="birthYmd" name="birthYmd"></td>
+								</tr>
+							</table>
+							<!-- //인증회원 -->
+						</div>
+						<p class="alert_t">본인인증을 통해 자동으로 수집되는 정보 입니다.</p>
+					</section>
+					<section class="order_row">
+						<div class="tbl type1 info_tbl ">
+							<table>
+								<colgroup>
+									<col width="200">
+									<col width="*">
+								</colgroup>
+								<tbody>
+									<tr>
+										<th>아이디</th>
+										<td>
+											<input type="text" id="custId" name="custId" class="form_control" placeholder="" readonly="readonly"/>
+										</td>
+									</tr>
+									<tr>
+										<th>비밀번호</th>
+										<td>
+											<div class="password_btn">
+												<button type="button" class="btn btn_dark"><span>변경하기</span></button>
+											</div>
+										</td>
+									</tr>
+									<tr>
+										<th>이메일</th>
+										<td>
+											<input type="text" id="email" name="email" class="form_control" placeholder="" readonly="readonly"/>
+										</td>
+									</tr>
+									<tr>
+										<th>휴대폰 번호</th>
+										<td>
+											<input type="text" id="cellPhnno" name="cellPhnno" class="form_control" placeholder="" readonly="readonly"/>
+											<button type="button" class="btn btn_default btn_sm" onclick="cfnOpenCellphoneCertify();">
+												<span>휴대폰 인증</span>
+											</button>
+										</td>
+									</tr>
+								</tbody>
+							</table>
+						</div>
+					</section>
+					<section class="order_row">
+						<div class="order_tit">
+							<h3 class="subH3">환불계좌 정보</h3>
+						</div>
+						<div class="tbl type1 info_tbl ">
+							<table>
+								<colgroup>
+									<col width="200">
+									<col width="*">
+								</colgroup>
+								<tbody>
+									<tr>
+										<th class="ver_top">예금주</th>
+										<td>
+											<input type="text" id="accountHolder" name="accountHolder" class="form_control" placeholder="" readonly="readonly"/>
+											<p class="alert_t02">회원명 본인이 예금주인 통장으로만 환불이 가능합니다.</p>
+										</td>
+									</tr>
+									<tr>
+										<th>은행명</th>
+										<td>
+											<div class="form_field">
+												<select id="bankList">
+													<option value="">선택</option>
+													<option th:if="${bankList}" th:each="oneData, status : ${bankList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+												</select>
+											</div>
+										</td>
+									</tr>
+									<tr>
+										<th>계좌번호</th>
+										<td>
+											<input type="text" id="accountNumber" name="accountNumber" class="form_control" value="" placeholder=""/>
+										</td>
+									</tr>
+								</tbody>
+							</table>
+						</div>
+					</section>
+					<section class="order_row">
+						<div class="order_tit">
+							<h3 class="subH3">마케팅 정보 수신설정</h3>
+							<span class="desc">특가상품, 할인쿠폰, 이벤트 소식 수신 동의</span>
+						</div>
+						<div class="tbl type1 info_tbl">
+							<table>
+								<colgroup>
+									<col width="200">
+									<col width="*">
+								</colgroup>
+								<tbody>
+									<tr>
+										<th>수신설정</th>
+										<td>
+											<div class="form_field review_radio">
+												<div class="radio_li">
+													<input type="checkbox" id="emailAgreeYn" name="emailAgreeYn" value="Y"/><label for="emailAgreeYn"><span>이메일</span></label>
+												</div>
+												<div class="radio_li">
+													<input type="checkbox" id="smsAgreeYn" name="smsAgreeYn" value="Y"/><label for="smsAgreeYn"><span>SMS</span></label>
+												</div>
+											</div>
+										</td>
+									</tr>
+								</tbody>
+							</table>
+						</div>
+						<p class="alert_t"> 회원정보, 구매정보 및 서비스 주요 정책 관련 내용은 수신동의 여부와 관계없이 발송됩니다.</p>
+					</section>
+					<div class="btn_wrap half mt60">
+						<button type="button" id="btnConfirm" class="btn btn_dark submit_btn">
+							<span>확인</span>
+						</button>
+					</div>
+				</div>
+			</form>
+		</div>
+	</div>
+<script th:inline="javascript">
+	/*<![CDATA[*/
+
+	var fnConvertToArray = function(data, isCodeDisplay) {
+		if (data.length == 0)
+			return [];
+
+		if (typeof(isCodeDisplay) == 'undefined')
+			isCodeDisplay = false;
+
+		var arrValue = {};
+
+		$.each(data, function(idx, item) {
+			arrValue[item.cd] = (isCodeDisplay ? '[' + item.cd + '] ' : '') + item.cdNm;
+		});
+
+		return arrValue;
+	};
+
+	var fnLookupValue = function(mappings, key) {
+		return mappings[key];
+	};
+
+	const genderGbList = fnConvertToArray([[${genderGbList}]]);				//성별
+
+
+	// 고객정보
+	var fnGetCustInfo = function () {
+		let jsonData = JSON.stringify({});
+		gagajf.ajaxJsonSubmit("/mypage/customer/info", jsonData , fnGetCustInfoCallback);
+	}
+
+	// 고객정보 데이터
+	var fnGetCustInfoCallback = function (custInfo) {
+		let genderGb = fnLookupValue(genderGbList, custInfo.sexGb);
+		let gender = '';
+		if (!gagajf.isNull(genderGb)) {
+			gender = custInfo.custNm + '('+ genderGb +')';
+		} else {
+			gender = genderGb;
+		}
+		$('#custModiFyForm td[name=custNm]').text(gender);
+		$('#custModiFyForm td[name=birthYmd]').text(custInfo.birthYmd);
+		$('#custModiFyForm input[name=custId]').val(custInfo.custId);
+		$('#custModiFyForm input[name=email]').val(custInfo.email);
+		$('#custModiFyForm input[name=cellPhnno]').val(custInfo.cellPhnno);
+		$('#custModiFyForm input[name=accountHolder]').val(custInfo.custNm);
+
+		fnDisplayEmailAgree(custInfo.emailAgreeYn);
+		fnDisplaySmsAgree(custInfo.smsAgreeYn);
+	}
+
+	// 이메일 수신동의
+	var fnDisplayEmailAgree = function (emailAgreeYn) {
+		const $emailAgreeYn = $('#custModiFyForm input[name=emailAgreeYn]');
+		if (emailAgreeYn === 'Y') {
+			$emailAgreeYn.prop('checked', true);
+		} else {
+			$emailAgreeYn.prop('checked', false);
+		}
+
+	};
+
+	// SMS 수신동의
+	var fnDisplaySmsAgree = function (smsAgreeYn) {
+		const $smsAgreeYn = $('#custModiFyForm input[name=smsAgreeYn]');
+		if (smsAgreeYn === 'Y') {
+			$smsAgreeYn.prop('checked', true);
+		} else {
+			$smsAgreeYn.prop('checked', false);
+		}
+
+	};
+
+	// 나이스 본인인증 후 콜백
+	var fnNiceCallBack = function(encData) {
+		if (!gagajf.isNull(encData)) {
+			let custInfo = {};
+			custInfo.encData = encData;
+			let jsonData = JSON.stringify(custInfo);
+			gagajf.ajaxJsonSubmit('/mypage/customer/auth/update', jsonData, fnInfoConfirmCallBack);
+		}
+	};
+
+	var fnInfoConfirmCallBack = function (result) {
+		if (result.iSsuccess) {
+			fnGetCustInfo();
+			mcxDialog.alert("본인인증을 통해 정보가 변경 되었습니다.");
+			return;
+		} else {
+			mcxDialog.alert("실패하였습니다.<br/>고객센터에 문의하시 바랍니다.");
+			return;
+		}
+
+	}
+
+	$('#btnConfirm').on('click', function () {
+		let jsonData = JSON.stringify($('#custModiFyForm').serializeObject());
+		console.log('jsonData', jsonData);
+	});
+
+	$(document).ready(function() {
+		// 마이페이지 LNB 설정
+		fnSetMypageLnbList(10);
+
+		// 마이페이지 location 설정
+		fnSetMypageLocation('회원정보 수정');
+
+		// 회원정보 조회
+		fnGetCustInfo();
+
+	});
+	/*]]>*/
+</script>
+</th:block>
+</body>
+</html>
+
+

+ 180 - 0
src/main/webapp/WEB-INF/views/web/mypage/MypageCustSecedeFormWeb.html

@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html lang="ko">
+<head>
+<title>STYLE24 | 회원탈퇴 | Publishing</title>
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
+<meta name="Title" th:content="" content=""/>
+<meta name="description" th:content="" content=""/>
+<meta name="keywords" th:content="" content=""/>
+<meta property="og:type" content="website"/>
+<meta property="og:image" th:content="" content=""/>
+<meta property="og:url" th:content="" content=""/>
+<meta property="og:title" th:content="" content=""/>
+<meta property="og:description" th:content="" content=""/>
+<meta property="og:locale" content="ko_KR"/>
+<meta property="og:site_name" th:content="" content=""/>
+
+<link rel="icon" href="favicon.ico" type="image/x-icon">
+<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
+<link rel="apple-touch-icon" href="/images/pc/apple-touch-icon.png" sizes="180x180">
+<link rel="icon" href="/images/pc/favicon-32x32.png" sizes="32x32" type="image/png">
+<link rel="icon" href="/images/pc/favicon-16x16.png" sizes="16x16" type="image/png">
+
+<!-- <link rel="stylesheet" type="text/css" href="css/test-common.css" /> -->
+<link rel="stylesheet" type="text/css" href="css/common.css" />
+<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
+<script src="js/jquery.ellipsis.js"></script>
+<script src="js/jquery-ui.js"></script>
+<script src="js/common-ui.js"></script>
+</head>
+
+<body>
+
+	
+	<div class="skipComment">
+		<a href="#content">본문 바로가기</a>
+		<a href="#gnb">주메뉴 바로가기</a>
+		<a href="#footer">하단메뉴 바로가기</a>
+	</div>
+
+	<header id="header"></header>
+	<!--  container -->
+	<div id="container" class="container my">
+		<div class="breadcrumb">
+			<ul>
+				<li class="bread_home"><a href="index.html">홈</a></li>
+				<li class="bread_2depth">마이페이지</li>
+				<li class="bread_3depth">회원탈퇴</li>
+			</ul>
+		</div>
+		<div class="wrap">
+			<div class="content">
+				<div class="cont_head" style="display: none;">
+					CONT-HEAD
+					<div class="tit">my_center</div>
+					<div class="tit my_tit">my_tit</div>
+				</div>
+				<div class="cont_body mypage">
+					<!-- CONT-BODY -->
+					<div class="my_lnb">
+						<div class="lnb_tit">
+							<h2>마이페이지</h2>
+						</div>
+						<div class="lnb_list">
+							<ul>
+								<li><a href="/ux/pc/my_order_1.html">주문확인/배송조회</a></li>
+								<li><a href="/ux/pc/my_return_1.html">취소/반품/환불내역</a></li>
+								<li><a href="/ux/pc/my_restock_1.html">재입고 알림 내역</a></li>
+								<li><a href="/ux/pc/my_coupon_1.html">쿠폰</a></li>
+								<li><a href="/ux/pc/my_point_1.html">STYLE24 포인트</a></li>
+								<li><a href="/ux/pc/my_gift_1.html">상품권</a></li>
+								<li><a href="/ux/pc/my_review_1.html">리뷰</a></li>
+								<li><a href="/ux/pc/my_delivery_1.html">배송지 관리</a></li>
+								<li><a href="/ux/pc/my_wishlist_1.html">위시리스트</a></li>
+								<li><a href="/ux/pc/my_mypage_1.html">내정보 관리</a></li>
+								<li><a href="/ux/pc/my_leave_1.html" class="on">회원 탈퇴</a></li>
+							</ul>
+						</div>
+					</div>
+					<div class="my_cont">
+						<div class="sec_head">
+							<h3>회원탈퇴</h3>
+						</div>
+						<div class="sec_body mypage_body">
+							<div class="com_info_txt">
+								<p class="tit">회원 탈퇴 안내</p>
+								<ul>
+									<li>탈퇴시 소유하고 있는 포인트, 쿠폰등은 모두 소멸 됩니다.</li>
+									<li>거래정보가 있는 경우, 전자상거래 등에서의 소비자 보호에 관한 법류에 따라 계약 또는 청약철회에 관한 기록,<br>대금결제 및 재화 등의 공급에 관한 기록은 5년동안 보존됩니다.</li>
+									<li>보유하셨던 상품권 금액은 탈퇴와 함께 삭제되며 환불되지 않습니다.</li>
+									<li>회원 탈퇴 후 STYLE24에 입력하신 상품문의 및 후기,댓글은 삭제되지 않으며,회원정보 삭제로 인해 작성자 본인을 확인 할 수 없어<br>편집 및 삭제처리가 원천적으로 불가능 합니다.</li>
+									<li>상품권은 현금성 결제 수단에 포함되어 주문시 포인트 적립이 가능합니다.</li>
+								</ul>
+								<div class="chk_box">
+									<div class="form_field">
+										<div class="">
+											<input id="chk-1" type="checkbox"><label for="chk-1"><span>상기 STYLE24 회원탈퇴 시 처리사항 안내를 확인하였음에 동의합니다.</span></label>
+										</div>
+									</div>
+								</div>
+							</div>
+							<form class="form_wrap" role="form">
+								<div class="order_list">
+									<section class="order_row">
+										<div class="tbl track_tbl type2">
+											<table>
+												<colgroup>
+													<col width="25%">
+													<col width="25%">
+													<col width="25%">
+													<col width="25%">
+												</colgroup>   
+												<thead>
+													<tr>
+														<th>진행중(주문/취소/반품/교환)</th>
+														<th>마일리지(보유/적립예정)</th>
+														<th>상품권 잔여금액</th>
+														<th>쿠폰</th>
+													</tr>
+												</thead>
+												<tbody>
+													<tr>
+														<td>0 / 0 / 0 / 0</td>
+														<td class="c_primary">500P / 60P</td>
+														<td class="c_primary">20,000원</td>
+														<td class="c_primary">20장</td>
+													</tr>
+												</tbody>
+											</table>
+										</div>
+									</section>
+									<section class="order_row">
+										<div class="order_tit"> 
+											<h3 class="subH3">보안을 위해 회원님의 아이디 및 비밀번호를 다시 확인합니다.</h3>
+										</div>
+										<div class="tbl type1 info_tbl">
+											<table>
+												<colgroup>
+													<col width="200">
+													<col width="*">
+												</colgroup>   
+												<tbody>
+													<tr>
+														<th>아이디</th>
+														<td><input type="text" class="form_control" value="gunuid" placeholder="" readonly></td>
+													</tr>
+													<tr>
+														<th>비밀번호</th>
+														<td><input type="password" class="form_control" placeholder="비밀번호를 입력해주세요."></td>
+													</tr>
+												</tbody>
+											</table>
+										</div>
+									</section>
+									<div class="btn_wrap half mt60">
+										<button tyep="submit" class="btn btn_dark submit_btn"><span>회원탈퇴</span></button>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+					<!-- // CONT-BODY -->					
+				</div>
+			</div>
+		</div>
+	</div>
+	<!-- // container -->	
+	<footer id="footer"></footer>
+
+	<script type="text/javascript">
+	// 컨텐츠 호출
+	$(document).ready( function() {
+		$("#header").load("head.html");
+		$("#footer").load("foot.html");
+	});
+	</script>
+</body>
+</html>
+
+

+ 4 - 1
src/main/webapp/ux/style24_link.js

@@ -21,6 +21,7 @@ const _PAGE_CUSTOMER_DORMANT = _frontUrl + "/customer/dormant/certify/form";
 const _PAGE_CUSTOMER_DORMANT_COMPLETE = _frontUrl + "/customer/dormant/certify/complete/form";		// 고객 > 휴면회원 > 완료페이지
 const _PAGE_CUSTOMER_CERTIFICATION = "/customer/certification/form"									// 고객 > 본인인증화면
 
+
 //== 상품상세 ==/
 const _PAGE_GOODS_DETAIL = _frontUrl + "/goods/detail/form?goodsCd=";								// 상품 상세
 const _PAGE_GOODS_COUPON_LAYER = _frontUrl + "/goods/coupon/layer/";								// 쿠폰레이어
@@ -53,12 +54,14 @@ const _PAGE_MYPAGE_GIFTCARD = _frontUrl + "/mypage/gift/card/form";				// 마이
 const _PAGE_MYPAGE_REVIEW = _frontUrl + "/mypage/review/form";					// 마이페이지 > 리뷰
 const _PAGE_MYPAGE_DELIVERY_ADDR = _frontUrl + "/mypage/delivery/addr/form";	// 마이페이지 > 배송지 관리
 const _PAGE_MYPAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form";				// 마이페이지 > 위시리스트
-const _PAGE_MYPAGE_CUSTOMER = _frontUrl + "/mypage/customer/form";				// 마이페이지 > 내정보 관리
+const _PAGE_MYPAGE_CUSTOMER = _frontUrl + "/mypage/customer/confirm/form";		// 마이페이지 > 내정보 관리 > 회원정보 확인
+const _PAGE_MYPAGE_CUSTOMER_MODIFY = _frontUrl + "/mypage/customer/modify/form";// 마이페이지 > 내정보 관리 > 회원정보 수정
 const _PAGE_MYPAGE_SECEDE = _frontUrl + "/mypage/customer/secede/form";			// 마이페이지 > 회원탈퇴
 const _PAGE_WISHLIST = _frontUrl + "/mypage/wish/list/form";					// 마이페이지 > 위시리스트
 const _PAGE_WISHLIST_PUT = _frontUrl + "/mypage/wish/list/put";					// 위시리스트 담기
 const _PAGE_WISHLIST_DEL = _frontUrl + "/mypage/wish/list/delete";				// 위시리스트 삭제
 
+
 //== 검색 ==/
 
 //== 기획전 ==/