@ -113,9 +113,23 @@ public class M_LoginController extends AbstractControllerManager{
* /
@RequestMapping ( value = "view_join_member_01_confirm" )
public String view_join_member_01_confirm ( @ModelAttribute ( "model" ) ModelMap model , HttpServletRequest request ) {
DataMap paramMap = gmUtil . getDataMapFromRequest ( request ) ;
DataMap paramMap = gmUtil . getDataMapFromRequest ( request ) ; //페이지의 파라미터 값을 얻어옴.
HttpSession session = request . getSession ( false ) ;
HttpSession session = request . getSession ( false ) ; //현재 세션값을 얻어옴.
DataMap rm_mem = ( DataMap ) session . getAttribute ( ConstantSystem . SESSION_RM_MEMBER ) ; //SNS 가입정보(이름, 이메일, 닉네임 등) 확인
//소셜정보가 있다면 paramMap에 소셜가입정보 세팅
if ( rm_mem ! = null ) {
paramMap . put ( "sns_id" , rm_mem . get ( "sns_id" ) ) ;
paramMap . put ( "userEmail" , rm_mem . get ( "userEmail" ) ) ;
//소셜정보에 전화번호가 있다면 전화번호값 세팅
if ( ! rm_mem . get ( "phone" ) . equals ( "" ) ) {
paramMap . put ( "phone" , rm_mem . get ( "phone" ) ) ;
}
paramMap . put ( "social_type" , rm_mem . get ( "social_type" ) ) ;
}
session . setAttribute ( M_Util . SESSION_RM_MEMBER , paramMap ) ;
gmUtil . redirectParam ( model , paramMap ) ;
@ -476,7 +490,7 @@ public class M_LoginController extends AbstractControllerManager{
} else {
ConstantResultCode . putResultCode ( map_json , true , ConstantResultCode . RESULT_MEMBER_IS_NULL ) ; // json result code
gmUtil . redirectParamFlash ( ra , DataMap . fromNameValue ( new String [ ] { "phone_num" , "script_msg" } , new String [ ] { RenaStringUtil . getData ( paramMap , "member_id" ) , " 로그인에 실패했습니다 "} ) ) ;
gmUtil . redirectParamFlash ( ra , DataMap . fromNameValue ( new String [ ] { "phone_num" , "script_msg" } , new String [ ] { RenaStringUtil . getData ( paramMap , "member_id" ) , " 아이디 또는 비밀번호를 확인해 주세요. "} ) ) ;
}
}
} catch ( Exception ex1 ) { redirect_url = gmUtil . redirectError ( true , ex1 , request , paramMap , ra , "" ) ; ex1 . printStackTrace ( ) ; }
@ -526,7 +540,7 @@ public class M_LoginController extends AbstractControllerManager{
redirect_url = "redirect:" + action_url ;
} else {
ConstantResultCode . putResultCode ( map_json , true , ConstantResultCode . RESULT_MEMBER_IS_NULL ) ; // json result code
gmUtil . redirectParamFlash ( ra , DataMap . fromNameValue ( new String [ ] { "phone_num" , "script_msg" } , new String [ ] { RenaStringUtil . getData ( paramMap , "member_id" ) , " 로그인에 실패했습니다 "} ) ) ;
gmUtil . redirectParamFlash ( ra , DataMap . fromNameValue ( new String [ ] { "phone_num" , "script_msg" } , new String [ ] { RenaStringUtil . getData ( paramMap , "member_id" ) , " 아이디 또는 비밀번호를 확인해 주세요. "} ) ) ;
}
}
} catch ( Exception ex1 ) { redirect_url = gmUtil . redirectError ( true , ex1 , request , paramMap , ra , "" ) ; ex1 . printStackTrace ( ) ; }
@ -590,6 +604,34 @@ public class M_LoginController extends AbstractControllerManager{
return redirect_url ;
}
/ * *
* 닉 네 임 중 복 체 크
* @param model
* @param request
* @param response
* @return
* /
@RequestMapping ( value = "ajax_check_nickname" , method = RequestMethod . POST )
@ResponseBody
public HashMap < String , Object > ajax_check_nickname ( @ModelAttribute ( "model" ) ModelMap model , HttpServletRequest request , HttpServletResponse response ) {
DataMap paramMap = gmUtil . getDataMapFromRequest ( request ) ;
HashMap < String , Object > rm = new HashMap < String , Object > ( ) ;
rm . put ( "RESULT" , ConstantResultCode . RESULT_INIT ) ;
try {
int check_cnt = loginBO . select_member_check_nickname ( paramMap ) ;
rm . put ( "RESULT" , ConstantResultCode . RESULT_SUCCESS ) ;
rm . put ( "check_cnt" , check_cnt ) ;
} catch ( Exception ex1 ) {
ex1 . printStackTrace ( ) ;
rm . put ( "RESULT" , ConstantResultCode . RESULT_EXCEPTION ) ;
}
return rm ;
}
@RequestMapping ( value = "nhnLogin_callback" )
public String nhnLogin_callback ( @ModelAttribute ( "model" ) ModelMap model , HttpServletRequest request ) {
return "m/login/nhnLogin_callback" ;
@ -657,8 +699,8 @@ public class M_LoginController extends AbstractControllerManager{
DataMap map_json = new DataMap ( ) ;
ConstantResultCode . putResultCode ( map_json , false , ConstantResultCode . RESULT_INIT ) ; // json result code
DataMap paramMap = gmUtil . getDataMapFromRequest ( request ) ;
String socialType = request . getParameter ( "socialType" ) ;
String userPhone = "" ;
// String socialType = request.getParameter("socialType");
// String userPhone = "";
try {
paramMap = gmUtil . social_connect ( request , paramMap ) ;
@ -671,14 +713,18 @@ public class M_LoginController extends AbstractControllerManager{
//소셜아이디로 회원가입이 안되어 있을경우 회원가입페이지로 이동
if ( socialMemberMap = = null ) {
// userPhone = paramMap.getString("phone"); //소셜회원가입정보 - 전화번호
redirect_url = "/m/login/view_join_member_01" ;
//소셜연동결과 전화번호값이 없으면 휴대폰 회원인증 1단계 회원가입페이지 이동
/ *
if ( "" . equals ( userPhone ) ) {
redirect_url = "/m/login/view_join_member_01" ;
} else { //전화번호가 있으면 실명인증 없이 2단계 회원가입페이지 이동
redirect_url = "redirect:/m/login/view_join_member_02.do" ;
}
session . setAttribute ( M_Util . SESSION_RM_MEMBER , paramMap ) ; //세션에 소셜에서 받은 회원정보 세팅
* /
session . setAttribute ( M_Util . SESSION_RM_MEMBER , paramMap ) ; //세션에 소셜에서 받은 회원정보 세팅
} else {
String member_id = RenaStringUtil . getData ( socialMemberMap , "member_id" ) ; //회원아이디
ConstantResultCode . putResultCode ( socialMemberMap , true , ConstantResultCode . RESULT_SUCCESS ) ; // json result code - 결과코드 세팅
@ -704,7 +750,7 @@ public class M_LoginController extends AbstractControllerManager{
}
} else {
redirect_url = "redirect:/m/login/view_join_member .do";
redirect_url = "redirect:/m/login/view_join_member _01 .do";
}
} catch ( final Exception e ) {
e . printStackTrace ( ) ;