fix : 유저 관련 수정

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

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

@ -34,7 +34,9 @@ public interface XitFrameUnitService {
* @date: 2020. 3. 23.
*/
public XitUserInfoVO findUserInfo(String uniqId);
public XitUserInfoVO findUserByAccountInfo(XitUserInfoVO userUsrVO);
/**
* <pre> :
* - // .

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

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

@ -152,4 +152,38 @@
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(useYn )">AND USE_YN = #{useYn }</if>
ORDER BY REG_DT DESC
</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>

@ -17,7 +17,9 @@
<i class="app-brand-logo bx bx-user ps-3"></i>
<div class="app-brand-text d-block gap-2">
<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>
</div>
<div class="btnArea mt-2">

Loading…
Cancel
Save