NlibLoginVO DB테이블 변경에 따른 수정에 의해 관련 함수 RENAME처리
This commit is contained in:
parent
3be105a8ac
commit
37949b70f7
@ -465,7 +465,7 @@ public class BoardController extends NlibCommonController
|
||||
addParamsToModel(paramMap, model);
|
||||
|
||||
NlibLoginVO loginVO = getNlibLoginVO(authentication);
|
||||
if(StringUtil.isEmpty(paramMap.get("regUserName"))) model.addAttribute("regUserName", loginVO.getUserNm());
|
||||
if(StringUtil.isEmpty(paramMap.get("regUserName"))) model.addAttribute("regUserName", loginVO.getName());
|
||||
if(StringUtil.isEmpty(paramMap.get("email"))) model.addAttribute("regUserName", loginVO.getEmail());
|
||||
|
||||
return "nlib/board/insertQnAForm";
|
||||
|
||||
@ -99,7 +99,7 @@ public class NlibCommonController {
|
||||
String authKey = null;
|
||||
|
||||
if(authentication != null) {
|
||||
userId = ((NlibLoginVO)authentication.getPrincipal()).getUserId();
|
||||
userId = ((NlibLoginVO)authentication.getPrincipal()).getMbInfoId();
|
||||
}
|
||||
|
||||
authKey = makeAuthKey(userId, request.getSession().getId());
|
||||
|
||||
@ -127,7 +127,7 @@ public class QRCodeUtil {
|
||||
throw new Exception("QR 2D바코드로 생성할 사용자 정보가 없습니다.");
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(loginVO.getUserId())) {
|
||||
if(StringUtil.isEmpty(loginVO.getMbInfoId())) {
|
||||
throw new Exception("QR 2D바코드로 생성에 필요한 사용자고유번호 정보가 없습니다.");
|
||||
}
|
||||
|
||||
@ -135,15 +135,15 @@ public class QRCodeUtil {
|
||||
throw new Exception("QR 2D바코드로 생성에 필요한 이메일 정보가 없습니다.");
|
||||
}
|
||||
|
||||
if(StringUtil.isEmpty(loginVO.getUserNm())) {
|
||||
if(StringUtil.isEmpty(loginVO.getName())) {
|
||||
throw new Exception("QR 2D바코드로 생성에 필요한 이름 정보가 없습니다.");
|
||||
}
|
||||
|
||||
// (1) "사용자고유번호;이메일;이름;" 형식으로 문자열을 구성
|
||||
String barcodeText = String.format("%s;%s;%s;"
|
||||
, loginVO.getUserId()
|
||||
, loginVO.getMbInfoId()
|
||||
, loginVO.getEmail()
|
||||
, loginVO.getUserNm());
|
||||
, loginVO.getName());
|
||||
log.debug("generateMemberQRCodeImage : barcodeText=" + barcodeText);
|
||||
|
||||
// (2) 앞의 (1)의 문자열을 암호화 처리
|
||||
@ -180,9 +180,9 @@ public class QRCodeUtil {
|
||||
|
||||
NlibLoginVO info = new NlibLoginVO();
|
||||
|
||||
info.setUserId(split[0]);
|
||||
info.setMbInfoId(split[0]);
|
||||
info.setEmail(split[1]);
|
||||
info.setUserNm(split[2]);
|
||||
info.setName(split[2]);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
@ -47,9 +47,9 @@ public class BarcodeController {
|
||||
|
||||
log.debug("getMemberQRCodeForm : loginVO=" + loginVO.toString());
|
||||
|
||||
if(StringUtil.isEmpty(loginVO.getUserId())) loginVO.setUserId("USER0001-000001");
|
||||
if(StringUtil.isEmpty(loginVO.getMbInfoId())) loginVO.setMbInfoId("USER0001-000001");
|
||||
if(StringUtil.isEmpty(loginVO.getEmail())) loginVO.setEmail("myid@digitalship.co.kr");
|
||||
if(StringUtil.isEmpty(loginVO.getUserNm())) loginVO.setUserNm("홍길동");
|
||||
if(StringUtil.isEmpty(loginVO.getName())) loginVO.setName("홍길동");
|
||||
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ public class SecUserVO extends NlibLoginVO implements UserDetails {
|
||||
*/
|
||||
@Override
|
||||
public String getPassword() {
|
||||
return super.getUserPwd();
|
||||
return super.getPassword();
|
||||
}
|
||||
|
||||
/* 계정의 이름을 리턴한다. (사용자ID:email형식의 LOGIN_USER_ID 정보)
|
||||
|
||||
@ -22,6 +22,7 @@ import nlib.util.StringUtil;
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 2021. 7. 12. JSYOO 최초 생성
|
||||
* @ 2021. 8. 17. KNKIM DB컬럼명으로 변경 처리
|
||||
* @ 2021. 8. 24. KNKIM 테이블 변경에 따른 컬럼명 전체 변경
|
||||
*
|
||||
* @author 이씨플라자 * DIGITALSHIP JSYOO
|
||||
* @since 2021. 7. 12.
|
||||
@ -32,31 +33,41 @@ public class NlibLoginVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8274004534207618049L;
|
||||
|
||||
private String userId; /* 사용자아이디 (ex: U1000000001) */
|
||||
/* MB_INFO : 소장자료관 회원 관련 */
|
||||
private String mbInfoId; /* 회원아이디 (ex: M1000000001) */
|
||||
private String loginUserId; /* 로그인사용자ID (이메일주소) */
|
||||
private String deptSeq; /* 조직코드 */
|
||||
private String deptNm; /* 조직명 */
|
||||
private String userNm; /* 사용자명 */
|
||||
private String userPwd; /* 비밀번호 */
|
||||
private String telNo; /* 전화번호 */
|
||||
private String zipcode; /* 우편번호 (변경예정) */
|
||||
private String addr1; /* 주소1 (변경예정) */
|
||||
private String addr2; /* 주소2 (변경예정) */
|
||||
private String name; /* 사용자명 */
|
||||
private String mobileNo; /* 휴대전화번호 */
|
||||
private String password; /* 비밀번호 */
|
||||
private String email; /* 이메일 */
|
||||
private String gender; /* 성별(M:남자,F:여자) */
|
||||
private String zipCode; /* 우편번호 */
|
||||
private String address; /* 주소 */
|
||||
private String addressDetail; /* 상세주소 */
|
||||
private String birthday; /* 생년월일 */
|
||||
private String status; /* 상태 : S정상, D탈퇴, P휴면 */
|
||||
private String joinDate; /* 가입일자 (YYYYMMDD) */
|
||||
private String verificationDd; /* 본인확인일시 (YYYYMMDDHHMISS) */
|
||||
private String lastAccessDd; /* 마지막접근일시 (YYYYMMDDHHMISS) */
|
||||
private String leaveSiteDate; /* 탈퇴일자 (YYYYMMDD) */
|
||||
private String regId; /* 등록자 */
|
||||
private String regDd; /* 등록일자 */
|
||||
private String modId; /* 수정자 */
|
||||
private String modDd; /* 수정일자 */
|
||||
private String email; /* 이메일 */
|
||||
private String mobileNo; /* 모바일 */
|
||||
|
||||
private String birthdate; /* 생년월일 */
|
||||
private String gender; /* 성별(M:남자,F:여자) */
|
||||
/* MB_SITE : 로그인된 문화원정보 관련 */
|
||||
private String joinType; /* 가입유형 : SNS 및 로그인을 연계하는 포털시스템 아이디(naver, daum 등) */
|
||||
private String joinCouncilCd; /* 가입문화원코드 */
|
||||
private String joinCouncilNm; /* 가입문화원명 */
|
||||
|
||||
private String authKey; /* 로그인 인증키 */
|
||||
private String loginSucsYn; /* 로그인성공여부 */
|
||||
private String accIp; /* 접속IP */
|
||||
/* MB_SNS : 회원SNS 관련 */
|
||||
private String snsType; /* SNS유형 */
|
||||
private String snsId; /* SNS식별코드 */
|
||||
|
||||
/* 보완 및 기타 사항 */
|
||||
private String ip; /* 접속IP */
|
||||
private String authorityList; /* 권한ROLE 리스트 */
|
||||
private String authKey; /* RESTful API : 접속인증코드 */
|
||||
|
||||
/**
|
||||
* 로그인인증키값을 리턴한다. 만일 존재하지 않을 경우, userId를 기반으로 인증키를 생성하여 리턴한다.
|
||||
@ -65,7 +76,7 @@ public class NlibLoginVO implements Serializable {
|
||||
* @return
|
||||
*/
|
||||
public String getAndCreateAuthKey() {
|
||||
return getAndCreateAuthKey(null);
|
||||
return getOrCreateAuthKey(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -74,11 +85,12 @@ public class NlibLoginVO implements Serializable {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getAndCreateAuthKey(String sessionId) {
|
||||
public String getOrCreateAuthKey(String sessionId) {
|
||||
|
||||
if(StringUtil.isNotEmpty(this.authKey)) return this.authKey;
|
||||
|
||||
// AuthKey 생성하여 리턴
|
||||
this.authKey = NlibCommonController.makeAuthKey(this.userId, sessionId);
|
||||
this.authKey = NlibCommonController.makeAuthKey(this.mbInfoId, sessionId);
|
||||
return this.authKey;
|
||||
}
|
||||
|
||||
@ -86,13 +98,13 @@ public class NlibLoginVO implements Serializable {
|
||||
//----------------------------------------------------------------
|
||||
// SETTER.GETTER
|
||||
//----------------------------------------------------------------
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
|
||||
public String getMbInfoId() {
|
||||
return mbInfoId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
public void setMbInfoId(String mbInfoId) {
|
||||
this.mbInfoId = mbInfoId;
|
||||
}
|
||||
|
||||
public String getLoginUserId() {
|
||||
@ -103,72 +115,76 @@ public class NlibLoginVO implements Serializable {
|
||||
this.loginUserId = loginUserId;
|
||||
}
|
||||
|
||||
public String getDeptSeq() {
|
||||
return deptSeq;
|
||||
}
|
||||
|
||||
public void setDeptSeq(String deptSeq) {
|
||||
this.deptSeq = deptSeq;
|
||||
}
|
||||
|
||||
public String getDeptNm() {
|
||||
return deptNm;
|
||||
}
|
||||
|
||||
public void setDeptNm(String deptNm) {
|
||||
this.deptNm = deptNm;
|
||||
}
|
||||
|
||||
public String getUserNm() {
|
||||
return userNm;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return userNm;
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setUserNm(String userNm) {
|
||||
this.userNm = userNm;
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUserPwd() {
|
||||
return userPwd;
|
||||
public String getMobileNo() {
|
||||
return mobileNo;
|
||||
}
|
||||
|
||||
public void setUserPwd(String userPwd) {
|
||||
this.userPwd = userPwd;
|
||||
public void setMobileNo(String mobileNo) {
|
||||
this.mobileNo = mobileNo;
|
||||
}
|
||||
|
||||
public String getTelNo() {
|
||||
return telNo;
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setTelNo(String telNo) {
|
||||
this.telNo = telNo;
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getZipcode() {
|
||||
return zipcode;
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setZipcode(String zipcode) {
|
||||
this.zipcode = zipcode;
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getAddr1() {
|
||||
return addr1;
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setAddr1(String addr1) {
|
||||
this.addr1 = addr1;
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getAddr2() {
|
||||
return addr2;
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
|
||||
public void setAddr2(String addr2) {
|
||||
this.addr2 = addr2;
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddressDetail() {
|
||||
return addressDetail;
|
||||
}
|
||||
|
||||
public void setAddressDetail(String addressDetail) {
|
||||
this.addressDetail = addressDetail;
|
||||
}
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
@ -179,6 +195,38 @@ public class NlibLoginVO implements Serializable {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getJoinDate() {
|
||||
return joinDate;
|
||||
}
|
||||
|
||||
public void setJoinDate(String joinDate) {
|
||||
this.joinDate = joinDate;
|
||||
}
|
||||
|
||||
public String getVerificationDd() {
|
||||
return verificationDd;
|
||||
}
|
||||
|
||||
public void setVerificationDd(String verificationDd) {
|
||||
this.verificationDd = verificationDd;
|
||||
}
|
||||
|
||||
public String getLastAccessDd() {
|
||||
return lastAccessDd;
|
||||
}
|
||||
|
||||
public void setLastAccessDd(String lastAccessDd) {
|
||||
this.lastAccessDd = lastAccessDd;
|
||||
}
|
||||
|
||||
public String getLeaveSiteDate() {
|
||||
return leaveSiteDate;
|
||||
}
|
||||
|
||||
public void setLeaveSiteDate(String leaveSiteDate) {
|
||||
this.leaveSiteDate = leaveSiteDate;
|
||||
}
|
||||
|
||||
public String getRegId() {
|
||||
return regId;
|
||||
}
|
||||
@ -211,36 +259,60 @@ public class NlibLoginVO implements Serializable {
|
||||
this.modDd = modDd;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
public String getJoinType() {
|
||||
return joinType;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
public void setJoinType(String joinType) {
|
||||
this.joinType = joinType;
|
||||
}
|
||||
|
||||
public String getMobileNo() {
|
||||
return mobileNo;
|
||||
public String getJoinCouncilCd() {
|
||||
return joinCouncilCd;
|
||||
}
|
||||
|
||||
public void setMobileNo(String mobileNo) {
|
||||
this.mobileNo = mobileNo;
|
||||
public void setJoinCouncilCd(String joinCouncilCd) {
|
||||
this.joinCouncilCd = joinCouncilCd;
|
||||
}
|
||||
|
||||
public String getBirthdate() {
|
||||
return birthdate;
|
||||
public String getJoinCouncilNm() {
|
||||
return joinCouncilNm;
|
||||
}
|
||||
|
||||
public void setBirthdate(String birthdate) {
|
||||
this.birthdate = birthdate;
|
||||
public void setJoinCouncilNm(String joinCouncilNm) {
|
||||
this.joinCouncilNm = joinCouncilNm;
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
public String getSnsType() {
|
||||
return snsType;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender;
|
||||
public void setSnsType(String snsType) {
|
||||
this.snsType = snsType;
|
||||
}
|
||||
|
||||
public String getSnsId() {
|
||||
return snsId;
|
||||
}
|
||||
|
||||
public void setSnsId(String snsId) {
|
||||
this.snsId = snsId;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getAuthorityList() {
|
||||
return authorityList;
|
||||
}
|
||||
|
||||
public void setAuthorityList(String authorityList) {
|
||||
this.authorityList = authorityList;
|
||||
}
|
||||
|
||||
public String getAuthKey() {
|
||||
@ -251,28 +323,4 @@ public class NlibLoginVO implements Serializable {
|
||||
this.authKey = authKey;
|
||||
}
|
||||
|
||||
public String getLoginSucsYn() {
|
||||
return loginSucsYn;
|
||||
}
|
||||
|
||||
public void setLoginSucsYn(String loginSucsYn) {
|
||||
this.loginSucsYn = loginSucsYn;
|
||||
}
|
||||
|
||||
public String getAccIp() {
|
||||
return accIp;
|
||||
}
|
||||
|
||||
public void setAccIp(String accIp) {
|
||||
this.accIp = accIp;
|
||||
}
|
||||
|
||||
public String getAuthorityList() {
|
||||
return authorityList;
|
||||
}
|
||||
|
||||
public void setAuthorityList(String authorityList) {
|
||||
this.authorityList = authorityList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ public class LoginServiceImpl implements LoginService
|
||||
}
|
||||
|
||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||
|
||||
try {
|
||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||
@ -188,7 +188,7 @@ public class LoginServiceImpl implements LoginService
|
||||
}
|
||||
|
||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||
|
||||
try {
|
||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||
@ -196,14 +196,13 @@ public class LoginServiceImpl implements LoginService
|
||||
|
||||
// AuthKey 등록
|
||||
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
||||
userVO.getAndCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||
userVO.getOrCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||
|
||||
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
|
||||
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
||||
userVO.setAccIp(req.getRemoteAddr());
|
||||
userVO.setLoginSucsYn("Y");
|
||||
userVO.setIp(req.getRemoteAddr());
|
||||
loginDAO.insertLoginLog(userVO);
|
||||
|
||||
} catch (DisabledException e) {
|
||||
@ -243,7 +242,7 @@ public class LoginServiceImpl implements LoginService
|
||||
}
|
||||
|
||||
// 아이디와 패스워드로, Security 가 알아 볼 수 있는 token 객체로 변경한다.
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getUserPwd());
|
||||
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(nLoginVO.getLoginUserId(), nLoginVO.getPassword());
|
||||
|
||||
try {
|
||||
// AuthenticationManager 에 token 을 넘기면 UserDetailsService 가 받아 처리하도록 한다.
|
||||
@ -251,14 +250,13 @@ public class LoginServiceImpl implements LoginService
|
||||
|
||||
// AuthKey 등록
|
||||
SecUserVO userVO = (SecUserVO)authentication.getPrincipal();
|
||||
userVO.getAndCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||
userVO.getOrCreateAuthKey(req.getSession().getId()); // SET AUTHKEY
|
||||
|
||||
// 실제 SecurityContext 에 authentication 정보를 등록한다.
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
|
||||
// TODO : 로그인 로그 정보를 통합자료시스템에 전송한다.
|
||||
userVO.setAccIp(req.getRemoteAddr());
|
||||
userVO.setLoginSucsYn("Y");
|
||||
userVO.setIp(req.getRemoteAddr());
|
||||
loginDAO.insertLoginLog(userVO);
|
||||
|
||||
} catch (DisabledException e) {
|
||||
|
||||
@ -37,8 +37,8 @@ public class MemberServiceImpl implements MemberService
|
||||
|
||||
public void insertMemberInfo(NlibLoginVO vo) throws Exception {
|
||||
String encodedText=null;
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
||||
vo.setUserPwd(encodedText);
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||
vo.setPassword(encodedText);
|
||||
memberDAO.insertMemberInfo(vo);
|
||||
}
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ public class MemberController {
|
||||
String encodedText=null;
|
||||
|
||||
//ID와 핸드폰 번호가 일치하는지 확인
|
||||
if(loginVO!=null && (loginVO.getTelNo().equals(vo.getTelNo()) && loginVO.getLoginUserId().equals(vo.getLoginUserId())))
|
||||
if(loginVO!=null && (loginVO.getMobileNo().equals(vo.getMobileNo()) && loginVO.getLoginUserId().equals(vo.getLoginUserId())))
|
||||
{
|
||||
String reciver = vo.getLoginUserId(); //받을사람의 이메일입니다.-> naver nate 등등
|
||||
String subject = "온라인자료대출시스템 비밀번호 초기화 메일입니다.";
|
||||
@ -347,9 +347,9 @@ public class MemberController {
|
||||
emailSender.SendEmail(email);
|
||||
|
||||
encodedText = egovPasswordEncoder.encryptPassword(InitPwd);
|
||||
vo.setUserPwd(encodedText);
|
||||
vo.setPassword(encodedText);
|
||||
|
||||
vo.setUserId(gUserId);
|
||||
vo.setMbInfoId(gUserId);
|
||||
|
||||
//암호화된 비밀번호로 수정
|
||||
memberService.changePassword(vo);
|
||||
|
||||
@ -72,11 +72,11 @@ public class UserInfoController {
|
||||
NlibLoginVO loginVO =userInfoService.selectMyInfo(vo);
|
||||
|
||||
String encodedText=null;
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
||||
vo.setUserPwd(encodedText);
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||
vo.setPassword(encodedText);
|
||||
|
||||
//암호화된 패스워드 비교
|
||||
if(loginVO.getUserPwd().equals(vo.getUserPwd())) {
|
||||
if(loginVO.getPassword().equals(vo.getPassword())) {
|
||||
model.addAttribute("loginVO",loginVO);
|
||||
return "nlib/userInfo/putMyInfo";
|
||||
}else {
|
||||
@ -95,8 +95,8 @@ public class UserInfoController {
|
||||
public @ResponseBody void updateMyInfo(NlibLoginVO vo,HttpServletResponse response,HttpServletRequest request) throws Exception{
|
||||
|
||||
String encodedText=null;
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getUserPwd());
|
||||
vo.setUserPwd(encodedText);
|
||||
encodedText = egovPasswordEncoder.encryptPassword(vo.getPassword());
|
||||
vo.setPassword(encodedText);
|
||||
|
||||
userInfoService.updateMyInfo(vo);
|
||||
}
|
||||
|
||||
@ -4,20 +4,37 @@
|
||||
<mapper namespace="LoginDAO">
|
||||
|
||||
<select id="selectLoginUserInfo" parameterType="String" resultType="NlibLoginVO">
|
||||
SELECT A.*, B.SNS_DIV, B.SNS_USER_ID, SNS_LOGIN_ID, SSO_REG_DT,
|
||||
CASE WHEN A.USER_DIV = '1' THEN 'ROLE_USER'
|
||||
WHEN A.USER_DIV = '2' THEN 'ROLE_USER, ROLE_ADMIN'
|
||||
WHEN A.USER_DIV = '3' THEN 'ROLE_USER, ROLE_ADMIN, ROLE_SYSTEM'
|
||||
ELSE ''
|
||||
END AS AUTHORITY_LIST
|
||||
FROM TMP_SM_USER A /* 사용자정보 */
|
||||
JOIN TMP_SM_USER_SNS B /* 사용자 SNS 정보 */
|
||||
ON A.USER_ID = B.USER_ID
|
||||
WHERE A.USE_YN = 'Y'
|
||||
AND B.SNS_DIV = 'N'
|
||||
AND B.SNS_USER_ID = #{snsUserId}
|
||||
AND B.SSO_DEL_DT IS NULL /* 연동해제건 제외 */
|
||||
LIMIT 1
|
||||
SELECT
|
||||
A.MB_INFO_ID
|
||||
, A.LOGIN_USER_ID
|
||||
, A.NAME
|
||||
, A.MOBILE_NO
|
||||
, A.PASSWORD
|
||||
, A.EMAIL
|
||||
, A.GENDER
|
||||
, A.ZIP_CODE
|
||||
, A.ADDRESS
|
||||
, A.ADDRESS_DETAIL
|
||||
, A.BIRTHDAY
|
||||
, A.STATUS
|
||||
, A.JOIN_DATE
|
||||
, A.VERIFICATION_DD
|
||||
, A.LAST_ACCESS_DD
|
||||
, A.LEAVE_SITE_DATE
|
||||
, A.REG_ID
|
||||
, A.REG_DD
|
||||
, A.MOD_ID
|
||||
, A.MOD_DD
|
||||
, B.SNS_TYPE
|
||||
, B.SNS_ID
|
||||
, 'ROLE_USER' AS AUTHORITY_LIST
|
||||
FROM UAC_CLTR_DB.MB_INFO A /* 사용자정보 */
|
||||
JOIN UAC_CLTR_DB.MB_SNS B /* 사용자 SNS 정보 */
|
||||
ON A.MB_INFO_ID = B.MB_INFO_ID
|
||||
WHERE B.SNS_ID = '#{snsId}'
|
||||
AND SNS_TYPE = '#{snsType}'
|
||||
AND B.UNLINK_DD IS NULL /* 연동해제건 제외 */
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insertLoginLog" parameterType="NlibLoginVO">
|
||||
@ -30,11 +47,11 @@
|
||||
,LOGIN_SUCS_YN
|
||||
,ACC_DATE
|
||||
) VALUES (
|
||||
#{userId}
|
||||
,#{userNm}
|
||||
,#{deptSeq}
|
||||
,#{deptNm}
|
||||
,#{accIp}
|
||||
#{mbInfoId}
|
||||
,#{name}
|
||||
,#{joinCouncilCd}
|
||||
,#{joinCouncilNm}
|
||||
,#{ip}
|
||||
,'Y'
|
||||
,NOW()
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user