|
|
@@ -130,7 +130,6 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
* 로그인 페이지
|
|
|
* @param error - 로그인 오류 정보
|
|
|
* @param session - HttpSession
|
|
|
- * @param snsType - SNS유형(NV:네이버, KK:카카오, FB:페이스북)
|
|
|
* @return
|
|
|
* @author gagamel
|
|
|
* @throws IOException
|
|
|
@@ -296,10 +295,12 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
if (isSnsLoing) {
|
|
|
CustSnsInfo custSnsInfo = objectMapper.convertValue(userInfo, CustSnsInfo.class);
|
|
|
log.info("custSnsInfo ==> {}", custSnsInfo.toString());
|
|
|
- //상태 체크
|
|
|
+
|
|
|
+ //SNS 로그인 처리
|
|
|
resultMap = customerService.customerSnsProcessing(custSnsInfo);
|
|
|
resultMap.setString("snsId", custSnsInfo.getSnsId());
|
|
|
resultMap.setString("snsType", custSnsInfo.getSnsType());
|
|
|
+
|
|
|
String custStat = resultMap.getString("custStat");
|
|
|
|
|
|
// 신규가입 이면 바로 로그인 처리
|
|
|
@@ -325,4 +326,46 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @RequestMapping("/signin/yes24LoginCallback")
|
|
|
+ public ModelAndView yes24LoginCallback(@RequestParam("ipin")String ipin, HttpSession session, HttpServletRequest request) {
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
+ boolean isSnsLoing = false;
|
|
|
+ GagaMap userInfo = new GagaMap();
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(ipin)) {
|
|
|
+ log.info(ipin);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ GagaMap resultMap = new GagaMap();
|
|
|
+
|
|
|
+ // SNS 로그인 성공시 정보 세션 저장
|
|
|
+ if (isSnsLoing) {
|
|
|
+ CustSnsInfo custSnsInfo = objectMapper.convertValue(userInfo, CustSnsInfo.class);
|
|
|
+ log.info("custSnsInfo ==> {}", custSnsInfo.toString());
|
|
|
+
|
|
|
+ //SNS 로그인 처리
|
|
|
+ resultMap = customerService.customerSnsProcessing(custSnsInfo);
|
|
|
+ resultMap.setString("snsId", custSnsInfo.getSnsId());
|
|
|
+ resultMap.setString("snsType", custSnsInfo.getSnsType());
|
|
|
+
|
|
|
+ String custStat = resultMap.getString("custStat");
|
|
|
+
|
|
|
+ // 신규가입 이면 바로 로그인 처리
|
|
|
+ if ("NEW_CUST".equals(custStat)) {
|
|
|
+ customerService.getLogin(Integer.parseInt(resultMap.getString("custNo")), request);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 가입 폼으로 이동
|
|
|
+ if ("EMPTY_PHONE_CUST".equals(custStat)) {
|
|
|
+ session.setAttribute("custSnsInfo", custSnsInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mav.addObject("resultMap", resultMap);
|
|
|
+ mav.setViewName(super.getDeviceViewName("SnsCallBackForm"));
|
|
|
+
|
|
|
+ return mav;
|
|
|
+ }
|
|
|
+
|
|
|
}
|