Merge remote-tracking branch 'origin/master'
Conflicts: src/main/java/nlib/user/service/NlibLoginVO.java
This commit is contained in:
commit
03d18b0433
@ -7,6 +7,7 @@ import nlib.util.StringUtil;
|
|||||||
|
|
||||||
public class OAuthUniversalUser {
|
public class OAuthUniversalUser {
|
||||||
|
|
||||||
|
private String mbInfoId;
|
||||||
private String snsId;
|
private String snsId;
|
||||||
|
|
||||||
private String snsEmail;
|
private String snsEmail;
|
||||||
@ -31,6 +32,14 @@ public class OAuthUniversalUser {
|
|||||||
return StringUtil.isNotEmpty(snsId);
|
return StringUtil.isNotEmpty(snsId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMbInfoId() {
|
||||||
|
return mbInfoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMbInfoId(String mbInfoId) {
|
||||||
|
this.mbInfoId = mbInfoId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSnsId() {
|
public String getSnsId() {
|
||||||
return snsId;
|
return snsId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
|
|
||||||
package nlib.user.service;
|
package nlib.user.service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthUniversalUser;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
|
|
||||||
@ -47,5 +51,11 @@ public interface MemberService
|
|||||||
|
|
||||||
public String createInitPwd();
|
public String createInitPwd();
|
||||||
|
|
||||||
|
public String selectAlreadySignUpId(OAuthUniversalUser oauthUser) throws Exception;
|
||||||
|
|
||||||
|
public void insertMemberSns(OAuthUniversalUser oauthUser);
|
||||||
|
|
||||||
|
public List<NlibLoginVO> selectAlreadySignUpMobile(NlibLoginVO loginVO) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -40,6 +40,8 @@ public class NlibLoginVO implements Serializable {
|
|||||||
private String mobileNo; /* 휴대전화번호 */
|
private String mobileNo; /* 휴대전화번호 */
|
||||||
private String password; /* 비밀번호 */
|
private String password; /* 비밀번호 */
|
||||||
private String email; /* 이메일 */
|
private String email; /* 이메일 */
|
||||||
|
private String emailVrfctNo; /* 이메일 인증번호 */
|
||||||
|
private String emailVrfctDd; /* 이메일 인증번호 발송일자 */
|
||||||
private String gender; /* 성별(M:남자,F:여자) */
|
private String gender; /* 성별(M:남자,F:여자) */
|
||||||
private String zipCode; /* 우편번호 */
|
private String zipCode; /* 우편번호 */
|
||||||
private String address; /* 주소 */
|
private String address; /* 주소 */
|
||||||
@ -73,6 +75,8 @@ public class NlibLoginVO implements Serializable {
|
|||||||
private String error = null; /* 처리 오류코드 */
|
private String error = null; /* 처리 오류코드 */
|
||||||
private String message = null; /* 처리 관련 메시지 */
|
private String message = null; /* 처리 관련 메시지 */
|
||||||
|
|
||||||
|
private String mobileVrfctNo = null; /* 본인확인 인증번호 */
|
||||||
|
private String mobileVrfctDd = null; /* 본인확인 인증번호 발송일자 */
|
||||||
/**
|
/**
|
||||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
||||||
* 로그인되지 않은 자(userId값이 존재하지 않는경우)에 대해서는 null을 리턴한다.
|
* 로그인되지 않은 자(userId값이 존재하지 않는경우)에 대해서는 null을 리턴한다.
|
||||||
@ -353,6 +357,24 @@ public class NlibLoginVO implements Serializable {
|
|||||||
public void setMessage(String message) {
|
public void setMessage(String message) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
public String getMobileVrfctNo() {
|
||||||
|
return mobileVrfctNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobileVrfctNo(String mobileVrfctNo) {
|
||||||
|
this.mobileVrfctNo = mobileVrfctNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMobileVrfctDd() {
|
||||||
|
return mobileVrfctDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobileVrfctDd(String mobileVrfctDd) {
|
||||||
|
this.mobileVrfctDd = mobileVrfctDd;
|
||||||
|
}
|
||||||
|
public String getEmailVrfctNo() {
|
||||||
|
return emailVrfctNo;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDmtProcDd() {
|
public String getDmtProcDd() {
|
||||||
return dmtProcDd;
|
return dmtProcDd;
|
||||||
@ -362,4 +384,16 @@ public class NlibLoginVO implements Serializable {
|
|||||||
this.dmtProcDd = dmtProcDd;
|
this.dmtProcDd = dmtProcDd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEmailVrfctNo(String emailVrfctNo) {
|
||||||
|
this.emailVrfctNo = emailVrfctNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmailVrfctDd() {
|
||||||
|
return emailVrfctDd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmailVrfctDd(String emailVrfctDd) {
|
||||||
|
this.emailVrfctDd = emailVrfctDd;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
|
|
||||||
package nlib.user.service.impl;
|
package nlib.user.service.impl;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthUniversalUser;
|
||||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
@ -31,5 +35,9 @@ public interface MemberDAO
|
|||||||
|
|
||||||
public DataApiResVO leaveMember(DataApiReqVO reqVO) throws Exception;
|
public DataApiResVO leaveMember(DataApiReqVO reqVO) throws Exception;
|
||||||
|
|
||||||
|
public void insertMemberSns(OAuthUniversalUser oauthUser);
|
||||||
|
|
||||||
|
public String selectAlreadySignUpId(OAuthUniversalUser oauthUser) throws Exception;
|
||||||
|
|
||||||
|
public List<NlibLoginVO> selectAlreadySignUpMobile(NlibLoginVO loginVO) throws Exception;
|
||||||
}
|
}
|
||||||
@ -3,6 +3,7 @@ package nlib.user.service.impl;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@ -10,11 +11,14 @@ import javax.annotation.Resource;
|
|||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthUniversalUser;
|
||||||
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
||||||
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
import nlib.restful.service.DataApiReqVO;
|
import nlib.restful.service.DataApiReqVO;
|
||||||
import nlib.restful.service.DataApiResVO;
|
import nlib.restful.service.DataApiResVO;
|
||||||
import nlib.user.service.MemberService;
|
import nlib.user.service.MemberService;
|
||||||
import nlib.user.service.NlibLoginVO;
|
import nlib.user.service.NlibLoginVO;
|
||||||
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
@Service("memberService")
|
@Service("memberService")
|
||||||
public class MemberServiceImpl implements MemberService
|
public class MemberServiceImpl implements MemberService
|
||||||
@ -25,7 +29,8 @@ public class MemberServiceImpl implements MemberService
|
|||||||
@Resource(name = "egovEnvPasswordEncoderService")
|
@Resource(name = "egovEnvPasswordEncoderService")
|
||||||
EgovPasswordEncoder egovPasswordEncoder;
|
EgovPasswordEncoder egovPasswordEncoder;
|
||||||
|
|
||||||
|
@Resource(name = "ariaCrypto")
|
||||||
|
AriaCrypto ariaCrypto;
|
||||||
|
|
||||||
public DataApiResVO selectMemberJoiningInfo(DataApiReqVO reqVO) {
|
public DataApiResVO selectMemberJoiningInfo(DataApiReqVO reqVO) {
|
||||||
return null;
|
return null;
|
||||||
@ -192,4 +197,26 @@ public class MemberServiceImpl implements MemberService
|
|||||||
return dummyPW;
|
return dummyPW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String selectAlreadySignUpId(OAuthUniversalUser oauthUser) throws Exception {
|
||||||
|
//이메일 암호화
|
||||||
|
oauthUser.setSnsEmail(ariaCrypto.encode(oauthUser.getSnsUserId()));
|
||||||
|
return memberDAO.selectAlreadySignUpId(oauthUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertMemberSns(OAuthUniversalUser oauthUser) {
|
||||||
|
//사용자 데이터 암호화
|
||||||
|
if(!(StringUtil.getString(oauthUser.getSnsBirthday(),"") == ""))
|
||||||
|
oauthUser.setSnsBirthday(ariaCrypto.encode(oauthUser.getSnsBirthday()));
|
||||||
|
if(!(StringUtil.getString(oauthUser.getSnsEmail(),"") == ""))
|
||||||
|
oauthUser.setSnsEmail(ariaCrypto.encode(oauthUser.getSnsEmail()));
|
||||||
|
if(!(StringUtil.getString(oauthUser.getSnsMobileNo(),"") == ""))
|
||||||
|
oauthUser.setSnsMobileNo(ariaCrypto.encode(oauthUser.getSnsMobileNo()));
|
||||||
|
memberDAO.insertMemberSns(oauthUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NlibLoginVO> selectAlreadySignUpMobile(NlibLoginVO loginVO) throws Exception {
|
||||||
|
loginVO.setMobileNo(ariaCrypto.encode(loginVO.getMobileNo()));
|
||||||
|
return memberDAO.selectAlreadySignUpMobile(loginVO);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -330,7 +330,6 @@ public class LoginController {
|
|||||||
redirectUrl = NlibProperty.getString("member.new.url"); // "/member/insertMemberInfoForm.do"
|
redirectUrl = NlibProperty.getString("member.new.url"); // "/member/insertMemberInfoForm.do"
|
||||||
return "redirect:" + redirectUrl;
|
return "redirect:" + redirectUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// 해당 처리기로 전환
|
// 해당 처리기로 전환
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import java.util.Map;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.inject.Inject;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
@ -34,6 +35,7 @@ import org.springframework.ui.Model;
|
|||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.util.LinkedMultiValueMap;
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@ -51,7 +53,14 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||||
import com.github.scribejava.core.model.OAuth2AccessToken;
|
import com.github.scribejava.core.model.OAuth2AccessToken;
|
||||||
|
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthConfig;
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthLogin;
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthUniversalUser;
|
||||||
|
import egovframework.com.ext.oauth.service.OAuthVO;
|
||||||
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
import egovframework.rte.fdl.cryptography.EgovPasswordEncoder;
|
||||||
|
import nlib.cmm.crypto.AriaCrypto;
|
||||||
|
import nlib.cmm.service.NlibProperty;
|
||||||
|
import nlib.cmm.session.SessionConfig;
|
||||||
import nlib.cmm.snslogin.GoogleOAuthResponse;
|
import nlib.cmm.snslogin.GoogleOAuthResponse;
|
||||||
import nlib.cmm.snslogin.KakaoController;
|
import nlib.cmm.snslogin.KakaoController;
|
||||||
import nlib.cmm.snslogin.NaverLoginBO;
|
import nlib.cmm.snslogin.NaverLoginBO;
|
||||||
@ -62,6 +71,7 @@ import nlib.restful.service.DataApiReqVO;
|
|||||||
import nlib.user.service.MemberService;
|
import nlib.user.service.MemberService;
|
||||||
import nlib.user.service.NlibLoginVO;
|
import nlib.user.service.NlibLoginVO;
|
||||||
import nlib.user.service.UserInfoService;
|
import nlib.user.service.UserInfoService;
|
||||||
|
import nlib.util.StringUtil;
|
||||||
|
|
||||||
import org.springframework.mail.javamail.JavaMailSender;
|
import org.springframework.mail.javamail.JavaMailSender;
|
||||||
|
|
||||||
@ -91,6 +101,19 @@ import org.springframework.mail.javamail.JavaMailSender;
|
|||||||
@Controller
|
@Controller
|
||||||
public class MemberController {
|
public class MemberController {
|
||||||
|
|
||||||
|
//-------------------------------------------
|
||||||
|
// SNS 연동 환경설정 정보 : context-oauth.xml 참고
|
||||||
|
//-------------------------------------------
|
||||||
|
@Inject
|
||||||
|
private OAuthVO naverAuthVO; /* 네이버 */
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OAuthVO googleAuthVO; /* 구글 */
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private OAuthVO kakaoAuthVO; /* 카카오 */
|
||||||
|
//-------------------------------------------
|
||||||
|
|
||||||
@Resource(name="userInfoService")
|
@Resource(name="userInfoService")
|
||||||
private UserInfoService userInfoService;
|
private UserInfoService userInfoService;
|
||||||
|
|
||||||
@ -162,50 +185,68 @@ public class MemberController {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 약관 동의화면
|
||||||
|
* @param req
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
@RequestMapping(value="/member/selectMemberJoiningInfo.do")
|
@RequestMapping(value="/member/selectMemberJoiningInfo.do")
|
||||||
public String selectMemberJoiningInfo(HttpServletRequest req,ModelMap model) {
|
public String selectMemberJoiningInfo(HttpServletRequest req,ModelMap model,HttpSession session) throws Exception {
|
||||||
return "/nlib/member/selectMemberJoiningInfo";
|
return "/nlib/member/selectMemberJoiningInfo";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value="/member/snsCertForm.do")
|
@RequestMapping(value="/member/snsCertForm.do")
|
||||||
public String snsCertForm(HttpSession session, Model model) throws Exception{
|
public String snsCertForm(HttpSession session,
|
||||||
// 네이버 로그인 URL 생성
|
HttpServletRequest req,
|
||||||
/* 네이버아이디로 인증 URL을 생성하기 위하여 naverLoginBO클래스의 getAuthorizationUrl메소드 호출 */
|
@RequestParam(required = false) String error,
|
||||||
naverLoginBO.setRedirect_url("http://nlib.nculture.org/nlib/member/naverCallback.do");
|
@RequestParam(required = false) String message,
|
||||||
String naverAuthUrl = naverLoginBO.getAuthorizationUrl(session);
|
Model model) throws Exception{
|
||||||
|
//----------------------------------------------
|
||||||
|
// SNS 연동 URL 생성
|
||||||
|
//----------------------------------------------
|
||||||
|
OAuthLogin naverLogin = new OAuthLogin(naverAuthVO, OAuthLogin.CALL_TYPE_MEMBER);
|
||||||
|
model.addAttribute("naverUrl", naverLogin.getOAuthURL());
|
||||||
|
|
||||||
// 구글 로그인 URL 생성
|
OAuthLogin googleLogin = new OAuthLogin(googleAuthVO, OAuthLogin.CALL_TYPE_MEMBER);
|
||||||
String googleUrl = "https://accounts.google.com/o/oauth2/v2/auth?"
|
model.addAttribute("googleUrl", googleLogin.getOAuthURL());
|
||||||
+ "client_id=879126511006-jro7bld7b2epl3n5mkksp0p24k2inbpu.apps.googleusercontent.com"
|
|
||||||
+ "&redirect_uri=http://nlib.nculture.org/nlib/member/googleCallback.do"
|
|
||||||
+ "&response_type=code"
|
|
||||||
+ "&scope=email%20profile%20openid"
|
|
||||||
+ "&access_type=offline";
|
|
||||||
|
|
||||||
// 카카오 로그인 URL 생성
|
OAuthLogin kakaoLogin = new OAuthLogin(kakaoAuthVO, OAuthLogin.CALL_TYPE_MEMBER);
|
||||||
String k_redirect_url="http://nlib.nculture.org/nlib/member/kakaoCallback.do";
|
model.addAttribute("kakaoUrl", kakaoLogin.getOAuthURL());
|
||||||
String kakaoUrl = KakaoController.getAuthorizationUrl(session,k_redirect_url);
|
|
||||||
|
|
||||||
model.addAttribute("naverUrl", naverAuthUrl);
|
model.addAttribute("error", error);
|
||||||
model.addAttribute("googleUrl", googleUrl);
|
model.addAttribute("message", message);
|
||||||
model.addAttribute("kakaoUrl", kakaoUrl);
|
|
||||||
return "nlib/member/snsCertForm";
|
return "nlib/member/snsCertForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 회원가입 폼
|
* 회원가입 폼
|
||||||
* @exception Exception
|
* @exception Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/insertMemberInfoForm.do")
|
@RequestMapping(value="/member/insertMemberInfoForm.do")
|
||||||
public String insertMemberInfoForm(HttpServletRequest request,NlibLoginVO vo,HttpSession session,ModelMap model ) throws Exception{
|
public String insertMemberInfoForm(HttpServletRequest request,NlibLoginVO vo,HttpSession session,ModelMap model ) throws Exception{
|
||||||
Map<String, ?> flashMap =RequestContextUtils.getInputFlashMap(request);
|
|
||||||
|
|
||||||
/*if(flashMap != null)
|
String jsessionId = session.getId();
|
||||||
|
//String councilCd = (String)session.getAttribute("councilCd");
|
||||||
|
//String councilReturnUrl = (String)session.getAttribute("councilReturnUrl");
|
||||||
|
OAuthUniversalUser oauthUser = SessionConfig.getNewMemberInfo(jsessionId);
|
||||||
|
|
||||||
|
String mId = null;
|
||||||
|
|
||||||
|
// 등록된 ID가 있는 지 확인
|
||||||
|
if(!(StringUtil.getString(oauthUser.getSnsUserId(),"")== ""))
|
||||||
|
mId =memberService.selectAlreadySignUpId(oauthUser);
|
||||||
|
|
||||||
|
/* 등록된 ID가 있을때 통합처리 */
|
||||||
|
if(!StringUtil.getString(mId, "").equals(""))
|
||||||
{
|
{
|
||||||
vo.setLoginUserId(String.valueOf(flashMap.get("email")));
|
oauthUser.setMbInfoId(mId);
|
||||||
}else {
|
memberService.insertMemberSns(oauthUser);
|
||||||
return "forward:/member/selectMemberJoiningInfo.do";
|
//통합처리 url
|
||||||
}*/
|
return "redirect:/member/accountConsolidationForm.do";
|
||||||
model.addAttribute("loginVO",vo);
|
}
|
||||||
|
model.addAttribute("loginVO",oauthUser);
|
||||||
return "nlib/member/insertMemberInfoForm";
|
return "nlib/member/insertMemberInfoForm";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +255,23 @@ public class MemberController {
|
|||||||
* @exception Exception
|
* @exception Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/insertMemberInfo.do")
|
@RequestMapping(value="/member/insertMemberInfo.do")
|
||||||
public String insertMemberInfo(NlibLoginVO vo) throws Exception{
|
public String insertMemberInfo(NlibLoginVO vo,ModelMap model) throws Exception{
|
||||||
|
List<NlibLoginVO> voList = new ArrayList<NlibLoginVO>();
|
||||||
|
// 등록된 전화번호가 있는 지 확인 (리스트)
|
||||||
|
voList = memberService.selectAlreadySignUpMobile(vo);
|
||||||
|
|
||||||
|
/* 등록된 ID가 있을때 통합처리 */
|
||||||
|
if(voList.size() > 0)
|
||||||
|
{
|
||||||
|
/* oauthUser.setMbInfoId(mId);
|
||||||
|
memberService.insertMemberSns(oauthUser);*/
|
||||||
|
//통합처리 url
|
||||||
|
System.out.println(voList.get(0).getEmail());
|
||||||
|
System.out.println(voList.get(0).getMbInfoId());
|
||||||
|
model.addAttribute("result",voList);
|
||||||
|
return "nlib/member/accountConsolidationForm";
|
||||||
|
}
|
||||||
|
|
||||||
//등록처리 요청 (data insert)
|
//등록처리 요청 (data insert)
|
||||||
memberService.insertMemberInfo(vo);
|
memberService.insertMemberInfo(vo);
|
||||||
|
|
||||||
@ -235,9 +292,7 @@ public class MemberController {
|
|||||||
for(String readLine : list) {
|
for(String readLine : list) {
|
||||||
contents+=readLine;
|
contents+=readLine;
|
||||||
}
|
}
|
||||||
/*contents=contents.replaceAll("[$]\\{userName\\}","유종선");*/
|
contents=contents.replace("${userName}",vo.getName());
|
||||||
contents=contents.replace("${userName}","유종선");
|
|
||||||
System.out.println(contents);
|
|
||||||
return "nlib/member/insertMemberInfoResult";
|
return "nlib/member/insertMemberInfoResult";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,8 +323,8 @@ public class MemberController {
|
|||||||
* 핸드폰 인증번호 확인
|
* 핸드폰 인증번호 확인
|
||||||
* @exception Exception
|
* @exception Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/member/phoneCertNumChk.ajax" , method=RequestMethod.POST)
|
@RequestMapping(value="/member/mobileCertNumChk.ajax" , method=RequestMethod.POST)
|
||||||
public @ResponseBody String phoneCertNumChk(HttpServletResponse response,HttpServletRequest request) throws Exception{
|
public @ResponseBody String mobileCertNumChk(HttpServletResponse response,HttpServletRequest request) throws Exception{
|
||||||
String mobileNo = request.getParameter("mobileNo");
|
String mobileNo = request.getParameter("mobileNo");
|
||||||
String mobileCertNum = request.getParameter("mobileCertNum");
|
String mobileCertNum = request.getParameter("mobileCertNum");
|
||||||
|
|
||||||
@ -362,32 +417,6 @@ public class MemberController {
|
|||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 회원가입 SNS 네이버인증
|
|
||||||
* @param model
|
|
||||||
* @param code
|
|
||||||
* @param state
|
|
||||||
* @param session
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
* @throws ParseException
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/member/naverCallback.do", method = { RequestMethod.GET, RequestMethod.POST })
|
|
||||||
public String naverCallback(Model model, @RequestParam String code, @RequestParam String state, HttpSession session,RedirectAttributes rttr)
|
|
||||||
throws IOException, ParseException {
|
|
||||||
OAuth2AccessToken oauthToken;
|
|
||||||
oauthToken = naverLoginBO.getAccessToken(session, code, state);
|
|
||||||
// 로그인 사용자 정보를 읽어온다.
|
|
||||||
apiResult = naverLoginBO.getUserProfile(oauthToken);
|
|
||||||
JSONParser parser = new JSONParser();
|
|
||||||
Object obj = parser.parse(apiResult);
|
|
||||||
JSONObject jsonObj = (JSONObject) obj;
|
|
||||||
JSONObject response_obj = (JSONObject) jsonObj.get("response");
|
|
||||||
String email = (String) response_obj.get("email");
|
|
||||||
rttr.addFlashAttribute("email",email);
|
|
||||||
/* 네이버 로그인 성공 페이지 View 호출 */
|
|
||||||
return "redirect:/member/insertMemberInfoForm.do";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 회원가입 SNS 구글인증
|
* 회원가입 SNS 구글인증
|
||||||
@ -437,67 +466,4 @@ public class MemberController {
|
|||||||
rttr.addFlashAttribute("email",userInfo.get("email"));
|
rttr.addFlashAttribute("email",userInfo.get("email"));
|
||||||
return "redirect:/member/insertMemberInfoForm.do";
|
return "redirect:/member/insertMemberInfoForm.do";
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/**
|
|
||||||
* 회원가입 SNS 카카오인증
|
|
||||||
* @param code
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @param session
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/member/kakaoCallback.do")
|
|
||||||
public String kakaoCallback(@RequestParam("code") String code, HttpServletRequest request, HttpServletResponse response, HttpSession session
|
|
||||||
,RedirectAttributes rttr)
|
|
||||||
throws Exception {
|
|
||||||
ModelAndView mav = new ModelAndView();
|
|
||||||
// 결과값을 node에 담아줌
|
|
||||||
String k_redirect_url="http://nlib.nculture.org/nlib/member/kakaoCallback.do";
|
|
||||||
JsonNode node = KakaoController.getAccessToken(code,k_redirect_url);
|
|
||||||
// accessToken에 사용자의 로그인한 모든 정보가 들어있음
|
|
||||||
JsonNode accessToken = node.get("access_token");
|
|
||||||
// 사용자의 정보
|
|
||||||
JsonNode userInfo = KakaoController.getKakaoUserInfo(accessToken);
|
|
||||||
String kemail = null;
|
|
||||||
String kname = null;
|
|
||||||
String kgender = null;
|
|
||||||
String kbirthday = null;
|
|
||||||
String kage = null;
|
|
||||||
String kimage = null;
|
|
||||||
// 유저정보 카카오에서 가져오기Get properties
|
|
||||||
JsonNode properties = userInfo.path("properties");
|
|
||||||
JsonNode kakao_account = userInfo.path("kakao_account");
|
|
||||||
kemail = kakao_account.path("email").asText();
|
|
||||||
kname = properties.path("nickname").asText();
|
|
||||||
kimage = properties.path("profile_image").asText();
|
|
||||||
kgender = kakao_account.path("gender").asText();
|
|
||||||
kbirthday = kakao_account.path("birthday").asText();
|
|
||||||
kage = kakao_account.path("age_range").asText();
|
|
||||||
session.setAttribute("kemail", kemail);
|
|
||||||
session.setAttribute("kname", kname);
|
|
||||||
session.setAttribute("kimage", kimage);
|
|
||||||
session.setAttribute("kgender", kgender);
|
|
||||||
session.setAttribute("kbirthday", kbirthday);
|
|
||||||
session.setAttribute("kage", kage);
|
|
||||||
mav.setViewName("main");
|
|
||||||
rttr.addFlashAttribute("email",kemail);
|
|
||||||
return "redirect:/member/insertMemberInfoForm.do";
|
|
||||||
}// end kakaoLogin()
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 주소검색 팝업
|
|
||||||
* @param request
|
|
||||||
* @param response
|
|
||||||
* @param session
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/popup/jusoPopup.do")
|
|
||||||
public String jusoPopup(HttpServletRequest request, HttpServletResponse response, HttpSession session)
|
|
||||||
throws Exception {
|
|
||||||
|
|
||||||
return "nlib/popup/jusoPopup";
|
|
||||||
}// end kakaoLogin()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,8 +12,10 @@
|
|||||||
<result column="REG_ID" property="regId"/>
|
<result column="REG_ID" property="regId"/>
|
||||||
<result column="MOD_ID" property="modId"/>
|
<result column="MOD_ID" property="modId"/>
|
||||||
<result column="MOBILE_NO" property="mobileNo"/>
|
<result column="MOBILE_NO" property="mobileNo"/>
|
||||||
|
<result column="EMAIL" property="email"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 회원가입 -->
|
||||||
<insert id="insertMemberInfo" parameterType="nlib.user.service.NlibLoginVO">
|
<insert id="insertMemberInfo" parameterType="nlib.user.service.NlibLoginVO">
|
||||||
<selectKey resultType="string" keyProperty="userId" order="BEFORE">
|
<selectKey resultType="string" keyProperty="userId" order="BEFORE">
|
||||||
SELECT CONCAT(LEFT(MAX(USER_ID),2),
|
SELECT CONCAT(LEFT(MAX(USER_ID),2),
|
||||||
@ -25,6 +27,8 @@
|
|||||||
VALUES
|
VALUES
|
||||||
(#{userId},#{loginUserId},'N',#{userNm},#{userPwd},#{birthdate},#{gender},#{telNo},#{zipcode},#{addr1},#{addr2},#{userId},#{userId})
|
(#{userId},#{loginUserId},'N',#{userNm},#{userPwd},#{birthdate},#{gender},#{telNo},#{zipcode},#{addr1},#{addr2},#{userId},#{userId})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<!-- 비밀번호 변경 -->
|
||||||
<update id="changePassword" parameterType="nlib.user.service.NlibLoginVO">
|
<update id="changePassword" parameterType="nlib.user.service.NlibLoginVO">
|
||||||
UPDATE
|
UPDATE
|
||||||
TMP_SM_USER
|
TMP_SM_USER
|
||||||
@ -32,10 +36,83 @@
|
|||||||
USER_PWD=#{userPwd}
|
USER_PWD=#{userPwd}
|
||||||
,MOD_ID = #{userId}
|
,MOD_ID = #{userId}
|
||||||
,MOD_DD = SYSDATE()
|
,MOD_DD = SYSDATE()
|
||||||
|
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
AND LOGIN_USER_ID = #{loginUserId}
|
AND LOGIN_USER_ID = #{loginUserId}
|
||||||
AND TEL_NO = #{telNo}
|
AND TEL_NO = #{telNo}
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
<!-- 회원가입시 SNS인증한 계정 ID와 일치하는 계정이 있는지 체크 -->
|
||||||
|
<select id="selectAlreadySignUpId" parameterType="egovframework.com.ext.oauth.service.OAuthUniversalUser" resultType="String">
|
||||||
|
SELECT
|
||||||
|
MB_INFO_ID
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
MB_INFO_ID
|
||||||
|
,LOGIN_USER_ID
|
||||||
|
,EMAIL
|
||||||
|
FROM
|
||||||
|
MB_INFO
|
||||||
|
WHERE 1=1
|
||||||
|
AND (LOGIN_USER_ID = #{snsUserId} OR EMAIL = #{snsEmail})
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
MB_INFO_ID
|
||||||
|
,SNS_USER_ID LOGIN_USER_ID
|
||||||
|
,"" EMAIL
|
||||||
|
FROM
|
||||||
|
MB_SNS
|
||||||
|
WHERE 1=1
|
||||||
|
AND SNS_USER_ID = #{snsUserId}
|
||||||
|
) MB
|
||||||
|
GROUP BY MB_INFO_ID
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 회원가입시 입력한 휴대폰번호와 일치하는 계정이 있는지 체크 -->
|
||||||
|
<select id="selectAlreadySignUpMobile" parameterType="nlib.user.service.NlibLoginVO" resultMap="NlibLoginVO">
|
||||||
|
SELECT
|
||||||
|
MB_INFO_ID
|
||||||
|
,LOGIN_USER_ID
|
||||||
|
,EMAIL
|
||||||
|
FROM
|
||||||
|
MB_INFO
|
||||||
|
WHERE 1=1
|
||||||
|
AND MOBILE_NO = #{mobileNo}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 기존 계정 ID와 일치시 통합처리 -->
|
||||||
|
<insert id="insertMemberSns" parameterType="egovframework.com.ext.oauth.service.OAuthUniversalUser">
|
||||||
|
INSERT INTO
|
||||||
|
MB_SNS
|
||||||
|
(
|
||||||
|
MB_INFO_ID
|
||||||
|
,SNS_TYPE
|
||||||
|
,SNS_ID
|
||||||
|
,SNS_NAME
|
||||||
|
,SNS_NICK_NAME
|
||||||
|
,SNS_USER_ID
|
||||||
|
,SNS_GENDER
|
||||||
|
,SNS_BIRTHDAY
|
||||||
|
,SNS_EMAIL
|
||||||
|
,SNS_MOBILE_NO
|
||||||
|
,REG_DD
|
||||||
|
,UNLINK_DD
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
#{mbInfoId}
|
||||||
|
,#{snsType}
|
||||||
|
,#{snsId}
|
||||||
|
,#{snsName}
|
||||||
|
,{snsNickName}
|
||||||
|
,#{snsUserId}
|
||||||
|
,#{snsGender}
|
||||||
|
,#{snsBirthday}
|
||||||
|
,#{snsEmail}
|
||||||
|
,#{snsMobileNo}
|
||||||
|
,#{mbInfoId}
|
||||||
|
,NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
|
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function signUp(){
|
function signUp(){
|
||||||
location.href="${pageContext.request.contextPath}/member/selectMemberJoiningInfo.do";
|
location.href="${pageContext.request.contextPath}/login/loginCouncil.do?callType=member";
|
||||||
}
|
}
|
||||||
function findInfo(){
|
function findInfo(){
|
||||||
location.href="${pageContext.request.contextPath}/member/initPasswordForm.do";
|
location.href="${pageContext.request.contextPath}/member/initPasswordForm.do";
|
||||||
|
|||||||
@ -0,0 +1,47 @@
|
|||||||
|
<%
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* @Class Name : accountConsolidationForm.jsp
|
||||||
|
*
|
||||||
|
* @Description : 계정통합처리 알림폼
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 수정일 수정자 수정내용
|
||||||
|
* @ ------------ -------- ---------------------------
|
||||||
|
* @ 2021. 9. 1. JSYOO 최초 생성
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
||||||
|
* @since 2021. 9. 1.
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>계정이 통합되었습니다.</h1>
|
||||||
|
<c:forEach items="${result}" var="result">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><c:out value="${result.mbInfoId}"/></td>
|
||||||
|
<td><c:out value="${result.loginUserId}"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -35,7 +35,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>${pageTitle} <spring:message code="title.create" /></title>
|
<title>${pageTitle} <spring:message code="title.create" /></title>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
|
|
||||||
<script type="text/javaScript" language="javascript" defer="defer">
|
<script type="text/javaScript" language="javascript" defer="defer">
|
||||||
function signUp(){
|
function signUp(){
|
||||||
var p = document.getElementById('password');
|
var p = document.getElementById('password');
|
||||||
@ -77,15 +76,29 @@ function signUp(){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function goPopup(){
|
|
||||||
// 주소검색을 수행할 팝업 페이지를 호출합니다.
|
|
||||||
// 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(http://www.juso.go.kr/addrlink/addrLinkUrl.do)를 호출하게 됩니다.
|
|
||||||
var pop = window.open("/nlib/popup/jusoPopup.do","pop","width=570,height=420, scrollbars=yes, resizable=yes");
|
|
||||||
|
|
||||||
// 모바일 웹인 경우, 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(http://www.juso.go.kr/addrlink/addrMobileLinkUrl.do)를 호출하게 됩니다.
|
|
||||||
//var pop = window.open("/popup/jusoPopup.jsp","pop","scrollbars=yes, resizable=yes");
|
|
||||||
}
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
$("input:radio[name='gender']:radio[value='${loginVO.snsGender}']").prop('checked', true);
|
||||||
|
|
||||||
|
var birthday="${loginVO.snsBirthday}";
|
||||||
|
|
||||||
|
if(!birthday == "")
|
||||||
|
{
|
||||||
|
var birth_yy =birthday.substr(0,4);
|
||||||
|
var birth_mm =birthday.substr(4,2);
|
||||||
|
var birth_dd =birthday.substr(6,2);
|
||||||
|
|
||||||
|
if(birth_dd.substr(0,1) == "0")
|
||||||
|
{
|
||||||
|
birth_dd = birth_dd.substr(1,1)
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#birth_yy").val(birth_yy)
|
||||||
|
$("#birth_mm").val(birth_mm).prop("selected", true);
|
||||||
|
$("#birth_dd").val(birth_dd)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
//핸드폰 번호가 변하는것 실시간 감지
|
//핸드폰 번호가 변하는것 실시간 감지
|
||||||
%>
|
%>
|
||||||
@ -186,14 +199,6 @@ function certNumCheck(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function jusoCallBack(zipNo,roadAddrPart,addrDetail){
|
|
||||||
// 팝업페이지에서 주소입력한 정보를 받아서, 현 페이지에 정보를 등록합니다.
|
|
||||||
$("#zipCode").val(zipNo);
|
|
||||||
$("#address").val(roadAddrPart);
|
|
||||||
$("#addressDetail").val(addrDetail);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if (event.keyCode === 13) {
|
if (event.keyCode === 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -365,14 +370,14 @@ label.error {
|
|||||||
<tr>
|
<tr>
|
||||||
<td id="title">아이디</td>
|
<td id="title">아이디</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="email" id="loginUserId" name="loginUserId" maxlength="30" required value="<c:out value="${loginVO.loginUserId}"/>" ><button type="button" id="getEmailCert" name="getEmailCert" style="text-align:left;display:none;" class="btn-warning" onclick="emailCert()" required>인증번호 받기</button>
|
<input type="email" id="loginUserId" name="loginUserId" maxlength="30" required value="<c:out value="${loginVO.snsUserId}"/>" ><button type="button" id="getEmailCert" name="getEmailCert" style="text-align:left;display:none;" class="btn-warning" onclick="emailCert()" required>인증번호 받기</button>
|
||||||
<div id="phoneCertForm" style="display:none;"><br><input type='text' id='phoneCertNum' name='phoneCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
<div id="phoneCertForm" style="display:none;"><br><input type='text' id='phoneCertNum' name='phoneCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="title">이름</td>
|
<td id="title">이름</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="name" name="name" maxlength="20" required >
|
<input type="text" id="name" name="name" maxlength="20" value="<c:out value="${loginVO.snsName}"/>" required >
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -424,15 +429,15 @@ label.error {
|
|||||||
<tr>
|
<tr>
|
||||||
<td id="title">주소</td>
|
<td id="title">주소</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" id="zipCode" name="zipCode" ><button type="button" style="text-align:left;" class="btn-warning" onclick="goPopup()">주소검색</button><br>
|
<input type="text" id="zipCode" name="zipCode" readonly><button type="button" style="text-align:left;" class="btn-warning" onclick="sample6_execDaumPostcode()">주소검색</button><br>
|
||||||
<input type="text" id="address" name="address" ><input type="text" id="addressDetail" name="addressDetail" >
|
<input type="text" id="address" name="address" readonly><input type="text" id="addressDetail" name="addressDetail" >
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td id="title">휴대전화</td>
|
<td id="title">휴대전화</td>
|
||||||
<td id="Cert">
|
<td id="Cert">
|
||||||
<input type="text" id="mobileNo" name="mobileNo" required ><button type="button" style="text-align:left;" class="btn-warning" onclick="mobileCert()" required>인증번호 받기</button>
|
<input type="text" id="mobileNo" name="mobileNo" value="<c:out value="${loginVO.snsMobileNo}"/>" required ><button type="button" style="text-align:left;" class="btn-warning" onclick="mobileCert()" required>인증번호 받기</button>
|
||||||
<div id="mobileCertForm" style="display:none;"><br><input type='text' id='mobileCertNum' name='mobileCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
<div id="mobileCertForm" style="display:none;"><br><input type='text' id='mobileCertNum' name='mobileCertNum'> <button type='button' style='text-align:left;' class='btn-warning' onclick='certNumCheck()' >인증번호 확인</button></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -445,6 +450,34 @@ label.error {
|
|||||||
<input type="submit" value="가입"/>
|
<input type="submit" value="가입"/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script src="//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"></script>
|
||||||
|
<script>
|
||||||
|
function sample6_execDaumPostcode() {
|
||||||
|
new daum.Postcode({
|
||||||
|
oncomplete: function(data) {
|
||||||
|
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
||||||
|
|
||||||
|
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
||||||
|
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
||||||
|
var addr = ''; // 주소 변수
|
||||||
|
var extraAddr = ''; // 참고항목 변수
|
||||||
|
|
||||||
|
//사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
|
||||||
|
if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
|
||||||
|
addr = data.roadAddress;
|
||||||
|
} else { // 사용자가 지번 주소를 선택했을 경우(J)
|
||||||
|
addr = data.jibunAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 우편번호와 주소 정보를 해당 필드에 넣는다.
|
||||||
|
document.getElementById('zipCode').value = data.zonecode;
|
||||||
|
document.getElementById("address").value = addr;
|
||||||
|
// 커서를 상세주소 필드로 이동한다.
|
||||||
|
document.getElementById("addressDetail").focus();
|
||||||
|
}
|
||||||
|
}).open();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
function snsCertForm(){
|
function snsCertForm(){
|
||||||
if(document.getElementById('agree').checked)
|
if(document.getElementById('agree').checked)
|
||||||
{
|
{
|
||||||
location.href="${pageContext.request.contextPath}/member/snsCertForm.do";
|
location.href="${pageContext.request.contextPath}/member/insertMemberInfoForm.do";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert("약관에 동의해주세요");
|
alert("약관에 동의해주세요");
|
||||||
|
|||||||
@ -1,76 +0,0 @@
|
|||||||
<%
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* @Class Name : jusoPopup.jsp
|
|
||||||
*
|
|
||||||
* @Description : 주소 API
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 2021. 7. 12. JSYOO 최초 생성
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
|
||||||
* @since 2021. 7. 12.
|
|
||||||
* @version 1.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
%>
|
|
||||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<title>Insert title here</title>
|
|
||||||
<%
|
|
||||||
request.setCharacterEncoding("UTF-8"); //한글깨지면 주석제거
|
|
||||||
//request.setCharacterEncoding("EUC-KR"); //해당시스템의 인코딩타입이 EUC-KR일경우에
|
|
||||||
String inputYn = request.getParameter("inputYn");
|
|
||||||
String zipNo = request.getParameter("zipNo");
|
|
||||||
String roadAddrPart1 = request.getParameter("roadAddrPart1");
|
|
||||||
String roadAddrPart2 = request.getParameter("roadAddrPart2");
|
|
||||||
String addrDetail = request.getParameter("addrDetail");
|
|
||||||
|
|
||||||
%>
|
|
||||||
</head>
|
|
||||||
<script language="javascript">
|
|
||||||
// opener관련 오류가 발생하는 경우 아래 주석을 해지하고, 사용자의 도메인정보를 입력합니다. ("주소입력화면 소스"도 동일하게 적용시켜야 합니다.)
|
|
||||||
//document.domain = "abc.go.kr";
|
|
||||||
|
|
||||||
function init(){
|
|
||||||
var url = location.href;
|
|
||||||
var confmKey = "devU01TX0FVVEgyMDIxMDgxOTEwMTkxNjExMTU0MTU=";
|
|
||||||
var resultType = "4"; // 도로명주소 검색결과 화면 출력내용, 1 : 도로명, 2 : 도로명+지번, 3 : 도로명+상세건물명, 4 : 도로명+지번+상세건물명
|
|
||||||
var inputYn= "<%=inputYn%>";
|
|
||||||
if(inputYn != "Y"){
|
|
||||||
document.form.confmKey.value = confmKey;
|
|
||||||
document.form.returnUrl.value = url;
|
|
||||||
document.form.resultType.value = resultType;
|
|
||||||
document.form.action="http://www.juso.go.kr/addrlink/addrLinkUrl.do"; //인터넷망
|
|
||||||
//document.form.action="http://www.juso.go.kr/addrlink/addrMobileLinkUrl.do"; //모바일 웹인 경우, 인터넷망
|
|
||||||
document.form.submit();
|
|
||||||
}else{
|
|
||||||
opener.jusoCallBack("<%=zipNo%>","<%=roadAddrPart1+roadAddrPart2%>","<%=addrDetail%>");
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<body onload="init();">
|
|
||||||
<form id="form" name="form" method="post">
|
|
||||||
<input type="hidden" id="confmKey" name="confmKey" value=""/>
|
|
||||||
<input type="hidden" id="returnUrl" name="returnUrl" value=""/>
|
|
||||||
<input type="hidden" id="resultType" name="resultType" value=""/>
|
|
||||||
<!-- 해당시스템의 인코딩타입이 EUC-KR일경우에만 추가 START-->
|
|
||||||
<!--
|
|
||||||
<input type="hidden" id="encodingType" name="encodingType" value="EUC-KR"/>
|
|
||||||
-->
|
|
||||||
<!-- 해당시스템의 인코딩타입이 EUC-KR일경우에만 추가 END-->
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -106,15 +106,6 @@ function update(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function goPopup(){
|
|
||||||
// 주소검색을 수행할 팝업 페이지를 호출합니다.
|
|
||||||
// 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(http://www.juso.go.kr/addrlink/addrLinkUrl.do)를 호출하게 됩니다.
|
|
||||||
var pop = window.open("/nlib/popup/jusoPopup.do","pop","width=570,height=420, scrollbars=yes, resizable=yes");
|
|
||||||
|
|
||||||
// 모바일 웹인 경우, 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(http://www.juso.go.kr/addrlink/addrMobileLinkUrl.do)를 호출하게 됩니다.
|
|
||||||
//var pop = window.open("/popup/jusoPopup.jsp","pop","scrollbars=yes, resizable=yes");
|
|
||||||
}
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
//핸드폰 인증번호 받기
|
//핸드폰 인증번호 받기
|
||||||
%>
|
%>
|
||||||
@ -171,14 +162,6 @@ function certNumCheck(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function jusoCallBack(zipNo,roadAddrPart,addrDetail){
|
|
||||||
// 팝업페이지에서 주소입력한 정보를 받아서, 현 페이지에 정보를 등록합니다.
|
|
||||||
$("#zipCode").val(zipNo);
|
|
||||||
$("#address").val(roadAddrPart);
|
|
||||||
$("#addressDetail").val(addrDetail);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('keydown', function(event) {
|
document.addEventListener('keydown', function(event) {
|
||||||
if (event.keyCode === 13) {
|
if (event.keyCode === 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@ -428,5 +411,4 @@ label.error {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@ -31,7 +31,7 @@ String councilNm = (String)session.getAttribute("councilCd");
|
|||||||
</sec:authorize>
|
</sec:authorize>
|
||||||
<sec:authorize access="not isAuthenticated()">
|
<sec:authorize access="not isAuthenticated()">
|
||||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/user/member/searchIdForm.do';">ID/PW찾기</a></li>
|
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/user/member/searchIdForm.do';">ID/PW찾기</a></li>
|
||||||
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/login/loginForm.do';">회원가입</a></li>
|
<li><a href="javascript:void(0)" onclick="javascript:location.href='${pageContext.request.contextPath}/login/loginCouncil.do?callType=member';">회원가입</a></li>
|
||||||
</sec:authorize>
|
</sec:authorize>
|
||||||
<li>
|
<li>
|
||||||
<sec:authorize access="isAuthenticated()">
|
<sec:authorize access="isAuthenticated()">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user