fix : 유저 관련 수정

main
이범준 1 year ago
parent 4329d10916
commit d3e3ba4012

@ -1,6 +1,7 @@
package kr.xit.fims.framework.biz.cmm.dao; package kr.xit.fims.framework.biz.cmm.dao;
import kr.xit.fims.framework.biz.cmm.XitBbsVO; import kr.xit.fims.framework.biz.cmm.XitBbsVO;
import kr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import kr.xit.fims.framework.core.XitRollingNotiVO; import kr.xit.fims.framework.core.XitRollingNotiVO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -75,4 +76,6 @@ public interface XitFrameUnitMapper {
* @date: 2020. 10. 14. * @date: 2020. 10. 14.
*/ */
public List<XitBbsVO> findLatestBbsList(XitRollingNotiVO xitRollingNotiVO); public List<XitBbsVO> findLatestBbsList(XitRollingNotiVO xitRollingNotiVO);
public XitUserInfoVO findXitUserInfoByAccountInfo(XitUserInfoVO userUsrVO);
} }

@ -35,6 +35,8 @@ public interface XitFrameUnitService {
*/ */
public XitUserInfoVO findUserInfo(String uniqId); public XitUserInfoVO findUserInfo(String uniqId);
public XitUserInfoVO findUserByAccountInfo(XitUserInfoVO userUsrVO);
/** /**
* <pre> : * <pre> :
* - // . * - // .

@ -81,7 +81,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
XitUserInfoVO userUsrVO = new XitUserInfoVO(); XitUserInfoVO userUsrVO = new XitUserInfoVO();
userUsrVO.setUserAcnt(accountId); userUsrVO.setUserAcnt(accountId);
userUsrVO = xitFrameCrudService.findXitUserInfo(userUsrVO); userUsrVO = this.findUserByAccountInfo(userUsrVO);
// "회원가입승인" 상태인지 확인 // "회원가입승인" 상태인지 확인
if (XitCmmnUtil.notEmpty(userUsrVO) && "P".equals(userUsrVO.getStts())) { if (XitCmmnUtil.notEmpty(userUsrVO) && "P".equals(userUsrVO.getStts())) {
@ -102,6 +102,11 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
*/ */
return loginVO; return loginVO;
} }
@Override
public XitUserInfoVO findUserByAccountInfo(XitUserInfoVO userUsrVO){
XitUserInfoVO result = xitFrameUnitMapper.findXitUserInfoByAccountInfo(userUsrVO);
return result;
}
@Override @Override
public XitLoginVO findUserInUseByAccountInfo(String jijache, String name, String email) { public XitLoginVO findUserInUseByAccountInfo(String jijache, String name, String email) {

@ -116,7 +116,7 @@ public class XitLoginController extends AbstractController {
String message = null; String message = null;
System.out.println("!!!e");
/** /**
* *
* - URL * - URL
@ -125,9 +125,10 @@ public class XitLoginController extends AbstractController {
*/ */
//비인증 상태에서 인가되지 않은 URL 호출에 대한 처리 //비인증 상태에서 인가되지 않은 URL 호출에 대한 처리
if(XitCmmnUtil.isEmpty(paraMap)) { if(XitCmmnUtil.isEmpty(paraMap)) {
System.out.println("!!!f");
return "forward:/login/accessDenied.do"; return "forward:/login/accessDenied.do";
} }
System.out.println("!!!g");
/** /**
* *
@ -136,9 +137,11 @@ public class XitLoginController extends AbstractController {
try { try {
// 로그인 처리 // 로그인 처리
xitLoginVO = xitLoginService.actionLogin(loginVO); xitLoginVO = xitLoginService.actionLogin(loginVO);
System.out.println("!!!h");
} catch (Exception e) { } catch (Exception e) {
log.debug(String.format("로그인 처리 실패 : %s", e.getMessage())); log.debug(String.format("로그인 처리 실패 : %s", e.getMessage()));
message = e.getMessage(); message = e.getMessage();
System.out.println("!!!i");
} }
@ -147,6 +150,7 @@ public class XitLoginController extends AbstractController {
*/ */
// 로그인 정보/정책에 따라 응답페이지 분기 // 로그인 정보/정책에 따라 응답페이지 분기
if (xitLoginVO != null && xitLoginVO.getId() != null && !"".equals(xitLoginVO.getId())) { if (xitLoginVO != null && xitLoginVO.getId() != null && !"".equals(xitLoginVO.getId())) {
System.out.println("!!!j");
// session Set // session Set
request.getSession().setAttribute("XitLoginSession", xitLoginVO); request.getSession().setAttribute("XitLoginSession", xitLoginVO);
@ -160,30 +164,27 @@ public class XitLoginController extends AbstractController {
springSecurity.setPasswordParameter("xit_security_password"); springSecurity.setPasswordParameter("xit_security_password");
springSecurity.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher( springSecurity.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher(
request.getServletContext().getContextPath() + "/xit_security_login", "POST")); request.getServletContext().getContextPath() + "/xit_security_login", "POST"));
System.out.println("!!!l");
} else { } else {
System.out.println("!!!k");
throw new IllegalStateException("No AuthenticationProcessingFilter"); throw new IllegalStateException("No AuthenticationProcessingFilter");
} }
System.out.println("!!!a");
springSecurity.doFilter(new RequestWrapperForSecurity(request, springSecurity.doFilter(new RequestWrapperForSecurity(request,
xitLoginVO.getUniqId(), xitLoginVO.getUniqId(),
xitLoginVO.getPasswd()), xitLoginVO.getPasswd()),
response, null); response, null);
System.out.println("!!!b");
xitLoginService.actionLoginSuccess();//로그인 Log 생성 xitLoginService.actionLoginSuccess();//로그인 Log 생성
// 2. 메인 페이지 이동 // 2. 메인 페이지 이동
/* ===============================
* 2020.11.20 System.out.println("!!!c");
*
* -: .
=============================== */
//2020.11.20. 주석처리
// String url = XitProperties.getProperty("Globals.Xit.MainPage");
String url = this.getMainPageUrlByUserSe(); String url = this.getMainPageUrlByUserSe();
return "forward:"+url; // 성공 시 페이지.. (redirect 불가) return "forward:"+url; // 성공 시 페이지.. (redirect 불가)
} else { } else {
System.out.println("!!!d");
model.addAttribute("message", message==null?xitMessageSource.getMessage("fail.common.login"):message); model.addAttribute("message", message==null?xitMessageSource.getMessage("fail.common.login"):message);
return LOGIN_PAGE; return LOGIN_PAGE;

@ -152,4 +152,38 @@
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(useYn )">AND USE_YN = #{useYn }</if> <if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(useYn )">AND USE_YN = #{useYn }</if>
ORDER BY REG_DT DESC ORDER BY REG_DT DESC
</select> </select>
<select id="findXitUserInfoByAccountInfo" resultType="kr.xit.fims.framework.biz.mng.user.XitUserInfoVO">
SELECT A.USER_ID
,A.USER_ACNT
,A.ORG_ID
,A.USER_NM
,A.PASSWD
,A.EMP_NO
,A.GENDER
,A.BRDT
,A.FXNO
,A.ADDR
,A.PASSWD_HINT
,A.PASSWD_NSR
,A.AREA_NO
,A.DADDR
,A.ZIP
,A.TELNO
,A.MBL_TELNO
,A.EML_ADRS
,A.POS_NM
,A.GRP_ID
,A.NSTT_CD
,A.STTS
,A.CRTFC_DN
,A.REG_DT
,B.JOB_DATA_AUTHOR
,B.USER_MANAGE_AUTHOR
,B.ELCTRNSANCTN_USE_YN
,B.JOB_CONFM_AUTHOR_YN
FROM tb_user A
LEFT JOIN XIT_USER_ETC_OPTION B ON A.USER_ID=B.USER_ID
WHERE 1=1
AND A.USER_ACNT = #{userAcnt}
</select>
</mapper> </mapper>

@ -17,7 +17,9 @@
<i class="app-brand-logo bx bx-user ps-3"></i> <i class="app-brand-logo bx bx-user ps-3"></i>
<div class="app-brand-text d-block gap-2"> <div class="app-brand-text d-block gap-2">
<div class="txtArea"> <div class="txtArea">
<strong><c:out value="${sessionScope.XitLoginSession.name }" />[<sec:authentication property="principal.Username"/>]</strong> <strong>
<c:out value="${sessionScope.XitLoginSession.name }" />[<sec:authentication property="principal.Username"/>]
</strong>
<em><c:out value="${sessionScope.XitLoginSession.orgnztNm }" /></em> <em><c:out value="${sessionScope.XitLoginSession.orgnztNm }" /></em>
</div> </div>
<div class="btnArea mt-2"> <div class="btnArea mt-2">

Loading…
Cancel
Save