diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserInfoVO.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserInfoVO.java index 6c808278..9af1bf90 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserInfoVO.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserInfoVO.java @@ -57,4 +57,7 @@ public class XitUserInfoVO extends XitUserEtcOptionVO { protected String uniqId; protected String userTy; protected String sttsNm; + + protected String rgtr; + protected String mdfr; } diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserRegMngVO.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserRegMngVO.java index 86c8be1f..a55b1c9c 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserRegMngVO.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/XitUserRegMngVO.java @@ -145,5 +145,6 @@ public class XitUserRegMngVO extends BaseVO { * 목록화면 select 항목 ========================*/ private String userId; + private String userAcnt; private String userNm; } diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java index 83a9b155..0000c095 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java @@ -59,33 +59,35 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe @Override @Transactional public void addUser(final XitUserInfoVO vo) { + vo.setRgtr(XitCmmnUtil.getUserInfo().getUniqId()); + vo.setMdfr(XitCmmnUtil.getUserInfo().getUniqId()); try { vo.setUniqId(usrEsntlIdGnrService.getNextStringId()); } catch (FdlException e) { throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage()); } - vo.setUniqId(vo.getUniqId()); //고유식별키 - vo.setUserId(vo.getEmplyrId()); //사용자 id - vo.setUserNm(vo.getEmplyrNm()); //사용자 명 + vo.setUserId(vo.getUniqId()); + + vo.setUserAcnt(vo.getEmplyrId()); //처리대상 사용자 id + vo.setUserNm(vo.getEmplyrNm()); //처리대상 사용자 명 try { - vo.setPasswd(XitScrtyUtil.encryptPassword(vo.getPasswd(), vo.getEmplyrId())); + vo.setPasswd(XitScrtyUtil.encryptPassword(vo.getPasswd(), vo.getUserAcnt())); } catch (Exception e) { throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("비밀번호 암호화 실패:: %s", e.getMessage())); } - vo.setUserKey(vo.getUniqId()); mapper.insertUserInfo(vo); // 사용자 권한 XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO(); - userScrtySetupVO.setScrtySetupTrgetId(vo.getUserKey()); + userScrtySetupVO.setScrtySetupTrgetId(vo.getUserId()); userScrtySetupVO.setMberTyCode("USR03"); userScrtySetupVO.setAuthorCode(this.getDefaultAuthorCode(vo.getGrpId())); mapper.insertUserScrtySetup(userScrtySetupVO); // 기타 option XitUserEtcOptionVO userEtcOptionVO = new XitUserEtcOptionVO(); - userEtcOptionVO.setUserId(vo.getUserId()); + userEtcOptionVO.setUserId(vo.getUniqId()); userEtcOptionVO.setJobDataAuthor("ONESELF"); //업무 데이터 권한 userEtcOptionVO.setUserManageAuthor("ONESELF"); //사용자 관리 권한 mapper.insertUserEtcOption(userEtcOptionVO); @@ -95,16 +97,18 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe @Transactional public void modifyUser(final XitUserInfoVO vo) { + vo.setMdfr(XitCmmnUtil.getUserInfo().getUniqId()); + // TODO : 적용 체크 if(!this.isUserModifyAuth(vo.getUniqId())) throw new RuntimeException("대상에 대한 수정 권한이 없습니다."); - vo.setUserId(vo.getEmplyrId()); //사용자 id + vo.setUserAcnt(vo.getEmplyrId()); //사용자 id vo.setUserNm(vo.getEmplyrNm()); //사용자 명 - vo.setUserKey(vo.getUniqId()); + vo.setUserId(vo.getUniqId()); - Map userInfoCheckMap = mapper.selectCheckUserInfo(vo.getUserId()); - if(Checks.isEmpty(userInfoCheckMap) || !Objects.equals(vo.getUserKey(), userInfoCheckMap.get("user_key"))) + Map userInfoCheckMap = mapper.selectCheckUserInfo(vo.getUserAcnt()); + if(Checks.isEmpty(userInfoCheckMap) || !Objects.equals(vo.getUserId(), userInfoCheckMap.get("user_id"))) throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "사용자 고유식별값이 일치하지 않습니다."); // 변경이력 등록 and 사용자 정보 변경 @@ -273,7 +277,7 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe @Override - public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2) { + public void modifyPwdProc(String uniqId, String accountId, String oldPassword, String newPassword, String newPassword2) { /** * 유효성 확인 @@ -306,7 +310,7 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe * 필수값 설정 */ XitUserInfoVO xitUserInfoVO = new XitUserInfoVO(); - xitUserInfoVO.setUserId(id); + xitUserInfoVO.setUserId(uniqId); xitUserInfoVO.setPasswd(encryptNewPass);