|
@@ -1,19 +1,7 @@
|
|
|
package com.style24.front.biz.web;
|
|
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.TscCustomerService;
|
|
|
import com.style24.core.biz.service.TscKakaoPayService;
|
|
import com.style24.core.biz.service.TscKakaoPayService;
|
|
|
import com.style24.core.biz.service.TscOrderChangeService;
|
|
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.TsfRendererService;
|
|
|
import com.style24.front.biz.service.TsfReviewService;
|
|
import com.style24.front.biz.service.TsfReviewService;
|
|
|
import com.style24.front.biz.service.TsfWishlistService;
|
|
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.controller.TsfBaseController;
|
|
|
import com.style24.front.support.security.session.TsfSession;
|
|
import com.style24.front.support.security.session.TsfSession;
|
|
|
import com.style24.persistence.TscPageRequest;
|
|
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.Order;
|
|
|
import com.style24.persistence.domain.Point;
|
|
import com.style24.persistence.domain.Point;
|
|
|
import com.style24.persistence.domain.WishList;
|
|
import com.style24.persistence.domain.WishList;
|
|
|
-
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
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
|
|
* 마이페이지 Controller
|
|
@@ -101,6 +101,9 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TscKakaoPayService kakaoPayService;
|
|
private TscKakaoPayService kakaoPayService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private NiceCertify niceCertify;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 마이페이지 메인 화면
|
|
* 마이페이지 메인 화면
|
|
|
*
|
|
*
|
|
@@ -678,4 +681,108 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
result.set("giftcardOwnList",giftcardService.getGiftcardOwnList(giftcard));
|
|
result.set("giftcardOwnList",giftcardService.getGiftcardOwnList(giftcard));
|
|
|
return result;
|
|
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);
|
|
|
|
|
+ }
|
|
|
|
|
+ /*신주승 끝*/
|
|
|
}
|
|
}
|