fix: 유저 관련 수정

main
이범준 1 year ago
parent 50f17a45db
commit 9775f4a125

@ -42,13 +42,13 @@ public interface XitFrameUnitService {
* : "P"() * : "P"()
* : * :
* </pre> * </pre>
* @param user_se * @param jijache
* @param id ID * @param accountId ID
* @return XitLoginVO * @return XitLoginVO
* @author: * @author:
* @date: 2020. 3. 23. * @date: 2020. 3. 23.
*/ */
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id); public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId);
/** /**
* <pre> : * <pre> :
* - // . * - // .
@ -58,14 +58,14 @@ public interface XitFrameUnitService {
* : * :
* : * :
* </pre> * </pre>
* @param user_se * @param jijache
* @param name * @param name
* @param email * @param email
* @return XitLoginVO * @return XitLoginVO
* @author: * @author:
* @date: 2020. 3. 24. * @date: 2020. 3. 24.
*/ */
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String name, String email); public XitLoginVO findUserInUseByAccountInfo(String jijache, String name, String email);
/** /**
* <pre> : * <pre> :
* - // . * - // .
@ -75,15 +75,15 @@ public interface XitFrameUnitService {
* : * :
* : * :
* </pre> * </pre>
* @param user_se * @param jijache
* @param id ID * @param accountId ID
* @param name * @param name
* @param email * @param email
* @return XitLoginVO * @return XitLoginVO
* @author: * @author:
* @date: 2020. 3. 24. * @date: 2020. 3. 24.
*/ */
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id, String name, String email); public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId, String name, String email);
/** /**
* <pre> : * <pre> :
* - // . * - // .
@ -96,7 +96,7 @@ public interface XitFrameUnitService {
* : * :
* </pre> * </pre>
* @param user_se * @param user_se
* @param id ID * @param accountId ID
* @param name * @param name
* @param email * @param email
* @param passwdHint * @param passwdHint
@ -105,7 +105,7 @@ public interface XitFrameUnitService {
* @author: * @author:
* @date: 2020. 3. 24. * @date: 2020. 3. 24.
*/ */
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id, String name, String email, String passwdHint, String passwdNsr); public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId, String name, String email, String passwdHint, String passwdNsr);

@ -67,48 +67,36 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
} }
@Override @Override
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id) { public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId) {
/** /**
* *
*/ */
if (XitCmmnUtil.isEmpty(id)) if (XitCmmnUtil.isEmpty(accountId))
throw new RuntimeException("아이디(은)는 필수조건 입니다."); throw new RuntimeException("계정아이디(은)는 필수조건 입니다.");
/** /**
* *
*/ */
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
switch (user_se) { XitUserInfoVO userUsrVO = new XitUserInfoVO();
case GNR: // 일반회원 userUsrVO.setUserAcnt(accountId);
userUsrVO = xitFrameCrudService.findXitUserInfo(userUsrVO);
break;
// "회원가입승인" 상태인지 확인
case ENT: // 기업회원 if (XitCmmnUtil.notEmpty(userUsrVO) && "P".equals(userUsrVO.getStts())) {
// XitLoginVO에 매핑
break; loginVO = new XitLoginVO();
case USR: // 업무사용자 loginVO.convertToLoginVO(userUsrVO);
XitUserInfoVO userUsrVO = new XitUserInfoVO(); // 조직id명 설정
userUsrVO.setUserId(id); XitOrgnztInfoVO orgnztInfoVO = new XitOrgnztInfoVO();
userUsrVO = xitFrameCrudService.findXitUserInfo(userUsrVO); orgnztInfoVO.setOrgId(userUsrVO.getOrgId());
orgnztInfoVO = xitFrameCrudService.findXitOrgnztInfo(orgnztInfoVO);
// "회원가입승인" 상태인지 확인 if (XitCmmnUtil.notEmpty(orgnztInfoVO))
if (XitCmmnUtil.notEmpty(userUsrVO) && "P".equals(userUsrVO.getStts())) { loginVO.setOrgnztNm(orgnztInfoVO.getOrgnztNm());
// XitLoginVO에 매핑
loginVO = new XitLoginVO();
loginVO.convertToLoginVO(userUsrVO);
// 조직id명 설정
XitOrgnztInfoVO orgnztInfoVO = new XitOrgnztInfoVO();
orgnztInfoVO.setOrgId(userUsrVO.getOrgId());
orgnztInfoVO = xitFrameCrudService.findXitOrgnztInfo(orgnztInfoVO);
if (XitCmmnUtil.notEmpty(orgnztInfoVO))
loginVO.setOrgnztNm(orgnztInfoVO.getOrgnztNm());
}
break;
default:
break;
} }
/** /**
* *
*/ */
@ -116,7 +104,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
} }
@Override @Override
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String name, String email) { public XitLoginVO findUserInUseByAccountInfo(String jijache, String name, String email) {
/** /**
* *
*/ */
@ -128,27 +116,17 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
/** /**
* *
*/ */
String id = null; String accountId = null;
switch (user_se) {
case GNR: // 일반회원 XitUserInfoVO userUsrVO = new XitUserInfoVO();
userUsrVO.setUserNm(name);
break; userUsrVO.setEmlAdrs(email);
case ENT: // 기업회원 List<XitUserInfoVO> listUserInfo = xitFrameCrudService.findXitUserInfos(userUsrVO);
accountId = XitCmmnUtil.isEmpty(listUserInfo) ? null : listUserInfo.get(0).getUserAcnt();
break;
case USR: // 업무사용자 if (XitCmmnUtil.isEmpty(accountId))
XitUserInfoVO userUsrVO = new XitUserInfoVO();
userUsrVO.setUserNm(name);
userUsrVO.setEmlAdrs(email);
List<XitUserInfoVO> listUserInfo = xitFrameCrudService.findXitUserInfos(userUsrVO);
id = XitCmmnUtil.isEmpty(listUserInfo) ? null : listUserInfo.get(0).getUserId();
break;
default:
break;
}
if (XitCmmnUtil.isEmpty(id))
throw new RuntimeException("일치하는 회원 정보가 없습니다."); throw new RuntimeException("일치하는 회원 정보가 없습니다.");
XitLoginVO loginVO = this.findUserInUseByUserSe(user_se, id); XitLoginVO loginVO = this.findUserInUseByAccountInfo(jijache, accountId);
/** /**
* *
@ -162,7 +140,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
} }
@Override @Override
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id, String name, String email) { public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId, String name, String email) {
/** /**
* *
*/ */
@ -174,7 +152,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
/** /**
* *
*/ */
XitLoginVO loginVO = this.findUserInUseByUserSe(user_se, id); XitLoginVO loginVO = this.findUserInUseByAccountInfo(jijache, accountId);
/** /**
* *
@ -188,7 +166,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
} }
@Override @Override
public XitLoginVO findUserInUseByUserSe(USER_SE user_se, String id, String name, String email, String passwdHint, public XitLoginVO findUserInUseByAccountInfo(String jijache, String accountId, String name, String email, String passwdHint,
String passwdNsr) { String passwdNsr) {
/** /**
* *
@ -205,7 +183,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
/** /**
* *
*/ */
XitLoginVO loginVO = this.findUserInUseByUserSe(user_se, id); XitLoginVO loginVO = this.findUserInUseByAccountInfo(jijache, accountId);
/** /**
* *

@ -38,20 +38,8 @@ public class XitLoginServiceBean extends AbstractServiceBean implements XitLogin
* *
*/ */
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
switch (vo.getUserSe()) {
case "GNR": //일반회원
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.GNR, vo.getId());
break;
case "ENT": //기업회원
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.ENT, vo.getId());
break;
case "USR": //업무사용자
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.USR, vo.getId());
break;
default:
throw new RuntimeException("유효하지 않은 사용자구분 입니다.");
}
loginVO = xitFrameUnitService.findUserInUseByAccountInfo("", vo.getId());
/** /**
@ -122,19 +110,9 @@ public class XitLoginServiceBean extends AbstractServiceBean implements XitLogin
* *
*/ */
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
switch (vo.getUserSe()) {
case "GNR": //일반회원 loginVO = xitFrameUnitService.findUserInUseByAccountInfo("", vo.getName(), vo.getEmail());
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.GNR, vo.getName(), vo.getEmail());
break;
case "ENT": //기업회원
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.ENT, vo.getName(), vo.getEmail());
break;
case "USR": //업무사용자
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.USR, vo.getName(), vo.getEmail());
break;
default:
throw new RuntimeException("유효하지 않은 사용자구분 입니다.");
}
/** /**
@ -161,19 +139,8 @@ public class XitLoginServiceBean extends AbstractServiceBean implements XitLogin
* *
*/ */
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
switch (vo.getUserSe()) {
case "GNR": //일반회원 loginVO = xitFrameUnitService.findUserInUseByAccountInfo("", vo.getId(), vo.getName(), vo.getEmail());
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.GNR, vo.getId(), vo.getName(), vo.getEmail());
break;
case "ENT": //기업회원
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.ENT, vo.getId(), vo.getName(), vo.getEmail());
break;
case "USR": //업무사용자
loginVO = xitFrameUnitService.findUserInUseByUserSe(USER_SE.USR, vo.getId(), vo.getName(), vo.getEmail());
break;
default:
throw new RuntimeException("유효하지 않은 사용자구분 입니다.");
}
/** /**

@ -130,7 +130,7 @@ public class XitUserAbsntMngController extends AbstractController {
/** /**
* <pre> : .</pre> * <pre> : .</pre>
* @param page * @param cmd
* @param tilesDef Type(none: tiles ) * @param tilesDef Type(none: tiles )
* @param model * @param model
* @return String * @return String
@ -173,7 +173,7 @@ public class XitUserAbsntMngController extends AbstractController {
/** /**
* <pre> : .</pre> * <pre> : .</pre>
* @param page * @param cmd
* @param model * @param model
* @return String * @return String
* @author: * @author:

Loading…
Cancel
Save