refactor : 유저 테이블 수정

main
이범준 1 year ago
parent ce026e8d2e
commit 4424171129

@ -29,63 +29,4 @@ END ;
CREATE DEFINER = root@`%` VIEW xit_vw_user_mastr AS
SELECT `xplatform`.`xit_gnrl_mber`.`ESNTL_ID` AS `ESNTL_ID`,
`xplatform`.`xit_gnrl_mber`.`MBER_ID` AS `USER_ID`,
`xplatform`.`xit_gnrl_mber`.`PASSWORD` AS `PASSWORD`,
`xplatform`.`xit_gnrl_mber`.`MBER_NM` AS `USER_NM`,
`xplatform`.`xit_gnrl_mber`.`ZIP` AS `USER_ZIP`,
`xplatform`.`xit_gnrl_mber`.`ADRES` AS `USER_ADRES`,
`xplatform`.`xit_gnrl_mber`.`MBER_EMAIL_ADRES` AS `USER_EMAIL`,
' ' AS `GROUP_ID`,
'GNR' AS `USER_SE`,
' ' AS `ORGNZT_ID`,
' ' AS `PSTINST_CODE`,
' ' AS `ORGNZT_NM`,
' ' AS `JOB_DATA_AUTHOR`,
' ' AS `USER_MANAGE_AUTHOR`,
' ' AS `ELCTRNSANCTN_USE_YN`,
' ' AS `JOB_CONFM_AUTHOR_YN`
FROM `xplatform`.`xit_gnrl_mber`
UNION ALL
SELECT `a`.`ESNTL_ID` AS `ESNTL_ID`,
`a`.`USER_ID` AS `USER_ID`,
`a`.`PASSWORD` AS `PASSWORD`,
`a`.`USER_NM` AS `USER_NM`,
`a`.`ZIP` AS `ZIP`,
`a`.`HOUSE_ADRES` AS `HOUSE_ADRES`,
`a`.`EMAIL_ADRES` AS `EMAIL_ADRES`,
`a`.`GROUP_ID` AS `GROUP_ID`,
'USR' AS `USER_SE`,
`a`.`orgnzt_id` AS `ORGNZT_ID`,
`a`.`pstinst_code` AS `PSTINST_CODE`,
(SELECT `sa`.`ORGNZT_NM`
FROM `xplatform`.`xit_orgnzt_info` `sa`
WHERE `sa`.`ORGNZT_ID` = `a`.`orgnzt_id`) AS `ORGNZT_NM`,
`b`.`JOB_DATA_AUTHOR` AS `JOB_DATA_AUTHOR`,
`b`.`USER_MANAGE_AUTHOR` AS `USER_MANAGE_AUTHOR`,
`b`.`ELCTRNSANCTN_USE_YN` AS `ELCTRNSANCTN_USE_YN`,
`b`.`JOB_CONFM_AUTHOR_YN` AS `JOB_CONFM_AUTHOR_YN`
FROM (`xplatform`.`xit_user_info` `a` LEFT JOIN `xplatform`.`xit_user_etc_option` `b`
ON (`a`.`USER_ID` = `b`.`USER_ID`))
UNION ALL
SELECT `xplatform`.`xit_entrprs_mber`.`ESNTL_ID` AS `ESNTL_ID`,
`xplatform`.`xit_entrprs_mber`.`ENTRPRS_MBER_ID` AS `USER_ID`,
`xplatform`.`xit_entrprs_mber`.`ENTRPRS_MBER_PASSWORD` AS `ENTRPRS_MBER_PASSWORD`,
`xplatform`.`xit_entrprs_mber`.`CMPNY_NM` AS `CMPNY_NM`,
`xplatform`.`xit_entrprs_mber`.`ZIP` AS `ZIP`,
`xplatform`.`xit_entrprs_mber`.`ADRES` AS `ADRES`,
`xplatform`.`xit_entrprs_mber`.`APPLCNT_EMAIL_ADRES` AS `APPLCNT_EMAIL_ADRES`,
' ' AS `GROUP_ID`,
'ENT' AS `USER_SE`,
' ' AS `ORGNZT_ID`,
' ' AS `PSTINST_CODE`,
' ' AS `ORGNZT_NM`,
' ' AS `JOB_DATA_AUTHOR`,
' ' AS `USER_MANAGE_AUTHOR`,
' ' AS `ELCTRNSANCTN_USE_YN`,
' ' AS `JOB_CONFM_AUTHOR_YN`
FROM `xplatform`.`xit_entrprs_mber`;

@ -103,12 +103,10 @@ public interface XitFrameCrudMapper {
public int removeXitConectLog(XitConectLogVO vo) throws SQLException; public int removeXitConectLog(XitConectLogVO vo) throws SQLException;
public List<XitEntrprsMberVO> findXitEntrprsMbers(XitEntrprsMberVO vo) throws SQLException;
public XitEntrprsMberVO findXitEntrprsMber(XitEntrprsMberVO vo) throws SQLException;
public int addXitEntrprsMber(XitEntrprsMberVO vo) throws SQLException;
public int modifyXitEntrprsMber(XitEntrprsMberVO vo) throws SQLException;
public int removeXitEntrprsMber(XitEntrprsMberVO vo) throws SQLException;
public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo) throws SQLException; public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo) throws SQLException;
public XitFileAttrbVO findXitFileAttrb(XitFileAttrbVO vo) throws SQLException; public XitFileAttrbVO findXitFileAttrb(XitFileAttrbVO vo) throws SQLException;
@ -122,14 +120,7 @@ public interface XitFrameCrudMapper {
public int addXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException; public int addXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException;
public int modifyXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException; public int modifyXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException;
public int removeXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException; public int removeXitFileDetailInfo(XitFileDetailInfoVO vo) throws SQLException;
public List<XitGnrlMberVO> findXitGnrlMbers(XitGnrlMberVO vo) throws SQLException;
public XitGnrlMberVO findXitGnrlMber(XitGnrlMberVO vo) throws SQLException;
public int addXitGnrlMber(XitGnrlMberVO vo) throws SQLException;
public int modifyXitGnrlMber(XitGnrlMberVO vo) throws SQLException;
public int removeXitGnrlMber(XitGnrlMberVO vo) throws SQLException;
public List<XitIdsVO> findXitIdss(XitIdsVO vo) throws SQLException; public List<XitIdsVO> findXitIdss(XitIdsVO vo) throws SQLException;
public XitIdsVO findXitIds(XitIdsVO vo) throws SQLException; public XitIdsVO findXitIds(XitIdsVO vo) throws SQLException;

@ -100,11 +100,11 @@ public interface XitFrameCrudService {
public int removeXitConectLog(XitConectLogVO vo); public int removeXitConectLog(XitConectLogVO vo);
public List<XitEntrprsMberVO> findXitEntrprsMbers(XitEntrprsMberVO vo);
public XitEntrprsMberVO findXitEntrprsMber(XitEntrprsMberVO vo);
public int addXitEntrprsMber(XitEntrprsMberVO vo);
public int modifyXitEntrprsMber(XitEntrprsMberVO vo);
public int removeXitEntrprsMber(XitEntrprsMberVO vo);
public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo); public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo);
@ -119,15 +119,8 @@ public interface XitFrameCrudService {
public int addXitFileDetailInfo(XitFileDetailInfoVO vo); public int addXitFileDetailInfo(XitFileDetailInfoVO vo);
public int modifyXitFileDetailInfo(XitFileDetailInfoVO vo); public int modifyXitFileDetailInfo(XitFileDetailInfoVO vo);
public int removeXitFileDetailInfo(XitFileDetailInfoVO vo); public int removeXitFileDetailInfo(XitFileDetailInfoVO vo);
public List<XitGnrlMberVO> findXitGnrlMbers(XitGnrlMberVO vo);
public XitGnrlMberVO findXitGnrlMber(XitGnrlMberVO vo);
public int addXitGnrlMber(XitGnrlMberVO vo);
public int modifyXitGnrlMber(XitGnrlMberVO vo);
public int removeXitGnrlMber(XitGnrlMberVO vo);
public List<XitIdsVO> findXitIdss(XitIdsVO vo); public List<XitIdsVO> findXitIdss(XitIdsVO vo);
public XitIdsVO findXitIds(XitIdsVO vo); public XitIdsVO findXitIds(XitIdsVO vo);
public int addXitIds(XitIdsVO vo); public int addXitIds(XitIdsVO vo);

@ -1869,167 +1869,6 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
} }
} }
@Override
public List<XitEntrprsMberVO> findXitEntrprsMbers(XitEntrprsMberVO vo) {
String table = "기업회원";
DB_ACTION action = DB_ACTION.NR;
// /**
// * 필수조건 확인
// */
// String emsg = null;
// if(XitCmmnUtil.isEmpty(vo.getEntrprs_mber_id()))
// emsg = String.format("(%s)기업회원ID(은)는 필수조건 입니다.", table);
// if(emsg!=null){
// logger.error(emsg);
// throw new RuntimeException(emsg);
// }
/**
*
*/
try {
List<XitEntrprsMberVO> result = xitFrameCrudMapper.findXitEntrprsMbers(vo);
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public XitEntrprsMberVO findXitEntrprsMber(XitEntrprsMberVO vo) {
String table = "기업회원";
DB_ACTION action = DB_ACTION.R;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getEntrprsMberId()))
emsg = String.format("(%s)기업회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
XitEntrprsMberVO result = xitFrameCrudMapper.findXitEntrprsMber(vo);
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int addXitEntrprsMber(XitEntrprsMberVO vo) {
String table = "기업회원";
DB_ACTION action = DB_ACTION.C;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getEntrprsMberId()))
emsg = String.format("(%s)기업회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.addXitEntrprsMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int modifyXitEntrprsMber(XitEntrprsMberVO vo) {
String table = "기업회원";
DB_ACTION action = DB_ACTION.U;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getEntrprsMberId()))
emsg = String.format("(%s)기업회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.modifyXitEntrprsMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int removeXitEntrprsMber(XitEntrprsMberVO vo) {
String table = "기업회원";
DB_ACTION action = DB_ACTION.D;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getEntrprsMberId()))
emsg = String.format("(%s)기업회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.removeXitEntrprsMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override @Override
public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo) { public List<XitFileAttrbVO> findXitFileAttrbs(XitFileAttrbVO vo) {
String table = "파일속성"; String table = "파일속성";
@ -2361,167 +2200,11 @@ public class XitFrameCrudServiceBean extends AbstractServiceBean implements XitF
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e); throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
} }
} }
@Override
public List<XitGnrlMberVO> findXitGnrlMbers(XitGnrlMberVO vo) {
String table = "일반회원";
DB_ACTION action = DB_ACTION.NR;
// /**
// * 필수조건 확인
// */
// String emsg = null;
// if(XitCmmnUtil.isEmpty(vo.getMber_id()))
// emsg = String.format("(%s)회원ID(은)는 필수조건 입니다.", table);
// if(emsg!=null){
// logger.error(emsg);
// throw new RuntimeException(emsg);
// }
/**
*
*/
try {
List<XitGnrlMberVO> result = xitFrameCrudMapper.findXitGnrlMbers(vo);
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public XitGnrlMberVO findXitGnrlMber(XitGnrlMberVO vo) {
String table = "일반회원";
DB_ACTION action = DB_ACTION.R;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getMberId()))
emsg = String.format("(%s)회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
XitGnrlMberVO result = xitFrameCrudMapper.findXitGnrlMber(vo);
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int addXitGnrlMber(XitGnrlMberVO vo) {
String table = "일반회원";
DB_ACTION action = DB_ACTION.C;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getMberId()))
emsg = String.format("(%s)회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.addXitGnrlMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int modifyXitGnrlMber(XitGnrlMberVO vo) {
String table = "일반회원";
DB_ACTION action = DB_ACTION.U;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getMberId()))
emsg = String.format("(%s)회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.modifyXitGnrlMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override
public int removeXitGnrlMber(XitGnrlMberVO vo) {
String table = "일반회원";
DB_ACTION action = DB_ACTION.D;
/**
*
*/
String emsg = null;
if(XitCmmnUtil.isEmpty(vo.getMberId()))
emsg = String.format("(%s)회원ID(은)는 필수조건 입니다.", table);
if(emsg!=null){
logger.error(emsg);
throw new RuntimeException(emsg);
}
/**
*
*/
try {
int result = xitFrameCrudMapper.removeXitGnrlMber(vo);
if(result<1)
throw new RuntimeException(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
return result;
} catch (SQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL ERROR 발생", table, action.getKorNm()), e);
} catch (UncategorizedSQLException e) {
throw new RuntimeException(String.format("%s %s 중 SQL 부적합한 열 ERROR 발생", table, action.getKorNm()), e);
} catch (Exception e) {
throw new RuntimeException(String.format("%s %s 처리 중 SQL ERROR 발생", table, action.getKorNm()), e);
}
}
@Override @Override
public List<XitIdsVO> findXitIdss(XitIdsVO vo) { public List<XitIdsVO> findXitIdss(XitIdsVO vo) {

@ -81,29 +81,11 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
XitLoginVO loginVO = null; XitLoginVO loginVO = null;
switch (user_se) { switch (user_se) {
case GNR: // 일반회원 case GNR: // 일반회원
XitGnrlMberVO userGnrVO = new XitGnrlMberVO();
userGnrVO.setMberId(id);
userGnrVO = xitFrameCrudService.findXitGnrlMber(userGnrVO);
// "회원가입승인" 상태인지 확인
if (XitCmmnUtil.notEmpty(userGnrVO) && "P".equals(userGnrVO.getMberSttus())) {
// XitLoginVO에 매핑
loginVO = new XitLoginVO();
loginVO.convertToLoginVO(userGnrVO);
}
break; break;
case ENT: // 기업회원 case ENT: // 기업회원
XitEntrprsMberVO userEntVO = new XitEntrprsMberVO();
userEntVO.setEntrprsMberId(id);
userEntVO = xitFrameCrudService.findXitEntrprsMber(userEntVO);
// "회원가입승인" 상태인지 확인
if (XitCmmnUtil.notEmpty(userEntVO) && "P".equals(userEntVO.getEntrprsMberSttus())) {
// XitLoginVO에 매핑
loginVO = new XitLoginVO();
loginVO.convertToLoginVO(userEntVO);
}
break; break;
case USR: // 업무사용자 case USR: // 업무사용자
XitUserInfoVO userUsrVO = new XitUserInfoVO(); XitUserInfoVO userUsrVO = new XitUserInfoVO();
@ -149,18 +131,10 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
String id = null; String id = null;
switch (user_se) { switch (user_se) {
case GNR: // 일반회원 case GNR: // 일반회원
XitGnrlMberVO userGnrVO = new XitGnrlMberVO();
userGnrVO.setMberNm(name);
userGnrVO.setMberEmailAdres(email);
List<XitGnrlMberVO> listUserGnr = xitFrameCrudService.findXitGnrlMbers(userGnrVO);
id = XitCmmnUtil.isEmpty(listUserGnr) ? null : listUserGnr.get(0).getMberId();
break; break;
case ENT: // 기업회원 case ENT: // 기업회원
XitEntrprsMberVO userEntVO = new XitEntrprsMberVO();
userEntVO.setCmpnyNm(name);
userEntVO.setApplcntEmailAdres(email);
List<XitEntrprsMberVO> listEntrprsMber = xitFrameCrudService.findXitEntrprsMbers(userEntVO);
id = XitCmmnUtil.isEmpty(listEntrprsMber) ? null : listEntrprsMber.get(0).getEntrprsMberId();
break; break;
case USR: // 업무사용자 case USR: // 업무사용자
XitUserInfoVO userUsrVO = new XitUserInfoVO(); XitUserInfoVO userUsrVO = new XitUserInfoVO();
@ -262,16 +236,10 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
*/ */
switch (user_se) { switch (user_se) {
case GNR: // 일반회원 case GNR: // 일반회원
XitGnrlMberVO userGnrVO = new XitGnrlMberVO();
userGnrVO.setMberId(id);
userGnrVO.setPassword(password);
xitFrameCrudService.modifyXitGnrlMber(userGnrVO);
break; break;
case ENT: // 기업회원 case ENT: // 기업회원
XitEntrprsMberVO userEntVO = new XitEntrprsMberVO();
userEntVO.setEntrprsMberId(id);
userEntVO.setEntrprsMberPassword(password);
xitFrameCrudService.modifyXitEntrprsMber(userEntVO);
break; break;
case USR: // 업무사용자 case USR: // 업무사용자
XitUserInfoVO userUsrVO = new XitUserInfoVO(); XitUserInfoVO userUsrVO = new XitUserInfoVO();
@ -300,18 +268,7 @@ public class XitFrameUnitServiceBean extends AbstractServiceBean implements XitF
/** /**
* *
*/ */
// 일반회원
XitGnrlMberVO userGnrVO = new XitGnrlMberVO();
userGnrVO.setMberId(id);
userGnrVO = xitFrameCrudService.findXitGnrlMber(userGnrVO);
if (XitCmmnUtil.notEmpty(userGnrVO))
return 1;
// 기업회원
XitEntrprsMberVO userEntVO = new XitEntrprsMberVO();
userEntVO.setEntrprsMberId(id);
userEntVO = xitFrameCrudService.findXitEntrprsMber(userEntVO);
if (XitCmmnUtil.notEmpty(userEntVO))
return 1;
// 업무사용자 // 업무사용자
XitUserInfoVO userUsrVO = new XitUserInfoVO(); XitUserInfoVO userUsrVO = new XitUserInfoVO();
userUsrVO.setUserId(id); userUsrVO.setUserId(id);

@ -32,8 +32,7 @@ public interface UserMgtMapper {
int insertUserInfo(final XitUserInfoVO vo); int insertUserInfo(final XitUserInfoVO vo);
int updateUserInfo(final XitUserInfoVO vo); int updateUserInfo(final XitUserInfoVO vo);
int deleteUserInfo(final String userId); int deleteUserInfo(final String userId);
int deleteGnrlMber(String userId);
int deleteEntrprsMber(String userId);

@ -1,50 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.dao;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 8. 3:33:35
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitEntUserRegMngMapper {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitEntUserRegMngVO>
* @author:
* @date: 2020. 3. 26.
*/
public List<XitEntUserRegMngVO> findList(XitEntUserRegMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 3. 26.
*/
public int findListTotCnt(XitEntUserRegMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitEntUserRegMngVO
* @author:
* @date: 2020. 3. 26.
*/
public XitEntUserRegMngVO findView(XitEntUserRegMngVO vo) throws SQLException;
}

@ -1,50 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.dao;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import java.sql.SQLException;
import java.util.List;
/**
*
* @: Mapper
* @:
* @: 2020. 4. 8. 3:33:35
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitGnrUserRegMngMapper {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitGnrUserRegMngVO>
* @author:
* @date: 2020. 3. 26.
*/
public List<XitGnrUserRegMngVO> findList(XitGnrUserRegMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 3. 26.
*/
public int findListTotCnt(XitGnrUserRegMngSearchVO searchVO) throws SQLException;
/**
* <pre> : </pre>
* @param vo
* @return XitGnrUserRegMngVO
* @author:
* @date: 2020. 3. 26.
*/
public XitGnrUserRegMngVO findView(XitGnrUserRegMngVO vo) throws SQLException;
}

@ -1,92 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.service;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO;
import java.util.List;
/**
*
* @: Service
* @:
* @: 2020. 4. 8. 3:33:18
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitEntUserRegMngService {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitEntUserRegMngVO>
* @author:
* @date: 2020. 4. 8.
*/
public List<XitEntUserRegMngVO> findList(XitEntUserRegMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 8.
*/
public int findListTotCnt(XitEntUserRegMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitEntUserRegMngVO
* @author:
* @date: 2020. 4. 8.
*/
public XitEntUserRegMngVO findView(XitEntUserRegMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 8.
*/
public void addProc(XitEntUserRegMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 8.
*/
public void modifyProc(XitEntUserRegMngVO vo);
/**
* <pre> : </pre>
* @param uniqId ID
* @param id ID
* @param oldPassword
* @param newPassword
* @param newPassword2
* @return void
* @author:
* @date: 2020. 4. 10.
*/
public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2);
/**
* <pre> : </pre>
* @param id void
* @author:
* @date: 2020. 4. 8.
*/
public void removeProc(String id);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 4. 8.
*/
public void removesProc(String ids);
}

@ -1,92 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.service;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO;
import java.util.List;
/**
*
* @: Service
* @:
* @: 2020. 4. 8. 3:33:18
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitGnrUserRegMngService {
/**
* <pre> : </pre>
* @param searchVO
* @return List<XitGnrUserRegMngVO>
* @author:
* @date: 2020. 4. 8.
*/
public List<XitGnrUserRegMngVO> findList(XitGnrUserRegMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param searchVO
* @return int
* @author:
* @date: 2020. 4. 8.
*/
public int findListTotCnt(XitGnrUserRegMngSearchVO searchVO);
/**
* <pre> : </pre>
* @param vo
* @return XitGnrUserRegMngVO
* @author:
* @date: 2020. 4. 8.
*/
public XitGnrUserRegMngVO findView(XitGnrUserRegMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 8.
*/
public void addProc(XitGnrUserRegMngVO vo);
/**
* <pre> : </pre>
* @param vo void
* @author:
* @date: 2020. 4. 8.
*/
public void modifyProc(XitGnrUserRegMngVO vo);
/**
* <pre> : </pre>
* @param uniqId ID
* @param id ID
* @param oldPassword
* @param newPassword
* @param newPassword2
* @return void
* @author:
* @date: 2020. 4. 10.
*/
public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2);
/**
* <pre> : </pre>
* @param id void
* @author:
* @date: 2020. 4. 8.
*/
public void removeProc(String id);
/**
* <pre> : </pre>
* @param ids void
* @author:
* @date: 2020. 4. 8.
*/
public void removesProc(String ids);
}

@ -145,11 +145,11 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe
//일반회원 삭제 //일반회원 삭제
}else if(userTy.equals("USR01")){ }else if(userTy.equals("USR01")){
mapper.deleteGnrlMber(userId);
//기업회원 삭제 //기업회원 삭제
}else if(userTy.equals("USR02")){ //기업회원 삭제 }else if(userTy.equals("USR02")){ //기업회원 삭제
mapper.deleteEntrprsMber(userId);
} }
} }

@ -1,384 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import kr.xit.fims.framework.biz.cmm.XitEntrprsMberVO;
import kr.xit.fims.framework.biz.cmm.XitLoginVO;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.fims.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.fims.framework.biz.mng.user.dao.XitEntUserRegMngMapper;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO;
import kr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import kr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import kr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import kr.xit.fims.framework.biz.mng.user.service.XitEntUserRegMngService;
import kr.xit.fims.framework.core.message.XitMessageSource;
import kr.xit.fims.framework.core.utils.XitCmmnUtil;
import kr.xit.fims.framework.core.utils.XitScrtyUtil;
import org.egovframe.rte.fdl.cmmn.exception.FdlException;
import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;
@Service
public class XitEntUserRegMngServiceBean extends AbstractServiceBean implements XitEntUserRegMngService {
private static final Logger logger = LoggerFactory.getLogger(XitEntUserRegMngServiceBean.class);
@Resource
private XitEntUserRegMngMapper xitEntUserRegMngMapper;
@Resource
private UserMgtService userMgtService;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
private XitFrameUnitService xitFrameUnitService;
@Resource
private XitMessageSource xitMessageSource;
@Autowired
@Qualifier("usrEsntlIdGnrService")
private EgovIdGnrService usrEsntlIdGnrService;
@Override
public List<XitEntUserRegMngVO> findList(XitEntUserRegMngSearchVO searchVO) {
List<XitEntUserRegMngVO> result = null;
try {
result = xitEntUserRegMngMapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("기업사용자등록관리 목록 조회 FAIL::", e);
}
return result;
}
@Override
public int findListTotCnt(XitEntUserRegMngSearchVO searchVO) {
int result = 0;
try {
result = xitEntUserRegMngMapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("기업사용자등록관리 목록 총건수 조회 FAIL::", e);
}
return result;
}
@Override
public XitEntUserRegMngVO findView(XitEntUserRegMngVO vo) {
/**
*
*/
if(!this.isUserModifyAuth(vo.getUniqId()))
throw new RuntimeException("대상에 대한 열람 권한이 없습니다.");
XitEntUserRegMngVO result = null;
try {
result = xitEntUserRegMngMapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("기업사용자등록관리 상세정보 조회 FAIL::", e);
}
return result;
}
@Override
public void addProc(XitEntUserRegMngVO vo) {
/**
*
*/
String esntlId = null;
try {
esntlId = usrEsntlIdGnrService.getNextStringId();
} catch (FdlException e) {
throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage()));
}
vo.setUniqId(esntlId); //고유식별키
XitEntrprsMberVO crudVO = convertToCrudVO(vo);
//그룹의 기본권한 조회 및 설정
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(crudVO.getEsntlId());
userScrtySetupVO.setMberTyCode("USR02");
String defaultAuthorCode = xitFrameUnitService.getDefaultAuthorCode(crudVO.getGroupId());
userScrtySetupVO.setAuthorCode(defaultAuthorCode);
/**
*
*/
//사용자정보 등록
xitFrameCrudService.addXitEntrprsMber(crudVO);
//사용자의 권한 등록
xitFrameCrudService.addXitUserScrtySetup(userScrtySetupVO);
}
@Override
public void modifyProc(XitEntUserRegMngVO vo) {
/**
*
*/
if(!this.isUserModifyAuth(vo.getUniqId()))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
/**
*
*/
XitEntrprsMberVO crudVO = convertToCrudVO(vo);
crudVO.setEntrprsMberPassword(null);
boolean isChangedGroupId = false; //그룹ID 변경 여부
XitEntrprsMberVO curUserInfo = xitFrameCrudService.findXitEntrprsMber(crudVO);
if(!crudVO.getGroupId().equals(curUserInfo.getGroupId()))
isChangedGroupId = true;
/* =======================================
* 2020.11.16.
*
* -: esntl_id .
* -: crudVO.setEsntl_id(null)
======================================= */
String uniqId = crudVO.getEsntlId();
crudVO.setEsntlId(null);
/* =======================================
* 2020.11.16.
*
* -: parameter (CSRF)
* -:
* -> if(!curUserInfo.getEsntl_id().equals(uniqId))
======================================= */
if(!curUserInfo.getEsntlId().equals(uniqId))
throw new RuntimeException("사용자 고유식별값이 일치하지 않습니다.");
/**
*
*/
xitFrameCrudService.modifyXitEntrprsMber(crudVO);
if(isChangedGroupId) { //그룹ID가 변경되었을 경우
//그룹의 기본권한 조회 및 설정
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(uniqId);
String defaultAuthorCode = xitFrameUnitService.getDefaultAuthorCode(crudVO.getGroupId());
userScrtySetupVO.setAuthorCode(defaultAuthorCode);
//사용자의 권한 갱신
if(XitCmmnUtil.isEmpty(xitFrameCrudService.findXitUserScrtySetup(userScrtySetupVO))) {
userScrtySetupVO.setMberTyCode("USR02");
xitFrameCrudService.addXitUserScrtySetup(userScrtySetupVO);
}else {
xitFrameCrudService.modifyXitUserScrtySetup(userScrtySetupVO);
}
}
}
@Override
public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2) {
/**
*
*/
if(!this.isUserModifyAuth(uniqId))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
XitEntUserRegMngVO vo = new XitEntUserRegMngVO();
vo.setUniqId(uniqId);
vo = this.findView(vo);
String encryptPass = null;
String encryptNewPass = null;
try {
encryptPass = XitScrtyUtil.encryptPassword(oldPassword, id);
encryptNewPass = XitScrtyUtil.encryptPassword(newPassword, id);
} catch (Exception e) {
throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
//비밀번호 동일 여부
if (vo.getEntrprsMberPassword().equals(encryptPass)) {
//신 비밀번호/비밀번호 확인 동일 여부
if (!newPassword.equals(newPassword2)) {
throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate2"));
}
} else {
throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate1"));
}
/**
*
*/
XitEntrprsMberVO crudVO = new XitEntrprsMberVO();
crudVO.setEntrprsMberId(id);
crudVO.setEntrprsMberPassword(encryptNewPass);
/**
*
*/
xitFrameCrudService.modifyXitEntrprsMber(crudVO);
}
@Override
public void removeProc(String id) {
// TODO : Refactor 적용
userMgtService.removeUser("", id);
}
@Override
public void removesProc(String userIds) {
/**
*
*/
String [] delId = userIds.split(",");
if (delId == null || (delId.length == 0)) {
throw new RuntimeException(xitMessageSource.getMessage("fail.common.delete"));
}
/**
*
*/
String [] arrUserId = userIds.split(",");
for (int i=0; i<arrUserId.length ; i++){
this.removeProc(arrUserId[i]);
}
}
/**
* <pre> : VO CRUD Service VO .</pre>
* @return XitEntrprsMberVO
* @author:
* @date: 2020. 3. 27.
*/
private XitEntrprsMberVO convertToCrudVO(XitEntUserRegMngVO vo) {
String password = null;
try {
password = XitScrtyUtil.encryptPassword(vo.getEntrprsMberPassword(), vo.getEntrprsmberId());
} catch (Exception e) {
throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
XitEntrprsMberVO crudVO = new XitEntrprsMberVO();
crudVO.setEntrprsMberId(vo.getEntrprsmberId()); //기업 회원 id
crudVO.setEntrprsSeCode(vo.getEntrprsSeCode()); //기업 구분 코드
crudVO.setBizrno (vo.getBizrno()); //사업자등록번호
crudVO.setJurirno (vo.getJurirno()); //법인등록번호
crudVO.setCmpnyNm(vo.getCmpnyNm()); //회사 명
crudVO.setCxfc (vo.getCxfc()); //대표이사
crudVO.setZip (vo.getZip()); //우편번호
crudVO.setAdres (vo.getAdres()); //주소
crudVO.setEntrprsMiddleTelno(vo.getEntrprsMiddleTelno()); //기업 중간 전화번호
crudVO.setFxnum (vo.getFxnum()); //팩스번호
crudVO.setInduty_code (vo.getIndutyCode()); //업종 코드
crudVO.setApplcntNm(vo.getApplcntNm()); //신청인 명
crudVO.setApplcntIhidnum(vo.getApplcntIhidnum()); //신청인 주민등록번호
crudVO.setRegDt(vo.getRegDt()); //가입 일
crudVO.setEntrprsMberSttus(vo.getEntrprsMberSttus()); //기업 회원 상태
crudVO.setEntrprsMberPassword(password); //기업 회원 비밀번호
crudVO.setEntrprsMberPasswordHint(vo.getEntrprsMberPasswordHint()); //기업 회원 비밀번호 힌트
crudVO.setEntrprsMberPasswordCnsr(vo.getEntrprsMberPasswordCnsr()); //기업 회원 비밀번호 정답
crudVO.setGroupId(vo.getGroupId()); //그룹 id
crudVO.setDetailAdres(vo.getDetailAdres()); //상세 주소
crudVO.setEntrprsEndTelno(vo.getEntrprsEndTelno()); //기업 끝 전화번호
crudVO.setArea_no (vo.getAreaNo()); //지역 번호
crudVO.setApplcntEmailAdres(vo.getApplcntEmailAdres()); //신청자 이메일 주소
crudVO.setEsntlId(vo.getUniqId()); //고유 id
return crudVO;
}
/**
* <pre> :
* - .
* :"ROLE_ADMIN 권한" .
* :"ROLE_ADMIN 권한" "ROLE_ADMIN 권한" .
* : "ROLE_ADMIN 권한" "사용자관리권한" .
* </pre>
* @param uniqId ID
* @return boolean
* @author:
* @date: 2020. 6. 9.
*/
private boolean isUserModifyAuth(String uniqId) {
XitLoginVO loginVO = XitCmmnUtil.getUserInfo();
//본인정보인 경우
if(loginVO.getUniqId().equals(uniqId)) {
return true;
}
//본인정보가 아닌 경우
else {
/**
*
*/
//사용자(수정대상) 권한 조회
String trgetAuthorCode = null;
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(uniqId);
vo = xitFrameCrudService.findXitUserScrtySetup(vo);
trgetAuthorCode = vo.getAuthorCode();
//사용자(수정자) 권한 조회
String userAuthorCode = null;
vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(loginVO.getUniqId());
vo = xitFrameCrudService.findXitUserScrtySetup(vo);
userAuthorCode = vo.getAuthorCode();
/**
*
*/
//사용자(수정자)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(userAuthorCode)) {
return true;
}else {
//사용자(수정대상)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(trgetAuthorCode)) {
return false;
}
//사용자관리권한별 분기
XitUserInfoVO trgetUserInfoVO = new XitUserInfoVO();
trgetUserInfoVO.setEsntlId(uniqId);
trgetUserInfoVO = xitFrameCrudService.findXitUserInfos(trgetUserInfoVO).get(0); //사용자(수정대상) 정보 조회
XitUserInfoVO loginUserInfoVO = new XitUserInfoVO();
loginUserInfoVO.setEsntlId(uniqId);
loginUserInfoVO = xitFrameCrudService.findXitUserInfos(loginUserInfoVO).get(0); //사용자(수정자) 정보 조회
switch(loginVO.getUserManageAuthor()) {
case "ALL": //모든 사용자
return true;
case "DEPT": //자신이 속한 부서의 모든 사용자
if(loginUserInfoVO.getPstinstCode().equals(trgetUserInfoVO.getPstinstCode()))
return true;
break;
// case "ONESELF": //본인정보만
// return true;
case "ORGNZT": //자신이 속한 조직의 모든 사용자
if(loginVO.getOrgnztId().equals(trgetUserInfoVO.getOrgnztId()))
return true;
break;
// case "ORGNZT_N_CHILD": //자신이 속한 조직의 모든 하위 조직 사용자(ex: 종로구청이 담당하는 조직)
// return true;
default:
return false;
}
}
return false;
}
}
}

@ -1,380 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.service.bean;
import cokr.xit.foundation.component.AbstractServiceBean;
import kr.xit.fims.framework.biz.cmm.XitGnrlMberVO;
import kr.xit.fims.framework.biz.cmm.XitLoginVO;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.fims.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.fims.framework.biz.mng.user.dao.XitGnrUserRegMngMapper;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO;
import kr.xit.fims.framework.biz.mng.user.XitUserInfoVO;
import kr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
import kr.xit.fims.framework.biz.mng.user.service.UserMgtService;
import kr.xit.fims.framework.biz.mng.user.service.XitGnrUserRegMngService;
import kr.xit.fims.framework.core.message.XitMessageSource;
import kr.xit.fims.framework.core.utils.XitCmmnUtil;
import kr.xit.fims.framework.core.utils.XitScrtyUtil;
import org.egovframe.rte.fdl.cmmn.exception.FdlException;
import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;
@Service
public class XitGnrUserRegMngServiceBean extends AbstractServiceBean implements XitGnrUserRegMngService{
private static final Logger logger = LoggerFactory.getLogger(XitGnrUserRegMngServiceBean.class);
@Resource
private XitGnrUserRegMngMapper xitGnrUserRegMngMapper;
@Resource
private UserMgtService userMgtService;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
private XitFrameUnitService xitFrameUnitService;
@Resource
private XitMessageSource xitMessageSource;
@Autowired
@Qualifier("usrEsntlIdGnrService")
private EgovIdGnrService usrEsntlIdGnrService;
@Override
public List<XitGnrUserRegMngVO> findList(XitGnrUserRegMngSearchVO searchVO) {
List<XitGnrUserRegMngVO> result = null;
try {
result = xitGnrUserRegMngMapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("일반사용자등록관리 목록 조회 FAIL::", e);
}
return result;
}
@Override
public int findListTotCnt(XitGnrUserRegMngSearchVO searchVO) {
int result = 0;
try {
result = xitGnrUserRegMngMapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("일반사용자등록관리 목록 총건수 조회 FAIL::", e);
}
return result;
}
@Override
public XitGnrUserRegMngVO findView(XitGnrUserRegMngVO vo) {
/**
*
*/
if(!this.isUserModifyAuth(vo.getUniqId()))
throw new RuntimeException("대상에 대한 열람 권한이 없습니다.");
XitGnrUserRegMngVO result = null;
try {
result = xitGnrUserRegMngMapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("일반사용자등록관리 상세정보 조회 FAIL::", e);
}
return result;
}
@Override
public void addProc(XitGnrUserRegMngVO vo) {
/**
*
*/
String esntlId = null;
try {
esntlId = usrEsntlIdGnrService.getNextStringId();
} catch (FdlException e) {
throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage()));
}
vo.setUniqId(esntlId); //고유식별키
XitGnrlMberVO crudVO = this.convertToCrudVO(vo);
//그룹의 기본권한 조회 및 설정
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(crudVO.getEsntlId());
userScrtySetupVO.setMberTyCode("USR01");
String defaultAuthorCode = xitFrameUnitService.getDefaultAuthorCode(crudVO.getGroupId());
userScrtySetupVO.setAuthorCode(defaultAuthorCode);
/**
*
*/
//일반회원정보 등록
xitFrameCrudService.addXitGnrlMber(crudVO);
//사용자의 권한 등록
xitFrameCrudService.addXitUserScrtySetup(userScrtySetupVO);
}
@Override
public void modifyProc(XitGnrUserRegMngVO vo) {
/**
*
*/
if(!this.isUserModifyAuth(vo.getUniqId()))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
/**
*
*/
XitGnrlMberVO crudVO = convertToCrudVO(vo);
crudVO.setPassword(null);
boolean isChangedGroupId = false; //그룹ID 변경 여부
XitGnrlMberVO curUserInfo = xitFrameCrudService.findXitGnrlMber(crudVO);
if(!crudVO.getGroupId().equals(curUserInfo.getGroupId()))
isChangedGroupId = true;
/* =======================================
* 2020.11.16.
*
* -: esntl_id .
* -: crudVO.setEsntl_id(null)
======================================= */
String uniqId = crudVO.getEsntlId();
crudVO.setEsntlId(null);
/* =======================================
* 2020.11.16.
*
* -: parameter (CSRF)
* -:
* -> if(!curUserInfo.getEsntl_id().equals(uniqId))
======================================= */
if(!curUserInfo.getEsntlId().equals(uniqId))
throw new RuntimeException("사용자 고유식별값이 일치하지 않습니다.");
/**
*
*/
xitFrameCrudService.modifyXitGnrlMber(crudVO);
if(isChangedGroupId) { //그룹ID가 변경되었을 경우
//그룹의 기본권한 조회 및 설정
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
userScrtySetupVO.setScrtySetupTrgetId(uniqId);
String defaultAuthorCode = xitFrameUnitService.getDefaultAuthorCode(crudVO.getGroupId());
userScrtySetupVO.setAuthorCode(defaultAuthorCode);
//사용자의 권한 갱신
if(XitCmmnUtil.isEmpty(xitFrameCrudService.findXitUserScrtySetup(userScrtySetupVO))) {
userScrtySetupVO.setMberTyCode("USR01");
xitFrameCrudService.addXitUserScrtySetup(userScrtySetupVO);
}else {
xitFrameCrudService.modifyXitUserScrtySetup(userScrtySetupVO);
}
}
}
@Override
public void modifyPwdProc(String uniqId, String id, String oldPassword, String newPassword, String newPassword2) {
/**
*
*/
if(!this.isUserModifyAuth(uniqId))
throw new RuntimeException("대상에 대한 수정 권한이 없습니다.");
XitGnrUserRegMngVO vo = new XitGnrUserRegMngVO();
vo.setUniqId(uniqId);
vo = this.findView(vo);
String encryptPass = null;
String encryptNewPass = null;
try {
encryptPass = XitScrtyUtil.encryptPassword(oldPassword, id);
encryptNewPass = XitScrtyUtil.encryptPassword(newPassword, id);
} catch (Exception e) {
throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
//비밀번호 동일 여부
if (vo.getPassword().equals(encryptPass)) {
//신 비밀번호/비밀번호 확인 동일 여부
if (!newPassword.equals(newPassword2)) {
throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate2"));
}
} else {
throw new RuntimeException(xitMessageSource.getMessage("fail.user.passwordUpdate1"));
}
/**
*
*/
XitGnrlMberVO crudVO = new XitGnrlMberVO();
crudVO.setMberId(id);
crudVO.setPassword(encryptNewPass);
/**
*
*/
xitFrameCrudService.modifyXitGnrlMber(crudVO);
}
@Override
public void removeProc(String id) {
// TODO : refactoring 적용
userMgtService.removeUser("", id);
}
@Override
public void removesProc(String userIds) {
/**
*
*/
String [] delId = userIds.split(",");
if (delId == null || (delId.length == 0)) {
throw new RuntimeException(xitMessageSource.getMessage("fail.common.delete"));
}
/**
*
*/
String [] arrUserId = userIds.split(",");
for (int i=0; i<arrUserId.length ; i++){
this.removeProc(arrUserId[i]);
}
}
/**
* <pre> : VO CRUD Service VO .</pre>
* @return XitGnrlMberVO
* @author:
* @date: 2020. 3. 27.
*/
private XitGnrlMberVO convertToCrudVO(XitGnrUserRegMngVO vo) {
String password = null;
try {
password = XitScrtyUtil.encryptPassword(vo.getPassword(), vo.getMberId());
} catch (Exception e) {
throw new RuntimeException(String.format("비밀번호 암호화 실패:: %s", e.getMessage()));
}
XitGnrlMberVO crudVO = new XitGnrlMberVO();
crudVO.setMberId(vo.getMberId()); //회원 id
crudVO.setPassword (password); //비밀번호
crudVO.setPasswordHint(vo.getPasswordHint()); //비밀번호 힌트
crudVO.setPasswordCnsr(vo.getPasswordCnsr()); //비밀번호 정답
crudVO.setIhidnum (vo.getIhidnum()); //주민등록번호
crudVO.setMberNm(vo.getMberNm()); //회원 명
crudVO.setZip (vo.getZip()); //우편번호
crudVO.setAdres (vo.getAdres()); //주소
crudVO.setAreaNo(vo.getAreaNo()); //지역 번호
crudVO.setMberSttus(vo.getMberSttus()); //회원 상태
crudVO.setDetailAdres(vo.getDetailAdres()); //상세 주소
crudVO.setEndTelno(vo.getEndTelno()); //끝 전화번호
crudVO.setMbtlnum (vo.getMoblphonNo()); //이동전화번호
crudVO.setGroupId(vo.getGroupId()); //그룹 id
crudVO.setMberFxnum(vo.getMberFxnum()); //회원 팩스번호
crudVO.setMberEmailAdres(vo.getMberEmailAdres()); //회원 이메일 주소
crudVO.setMiddleTelno(vo.getMiddleTelno()); //중간 전화번호
crudVO.setRegDt(vo.getRegDt()); //가입 일자
crudVO.setSexdstnCode(vo.getSexdstnCode()); //성별 코드
crudVO.setEsntlId(vo.getUniqId()); //고유 id
return crudVO;
}
/**
* <pre> :
* - .
* :"ROLE_ADMIN 권한" .
* :"ROLE_ADMIN 권한" "ROLE_ADMIN 권한" .
* : "ROLE_ADMIN 권한" "사용자관리권한" .
* </pre>
* @param uniqId ID
* @return boolean
* @author:
* @date: 2020. 6. 9.
*/
private boolean isUserModifyAuth(String uniqId) {
XitLoginVO loginVO = XitCmmnUtil.getUserInfo();
//본인정보인 경우
if(loginVO.getUniqId().equals(uniqId)) {
return true;
}
//본인정보가 아닌 경우
else {
/**
*
*/
//사용자(수정대상) 권한 조회
String trgetAuthorCode = null;
XitUserScrtySetupVO vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(uniqId);
vo = xitFrameCrudService.findXitUserScrtySetup(vo);
trgetAuthorCode = vo.getAuthorCode();
//사용자(수정자) 권한 조회
String userAuthorCode = null;
vo = new XitUserScrtySetupVO();
vo.setScrtySetupTrgetId(loginVO.getUniqId());
vo = xitFrameCrudService.findXitUserScrtySetup(vo);
userAuthorCode = vo.getAuthorCode();
/**
*
*/
//사용자(수정자)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(userAuthorCode)) {
return true;
}else {
//사용자(수정대상)가 ROLE_ADMIN 권한의 사용자인 경우
if("ROLE_ADMIN".equals(trgetAuthorCode)) {
return false;
}
//사용자관리권한별 분기
XitUserInfoVO trgetUserInfoVO = new XitUserInfoVO();
trgetUserInfoVO.setEsntlId(uniqId);
trgetUserInfoVO = xitFrameCrudService.findXitUserInfos(trgetUserInfoVO).get(0); //사용자(수정대상) 정보 조회
XitUserInfoVO loginUserInfoVO = new XitUserInfoVO();
loginUserInfoVO.setEsntlId(uniqId);
loginUserInfoVO = xitFrameCrudService.findXitUserInfos(loginUserInfoVO).get(0); //사용자(수정자) 정보 조회
switch(loginVO.getUserManageAuthor()) {
case "ALL": //모든 사용자
return true;
case "DEPT": //자신이 속한 부서의 모든 사용자
if(loginUserInfoVO.getPstinstCode().equals(trgetUserInfoVO.getPstinstCode()))
return true;
break;
// case "ONESELF": //본인정보만
// return true;
case "ORGNZT": //자신이 속한 조직의 모든 사용자
if(loginVO.getOrgnztId().equals(trgetUserInfoVO.getOrgnztId()))
return true;
break;
// case "ORGNZT_N_CHILD": //자신이 속한 조직의 모든 하위 조직 사용자(ex: 종로구청이 담당하는 조직)
// return true;
default:
return false;
}
}
return false;
}
}
}

@ -1,399 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.web;
import cokr.xit.foundation.web.AbstractController;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO;
import kr.xit.fims.framework.biz.mng.user.service.XitEntUserRegMngService;
import kr.xit.fims.framework.core.constants.FrameworkConstants;
import kr.xit.fims.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.fims.framework.core.message.XitMessageSource;
import kr.xit.fims.framework.core.utils.XitCmmnUtil;
import kr.xit.fims.framework.core.validation.XitBeanValidator;
import kr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 8. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/usr/")
public class XitEntUserRegMngController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(XitEntUserRegMngController.class);
@Resource
private XitEntUserRegMngService xitEntUserRegMngService;
@Autowired
private XitBeanValidator beanValidator;
@Resource(name = "xitMessageSource")
XitMessageSource xitMessageSource;
@Resource
private XitFrameCodeService xitFrameCodeService;
@Value("#{prop['Globals.Xit.Pagination.PageUnit']}")
private int PAGE_UNIT;
@Value("#{prop['Globals.Xit.Pagination.PageSize']}")
private int PAGE_SIZE;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "entUserRegMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String entUserRegMng_list(@ModelAttribute("userSearchVO") XitEntUserRegMngSearchVO searchVO, ModelMap model) {
// 내역 조회
searchVO.setPageUnit(PAGE_UNIT);
searchVO.setPageSize(PAGE_SIZE);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
model.addAttribute("resultList", xitEntUserRegMngService.findList(searchVO));
int totCnt = xitEntUserRegMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
//사용자상태코드를 코드정보로부터 조회
model.addAttribute("entrprsMberSttus_result", xitFrameCodeService.findCmmnDetailCodes("XIT013"));//사용자상태코드목록
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitEntUserRegMng_list";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 29.
*/
@RequestMapping(name = "", value = "entUserRegMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> entUserRegMng_listAjax(HttpServletRequest req, @ModelAttribute("userSearchVO") XitEntUserRegMngSearchVO searchVO, ModelMap model) throws IOException, SQLException, RuntimeException {
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageNum()>-1?searchVO.getPageNum():searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getFetchSize()>-1?searchVO.getFetchSize():searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
/**
*
*/
int totCnt = xitEntUserRegMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
/**
*
*/
/* ***************************
* tui Grid Response Set
*************************** */
resultMap.put("result", true); //[tui Grid] result
resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message
Map<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitEntUserRegMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
pagination.put("pageNum", searchVO.getPageNum());
pagination.put("totalSize", totCnt);
data.put("pagination", pagination); //[tui Grid] data-paging
resultMap.put("data", data); //[tui Grid] data
/* ***************************
* //tui Grid Response Set
*************************** */
} catch (Exception e) {
/**
*
*/
//tui Grid Response Set
resultMap.put("result", false); //[tui Grid] result
resultMap.put("message", xitMessageSource.getMessage("fail.common.select")); //[tui Grid] result message
}
return resultMap;
}
/**
* <pre> : .</pre>
* @param page
* @param tilesDef Type(none: tiles )
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "entUserRegMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String entUserRegMng_page(@PathVariable String cmd
, @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef
, @ModelAttribute("userSearchVO") XitEntUserRegMngSearchVO searchVO
, @ModelAttribute("entrprsManageVO") XitEntUserRegMngVO vo
, @RequestParam(value="selectedId", required=false, defaultValue="") String uniqId
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
, ModelMap model
, HttpServletRequest request) {
switch (cmd) {
case "input": //등록 페이지
/*================
*
================*/
model.addAttribute("passwordHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("sexdstnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("entrprsMberSttus_result" , xitFrameCodeService.findCmmnDetailCodes("XIT013")); //사용자상태코드 목록
model.addAttribute("entrprsSeCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT026")); //기업구분코드 목록
model.addAttribute("indutyCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT027")); //업종코드 목록
model.addAttribute("groupId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
break;
case "view": //수정 페이지
case "edit": //상세 페이지
/*================
*
================*/
model.addAttribute("passwordHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("sexdstnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("entrprsMberSttus_result" , xitFrameCodeService.findCmmnDetailCodes("XIT013")); //사용자상태코드 목록
model.addAttribute("entrprsSeCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT026")); //기업구분코드 목록
model.addAttribute("indutyCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT027")); //업종코드 목록
model.addAttribute("groupId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
if(XitCmmnUtil.notEmpty(uniqId))
vo.setUniqId(uniqId);
XitEntUserRegMngVO xitEntUserRegMngVO = xitEntUserRegMngService.findView(vo);
model.addAttribute("entrprsManageVO", xitEntUserRegMngVO);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
if(!"".equals(tilesDef))
tilesDef = "."+tilesDef;
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitEntUserRegMng_"+cmd+tilesDef;
}
/**
* <pre> : .</pre>
* @param page
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "entUserRegMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String entUserRegMng_page_popup(
@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitEntUserRegMngSearchVO searchVO
, @ModelAttribute("entrprsManageVO") XitEntUserRegMngVO vo
, ModelMap model
, @RequestParam(value="selectedId", required=false, defaultValue="") String uniqId
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
) {
switch (cmd) {
case "editPwd": //수정(비밀번호) 페이지
vo.setUserTy(userTyForPassword);
model.addAttribute("entrprsManageVO", vo);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitEntUserRegMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal();
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "entUserRegMng_{cmd}_proc", method=RequestMethod.POST)
public void entUserRegMng_cmd_proc(@PathVariable String cmd
,@ModelAttribute("entrprsManageVO") XitEntUserRegMngVO vo
,@RequestParam(value="checkedIdForDel", required=false, defaultValue="") String checkedIdForDel
,@RequestParam(value="isViewPage", required=false, defaultValue="N") String isViewPage
,@RequestParam Map<String, Object> commandMap
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/usr/entUserRegMng_list";
String message = null;
switch (cmd) {
case "insert": //등록
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("entrprsManageVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
// throw new RuntimeException(xitMessageSource.getMessage("fail.common.insert"));
message = xitMessageSource.getMessage("fail.common.insert");
sLocationUrl = "forward:/framework/biz/mng/usr/entUserRegMng_input";
break;
}
//처리
try {
xitEntUserRegMngService.addProc(vo);
message = xitMessageSource.getMessage("success.common.insert");
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/usr/entUserRegMng_input";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.insert");
sLocationUrl = "forward:/framework/biz/mng/usr/entUserRegMng_input";
}
break;
// case "inserts": //다건 등록
// break;
case "update": //수정
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("entrprsManageVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "forward:/framework/biz/mng/usr/entUserRegMng_edit";
break;
}
//처리
try {
xitEntUserRegMngService.modifyProc(vo);
message = xitMessageSource.getMessage("success.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
}
break;
case "update_pwd": //수정(비밀번호)
String oldPassword = (String) commandMap.get("oldPassword");
String newPassword = (String) commandMap.get("newPassword");
String newPassword2 = (String) commandMap.get("newPassword2");
String uniqId = (String) commandMap.get("uniqId");
try {
xitEntUserRegMngService.modifyPwdProc(uniqId, vo.getEntrprsmberId(), oldPassword, newPassword, newPassword2);
message = xitMessageSource.getMessage("success.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
}
break;
case "delete": //삭제
//처리
try {
xitEntUserRegMngService.removeProc(checkedIdForDel);
message = xitMessageSource.getMessage("success.common.delete");
break;
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.delete");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/entUserRegMng_view":"forward:/framework/biz/mng/usr/entUserRegMng_edit";
}
break;
case "deletes": //다건 삭제
//처리
try {
xitEntUserRegMngService.removesProc(checkedIdForDel);
message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) {
message = e.getMessage();
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.delete");
}
break;
default:
new RuntimeException("유효하지 않은 요청 입니다.");
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1,394 +0,0 @@
package kr.xit.fims.framework.biz.mng.user.web;
import cokr.xit.foundation.web.AbstractController;
import kr.xit.fims.framework.biz.cmm.service.XitFrameCodeService;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngSearchVO;
import kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO;
import kr.xit.fims.framework.biz.mng.user.service.XitGnrUserRegMngService;
import kr.xit.fims.framework.core.constants.FrameworkConstants;
import kr.xit.fims.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.fims.framework.core.message.XitMessageSource;
import kr.xit.fims.framework.core.utils.XitCmmnUtil;
import kr.xit.fims.framework.core.validation.XitBeanValidator;
import kr.xit.fims.framework.support.util.AjaxUtils;
import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
/**
*
* @: Controller
* @:
* @: 2020. 4. 8. 3:32:51
* @:
* @author ()
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Controller
@RequestMapping(name = "", value = "/framework/biz/mng/usr/")
public class XitGnrUserRegMngController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(XitGnrUserRegMngController.class);
@Resource
private XitGnrUserRegMngService xitGnrUserRegMngService;
@Autowired
private XitBeanValidator beanValidator;
@Resource(name = "xitMessageSource")
XitMessageSource xitMessageSource;
@Resource
private XitFrameCodeService xitFrameCodeService;
@Value("#{prop['Globals.Xit.Pagination.PageUnit']}")
private int PAGE_UNIT;
@Value("#{prop['Globals.Xit.Pagination.PageSize']}")
private int PAGE_SIZE;
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "gnrUserRegMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String gnrUserRegMng_list(@ModelAttribute("userSearchVO") XitGnrUserRegMngSearchVO searchVO, ModelMap model) {
// 내역 조회
searchVO.setPageUnit(PAGE_UNIT);
searchVO.setPageSize(PAGE_SIZE);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
model.addAttribute("resultList", xitGnrUserRegMngService.findList(searchVO));
int totCnt = xitGnrUserRegMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("mberSttus_result", xitFrameCodeService.findCmmnDetailCodes("XIT013"));//사용자상태코드목록
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitGnrUserRegMng_list";
}
/**
* <pre> : </pre>
* @return String
* @author:
* @date: 2020. 7. 29.
*/
@RequestMapping(name = "", value = "gnrUserRegMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
@ResponseBody
public Map<String, Object> gnrUserRegMng_listAjax(HttpServletRequest req, @ModelAttribute("userSearchVO") XitGnrUserRegMngSearchVO searchVO, ModelMap model) throws IOException, SQLException, RuntimeException {
/** paging */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageNum()>-1?searchVO.getPageNum():searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getFetchSize()>-1?searchVO.getFetchSize():searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
Map<String, Object> resultMap = new HashMap<String, Object>();
try {
/**
*
*/
int totCnt = xitGnrUserRegMngService.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
/**
*
*/
/* ***************************
* tui Grid Response Set
*************************** */
resultMap.put("result", true); //[tui Grid] result
resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message
Map<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitGnrUserRegMngService.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>();
pagination.put("pageNum", searchVO.getPageNum());
pagination.put("totalSize", totCnt);
data.put("pagination", pagination); //[tui Grid] data-paging
resultMap.put("data", data); //[tui Grid] data
/* ***************************
* //tui Grid Response Set
*************************** */
} catch (Exception e) {
/**
*
*/
//tui Grid Response Set
resultMap.put("result", false); //[tui Grid] result
resultMap.put("message", xitMessageSource.getMessage("fail.common.select")); //[tui Grid] result message
}
return resultMap;
}
/**
* <pre> : .</pre>
* @param cmd
* @param tilesDef Type(none: tiles )
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "gnrUserRegMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String gnrUserRegMng_page(@PathVariable String cmd
, @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef
, @ModelAttribute("userSearchVO") XitGnrUserRegMngSearchVO searchVO
, @ModelAttribute("mberManageVO") XitGnrUserRegMngVO vo
, @RequestParam(value="selectedId", required=false, defaultValue="") String uniqId
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
, ModelMap model
, HttpServletRequest request) {
switch (cmd) {
case "input": //등록 페이지
/*================
*
================*/
model.addAttribute("passwordHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("sexdstnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("mberSttus_result" , xitFrameCodeService.findCmmnDetailCodes("XIT013")); //사용자상태코드 목록
model.addAttribute("groupId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
break;
case "view": //수정 페이지
case "edit": //상세 페이지
/*================
*
================*/
model.addAttribute("passwordHint_result" , xitFrameCodeService.findCmmnDetailCodes("XIT022")); //패스워트힌트코드 목록
model.addAttribute("sexdstnCode_result" , xitFrameCodeService.findCmmnDetailCodes("XIT014")); //성별구분코드 목록
model.addAttribute("mberSttus_result" , xitFrameCodeService.findCmmnDetailCodes("XIT013")); //사용자상태코드 목록
model.addAttribute("groupId_result" , xitFrameCodeService.findGroupCodes("XIT_ORGNZT_INFO")); //그룹정보코드 목록
if(XitCmmnUtil.notEmpty(uniqId))
vo.setUniqId(uniqId);
XitGnrUserRegMngVO xitGnrUserRegMngVO = xitGnrUserRegMngService.findView(vo);
model.addAttribute("mberManageVO", xitGnrUserRegMngVO);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
if(!"".equals(tilesDef))
tilesDef = "."+tilesDef;
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitGnrUserRegMng_"+cmd+tilesDef;
}
/**
* <pre> : .</pre>
* @param cmd
* @param model
* @return String
* @author:
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "gnrUserRegMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String gnrUserRegMng_page_popup(
@PathVariable String cmd
, @ModelAttribute("userSearchVO") XitGnrUserRegMngSearchVO searchVO
, @ModelAttribute("mberManageVO") XitGnrUserRegMngVO vo
, ModelMap model
, @RequestParam(value="selectedId", required=false, defaultValue="") String uniqId
, @RequestParam(value="userTyForPassword", required=false, defaultValue="") String userTyForPassword
) {
switch (cmd) {
case "editPwd": //수정(비밀번호) 페이지
vo.setUserTy(userTyForPassword);
model.addAttribute("mberManageVO", vo);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/usr/XitGnrUserRegMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal();
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 4. 8.
*/
@RequestMapping(name = "", value = "gnrUserRegMng_{cmd}_proc", method=RequestMethod.POST)
public void gnrUserRegMng_cmd_proc(@PathVariable String cmd
,@ModelAttribute("mberManageVO") XitGnrUserRegMngVO vo
,@RequestParam(value="checkedIdForDel", required=false, defaultValue="") String checkedIdForDel
,@RequestParam(value="isViewPage", required=false, defaultValue="N") String isViewPage
,@RequestParam Map<String, Object> commandMap
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/usr/gnrUserRegMng_list";
String message = null;
switch (cmd) {
case "insert": //등록
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("mberManageVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
// throw new RuntimeException(xitMessageSource.getMessage("fail.common.insert"));
message = xitMessageSource.getMessage("fail.common.insert");
sLocationUrl = "forward:/framework/biz/mng/usr/gnrUserRegMng_input";
break;
}
//처리
try {
xitGnrUserRegMngService.addProc(vo);
message = xitMessageSource.getMessage("success.common.insert");
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/usr/gnrUserRegMng_input";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.insert");
sLocationUrl = "forward:/framework/biz/mng/usr/gnrUserRegMng_input";
}
break;
// case "inserts": //다건 등록
// break;
case "update": //수정
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("mberManageVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
break;
}
//처리
try {
xitGnrUserRegMngService.modifyProc(vo);
message = xitMessageSource.getMessage("success.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
}
break;
case "update_pwd": //수정(비밀번호)
String oldPassword = (String) commandMap.get("oldPassword");
String newPassword = (String) commandMap.get("newPassword");
String newPassword2 = (String) commandMap.get("newPassword2");
String uniqId = (String) commandMap.get("uniqId");
try {
xitGnrUserRegMngService.modifyPwdProc(uniqId, vo.getMberId(), oldPassword, newPassword, newPassword2);
message = xitMessageSource.getMessage("success.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
}
break;
case "delete": //삭제
//처리
try {
xitGnrUserRegMngService.removeProc(checkedIdForDel);
message = xitMessageSource.getMessage("success.common.delete");
break;
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.delete");
sLocationUrl = "Y".equals(isViewPage)?"forward:/framework/biz/mng/usr/gnrUserRegMng_view":"forward:/framework/biz/mng/usr/gnrUserRegMng_edit";
}
break;
case "deletes": //다건 삭제
//처리
try {
xitGnrUserRegMngService.removesProc(checkedIdForDel);
message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) {
message = e.getMessage();
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.delete");
}
break;
default:
new RuntimeException("유효하지 않은 요청 입니다.");
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1028,188 +1028,6 @@
</delete> </delete>
<select id="findXitEntrprsMbers" resultType="kr.xit.fims.framework.biz.cmm.XitEntrprsMberVO">
/** findXitEntrprsMbers */
/** 기업회원 다건 조회 */
SELECT ENTRPRS_MBER_ID
,ENTRPRS_SE_CODE
,BIZRNO
,JURIRNO
,CMPNY_NM
,CXFC
,ZIP
,ADRES
,ENTRPRS_MIDDLE_TELNO
,FXNUM
,INDUTY_CODE
,APPLCNT_NM
,APPLCNT_IHIDNUM
,REG_DT
,ENTRPRS_MBER_STTUS
,ENTRPRS_MBER_PASSWORD
,ENTRPRS_MBER_PASSWORD_HINT
,ENTRPRS_MBER_PASSWORD_CNSR
,GROUP_ID
,DETAIL_ADRES
,ENTRPRS_END_TELNO
,AREA_NO
,APPLCNT_EMAIL_ADRES
,ESNTL_ID
FROM XIT_ENTRPRS_MBER
WHERE 1=1
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_id )">AND ENTRPRS_MBER_ID = #{entrprs_mber_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_se_code )">AND ENTRPRS_SE_CODE = #{entrprs_se_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(bizrno )">AND BIZRNO = #{bizrno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(jurirno )">AND JURIRNO = #{jurirno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cmpny_nm )">AND CMPNY_NM = #{cmpny_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cxfc )">AND CXFC = #{cxfc }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">AND ZIP = #{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">AND ADRES = #{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_middle_telno )">AND ENTRPRS_MIDDLE_TELNO = #{entrprs_middle_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(fxnum )">AND FXNUM = #{fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(induty_code )">AND INDUTY_CODE = #{induty_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_nm )">AND APPLCNT_NM = #{applcnt_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_ihidnum )">AND APPLCNT_IHIDNUM = #{applcnt_ihidnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_sttus )">AND ENTRPRS_MBER_STTUS = #{entrprs_mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password )">AND ENTRPRS_MBER_PASSWORD = #{entrprs_mber_password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_hint)">AND ENTRPRS_MBER_PASSWORD_HINT = #{entrprs_mber_password_hint}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_cnsr)">AND ENTRPRS_MBER_PASSWORD_CNSR = #{entrprs_mber_password_cnsr}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">AND GROUP_ID = #{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">AND DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_end_telno )">AND ENTRPRS_END_TELNO = #{entrprs_end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">AND AREA_NO = #{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_email_adres )">AND APPLCNT_EMAIL_ADRES = #{applcnt_email_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">AND ESNTL_ID = #{esntl_id }</if>
</select>
<select id="findXitEntrprsMber" resultType="kr.xit.fims.framework.biz.cmm.XitEntrprsMberVO">
/** findXitEntrprsMber */
/** 기업회원 조회 */
SELECT ENTRPRS_MBER_ID
,ENTRPRS_SE_CODE
,BIZRNO
,JURIRNO
,CMPNY_NM
,CXFC
,ZIP
,ADRES
,ENTRPRS_MIDDLE_TELNO
,FXNUM
,INDUTY_CODE
,APPLCNT_NM
,APPLCNT_IHIDNUM
,REG_DT
,ENTRPRS_MBER_STTUS
,ENTRPRS_MBER_PASSWORD
,ENTRPRS_MBER_PASSWORD_HINT
,ENTRPRS_MBER_PASSWORD_CNSR
,GROUP_ID
,DETAIL_ADRES
,ENTRPRS_END_TELNO
,AREA_NO
,APPLCNT_EMAIL_ADRES
,ESNTL_ID
FROM XIT_ENTRPRS_MBER
WHERE 1=1
AND ENTRPRS_MBER_ID = #{entrprs_mber_id}
</select>
<insert id="addXitEntrprsMber">
/** addXitEntrprsMber */
/** 기업회원 등록 */
INSERT INTO XIT_ENTRPRS_MBER(
ENTRPRS_MBER_ID
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_se_code )">,ENTRPRS_SE_CODE </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(bizrno )">,BIZRNO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(jurirno )">,JURIRNO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cmpny_nm )">,CMPNY_NM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cxfc )">,CXFC </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">,ZIP </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">,ADRES </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_middle_telno )">,ENTRPRS_MIDDLE_TELNO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(fxnum )">,FXNUM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(induty_code )">,INDUTY_CODE </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_nm )">,APPLCNT_NM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_ihidnum )">,APPLCNT_IHIDNUM </if>
,REG_DT
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_sttus )">,ENTRPRS_MBER_STTUS </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password )">,ENTRPRS_MBER_PASSWORD </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_hint)">,ENTRPRS_MBER_PASSWORD_HINT</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_cnsr)">,ENTRPRS_MBER_PASSWORD_CNSR</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">,GROUP_ID </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">,DETAIL_ADRES </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_end_telno )">,ENTRPRS_END_TELNO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">,AREA_NO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_email_adres )">,APPLCNT_EMAIL_ADRES </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">,ESNTL_ID </if>
)VALUES(
#{entrprs_mber_id }
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_se_code )">,#{entrprs_se_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(bizrno )">,#{bizrno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(jurirno )">,#{jurirno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cmpny_nm )">,#{cmpny_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(cxfc )">,#{cxfc }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">,#{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">,#{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_middle_telno )">,#{entrprs_middle_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(fxnum )">,#{fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(induty_code )">,#{induty_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_nm )">,#{applcnt_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_ihidnum )">,#{applcnt_ihidnum }</if>
,NOW()
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_sttus )">,#{entrprs_mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password )">,#{entrprs_mber_password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_hint)">,#{entrprs_mber_password_hint}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_mber_password_cnsr)">,#{entrprs_mber_password_cnsr}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">,#{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">,#{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(entrprs_end_telno )">,#{entrprs_end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">,#{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(applcnt_email_adres )">,#{applcnt_email_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">,#{esntl_id }</if>
)
</insert>
<update id="modifyXitEntrprsMber">
/** modifyXitEntrprsMber */
/** 기업회원 수정 */
UPDATE XIT_ENTRPRS_MBER
SET
ESNTL_ID = IFNULL(#{esntl_id}, ESNTL_ID)
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_se_code )">,ENTRPRS_SE_CODE = #{entrprs_se_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(bizrno )">,BIZRNO = #{bizrno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(jurirno )">,JURIRNO = #{jurirno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(cmpny_nm )">,CMPNY_NM = #{cmpny_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(cxfc )">,CXFC = #{cxfc }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(zip )">,ZIP = #{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(adres )">,ADRES = #{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_middle_telno )">,ENTRPRS_MIDDLE_TELNO = #{entrprs_middle_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(fxnum )">,FXNUM = #{fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(induty_code )">,INDUTY_CODE = #{induty_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(applcnt_nm )">,APPLCNT_NM = #{applcnt_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(applcnt_ihidnum )">,APPLCNT_IHIDNUM = #{applcnt_ihidnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_mber_sttus )">,ENTRPRS_MBER_STTUS = #{entrprs_mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_mber_password )">,ENTRPRS_MBER_PASSWORD = #{entrprs_mber_password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_mber_password_hint)">,ENTRPRS_MBER_PASSWORD_HINT = #{entrprs_mber_password_hint}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_mber_password_cnsr)">,ENTRPRS_MBER_PASSWORD_CNSR = #{entrprs_mber_password_cnsr}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(group_id )">,GROUP_ID = #{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(detail_adres )">,DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(entrprs_end_telno )">,ENTRPRS_END_TELNO = #{entrprs_end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(area_no )">,AREA_NO = #{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(applcnt_email_adres )">,APPLCNT_EMAIL_ADRES = #{applcnt_email_adres }</if>
WHERE 1=1
AND ENTRPRS_MBER_ID = #{entrprs_mber_id}
</update>
<delete id="removeXitEntrprsMber">
/** removeXitEntrprsMber */
/** 기업회원 삭제 */
DELETE FROM XIT_ENTRPRS_MBER
WHERE 1=1
AND ENTRPRS_MBER_ID = #{entrprs_mber_id}
</delete>
<select id="findXitFileAttrbs" resultType="kr.xit.fims.framework.biz.cmm.XitFileAttrbVO"> <select id="findXitFileAttrbs" resultType="kr.xit.fims.framework.biz.cmm.XitFileAttrbVO">
/** findXitFileAttrbs */ /** findXitFileAttrbs */
/** 파일속성 다건 조회 */ /** 파일속성 다건 조회 */
@ -1352,161 +1170,7 @@
</delete> </delete>
<select id="findXitGnrlMbers" resultType="kr.xit.fims.framework.biz.cmm.XitGnrlMberVO">
/** findXitGnrlMbers */
/** 일반회원 다건 조회 */
SELECT MBER_ID
,PASSWORD
,PASSWORD_HINT
,PASSWORD_CNSR
,IHIDNUM
,MBER_NM
,ZIP
,ADRES
,AREA_NO
,MBER_STTUS
,DETAIL_ADRES
,END_TELNO
,MBTLNUM
,GROUP_ID
,MBER_FXNUM
,MBER_EMAIL_ADRES
,MIDDLE_TELNO
,REG_DT
,SEXDSTN_CODE
,ESNTL_ID
FROM XIT_GNRL_MBER
WHERE 1=1
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_id )">AND MBER_ID = #{mber_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password )">AND PASSWORD = #{password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_hint )">AND PASSWORD_HINT = #{password_hint }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_cnsr )">AND PASSWORD_CNSR = #{password_cnsr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ihidnum )">AND IHIDNUM = #{ihidnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_nm )">AND MBER_NM = #{mber_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">AND ZIP = #{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">AND ADRES = #{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">AND AREA_NO = #{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_sttus )">AND MBER_STTUS = #{mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">AND DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(end_telno )">AND END_TELNO = #{end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mbtlnum )">AND MBTLNUM = #{mbtlnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">AND GROUP_ID = #{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_fxnum )">AND MBER_FXNUM = #{mber_fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_email_adres)">AND MBER_EMAIL_ADRES = #{mber_email_adres}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(middle_telno )">AND MIDDLE_TELNO = #{middle_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(sexdstn_code )">AND SEXDSTN_CODE = #{sexdstn_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">AND ESNTL_ID = #{esntl_id }</if>
</select>
<select id="findXitGnrlMber" resultType="kr.xit.fims.framework.biz.cmm.XitGnrlMberVO">
/** findXitGnrlMber */
/** 일반회원 조회 */
SELECT MBER_ID
,PASSWORD
,PASSWORD_HINT
,PASSWORD_CNSR
,IHIDNUM
,MBER_NM
,ZIP
,ADRES
,AREA_NO
,MBER_STTUS
,DETAIL_ADRES
,END_TELNO
,MBTLNUM
,GROUP_ID
,MBER_FXNUM
,MBER_EMAIL_ADRES
,MIDDLE_TELNO
,REG_DT
,SEXDSTN_CODE
,ESNTL_ID
FROM XIT_GNRL_MBER
WHERE 1=1
AND MBER_ID = #{mber_id}
</select>
<insert id="addXitGnrlMber">
/** addXitGnrlMber */
/** 일반회원 등록 */
INSERT INTO XIT_GNRL_MBER(
MBER_ID
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password )">,PASSWORD </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_hint )">,PASSWORD_HINT </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_cnsr )">,PASSWORD_CNSR </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ihidnum )">,IHIDNUM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_nm )">,MBER_NM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">,ZIP </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">,ADRES </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">,AREA_NO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_sttus )">,MBER_STTUS </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">,DETAIL_ADRES </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(end_telno )">,END_TELNO </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mbtlnum )">,MBTLNUM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">,GROUP_ID </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_fxnum )">,MBER_FXNUM </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_email_adres)">,MBER_EMAIL_ADRES</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(middle_telno )">,MIDDLE_TELNO </if>
,REG_DT
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(sexdstn_code )">,SEXDSTN_CODE </if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">,ESNTL_ID </if>
)VALUES(
#{mber_id }
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password )">,#{password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_hint )">,#{password_hint }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(password_cnsr )">,#{password_cnsr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(ihidnum )">,#{ihidnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_nm )">,#{mber_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(zip )">,#{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(adres )">,#{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(area_no )">,#{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_sttus )">,#{mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(detail_adres )">,#{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(end_telno )">,#{end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mbtlnum )">,#{mbtlnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(group_id )">,#{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_fxnum )">,#{mber_fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(mber_email_adres)">,#{mber_email_adres}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(middle_telno )">,#{middle_telno }</if>
,NOW()
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(sexdstn_code )">,#{sexdstn_code }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(esntl_id )">,#{esntl_id }</if>
)
</insert>
<update id="modifyXitGnrlMber">
/** modifyXitGnrlMber */
/** 일반회원 수정 */
UPDATE XIT_GNRL_MBER
SET
ESNTL_ID = IFNULL(#{esntl_id }, ESNTL_ID)
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(password )">,PASSWORD = #{password }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(password_hint )">,PASSWORD_HINT = #{password_hint }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(password_cnsr )">,PASSWORD_CNSR = #{password_cnsr }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(ihidnum )">,IHIDNUM = #{ihidnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mber_nm )">,MBER_NM = #{mber_nm }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(zip )">,ZIP = #{zip }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(adres )">,ADRES = #{adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(area_no )">,AREA_NO = #{area_no }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mber_sttus )">,MBER_STTUS = #{mber_sttus }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(detail_adres )">,DETAIL_ADRES = #{detail_adres }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(end_telno )">,END_TELNO = #{end_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mbtlnum )">,MBTLNUM = #{mbtlnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(group_id )">,GROUP_ID = #{group_id }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mber_fxnum )">,MBER_FXNUM = #{mber_fxnum }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(mber_email_adres)">,MBER_EMAIL_ADRES = #{mber_email_adres}</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(middle_telno )">,MIDDLE_TELNO = #{middle_telno }</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notBlank(sexdstn_code )">,SEXDSTN_CODE = #{sexdstn_code }</if>
WHERE 1=1
AND MBER_ID = #{mber_id}
</update>
<delete id="removeXitGnrlMber">
/** removeXitGnrlMber */
/** 일반회원 삭제 */
DELETE FROM XIT_GNRL_MBER
WHERE 1=1
AND MBER_ID = #{mber_id}
</delete>

@ -15,18 +15,6 @@
, IF(uss.scrty_setup_trget_id IS NULL, 'N', 'Y') AS regYn , IF(uss.scrty_setup_trget_id IS NULL, 'N', 'Y') AS regYn
, esntl_id AS uniqId , esntl_id AS uniqId
FROM ( FROM (
SELECT mber_id USER_ID
, mber_nm USER_NM
, group_id
, esntl_id
FROM xit_gnrl_mber
UNION ALL
SELECT entrprs_mber_id user_id
, cmpny_nm user_nm
, group_id
, esntl_id
FROM xit_entrprs_mber
UNION ALL
SELECT user_id SELECT user_id
, user_nm user_nm , user_nm user_nm
, group_id , group_id

@ -1,119 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.fims.framework.biz.mng.user.dao.XitEntUserRegMngMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
SELECT
A.ESNTL_ID AS "uniqId"
,'USR02' AS "userTy"
,A.ENTRPRS_MBER_ID AS "userId"
,A.CMPNY_NM AS "cmpnyNm"
,A.APPLCNT_NM AS "userNm"
,A.APPLCNT_EMAIL_ADRES AS "emailAdres"
,A.AREA_NO AS "areaNo"
,A.ENTRPRS_MIDDLE_TELNO AS "middleTelno"
,A.ENTRPRS_END_TELNO AS "endTelno"
,'' AS "mbtlnum"
,A.GROUP_ID AS "groupId"
,A.ENTRPRS_MBER_STTUS AS "sttus"
,A.REG_DT AS "regDt"
,(SELECT CODE_VAL FROM tb_cmn_code WHERE USE_YN = 'Y' AND GRP_ID = 'XIT013' AND CODE = A.ENTRPRS_MBER_STTUS) AS "userSttusCode"
</sql>
<sql id="findList_FROM">
FROM XIT_ENTRPRS_MBER A
</sql>
<sql id="findList_WHERE">
<if test="'0'.toString() != sbscrbSttus">
AND A.ENTRPRS_MBER_STTUS LIKE #{sbscrbSttus}
</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<choose>
<when test="'0'.toString() == searchCondition">
AND A.ENTRPRS_MBER_ID LIKE #{searchKeyword}
</when>
<when test="'1'.toString() == searchCondition">
AND A.APPLCNT_NM LIKE CONCAT('%',#{searchKeyword},'%')
</when>
</choose>
</if>
</sql>
<select id="findList" resultType="kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO">
/** XitEntUserRegMngMapper.findList */
/** 기업사용자등록관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1 = 1
<include refid="findList_WHERE"/>
ORDER BY 13 DESC
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findListTotCnt" resultType="int">
/** XitEntUserRegMngMapper.findListTotCnt */
/** 기업사용자등록관리 목록 총건수 조회 */
SELECT COUNT(1) AS "CNT"
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
</select>
<select id="findView" resultType="kr.xit.fims.framework.biz.mng.user.XitEntUserRegMngVO">
/** XitEntUserRegMngMapper.findView */
/** 기업사용자등록관리 상세정보 조회 */
SELECT
A.ESNTL_ID AS "uniqId"
,'USR02' AS "userTy"
,A.ENTRPRS_MBER_ID AS "entrprsmberId"
,A.ENTRPRS_SE_CODE AS "entrprsSeCode"
,A.BIZRNO AS "bizrno"
,A.JURIRNO AS "jurirno"
,A.CMPNY_NM AS "cmpnyNm"
,A.CXFC AS "cxfc"
,A.ZIP AS "zip"
,A.ADRES AS "adres"
,A.ENTRPRS_MIDDLE_TELNO AS "entrprsMiddleTelno"
,A.FXNUM AS "fxnum"
,A.INDUTY_CODE AS "indutyCode"
,A.APPLCNT_NM AS "applcntNm"
,A.REG_DT AS "regDt"
,A.ENTRPRS_MBER_STTUS AS "entrprsMberSttus"
,A.ENTRPRS_MBER_PASSWORD AS "entrprsMberPassword"
,A.ENTRPRS_MBER_PASSWORD_HINT AS "entrprsMberPasswordHint"
,A.ENTRPRS_MBER_PASSWORD_CNSR AS "entrprsMberPasswordCnsr"
,A.GROUP_ID AS "groupId"
,A.DETAIL_ADRES AS "detailAdres"
,A.ENTRPRS_END_TELNO AS "entrprsEndTelno"
,A.AREA_NO AS "areaNo"
,A.APPLCNT_IHIDNUM AS "applcntIhidnum"
,A.APPLCNT_EMAIL_ADRES AS "applcntEmailAdres"
<!-- ,A.LOCK_AT AS "lockAt" -->
<include refid="findList_FROM"/>
WHERE A.ESNTL_ID = #{uniqId}
</select>
</mapper>

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.fims.framework.biz.mng.user.dao.XitGnrUserRegMngMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
SELECT
A.ESNTL_ID AS "uniqId"
,'USR01' AS "userTy"
,A.MBER_ID AS "userId"
,A.MBER_NM AS "userNm"
,A.MBER_EMAIL_ADRES AS "emailAdres"
,A.AREA_NO AS "areaNo"
,A.MIDDLE_TELNO AS "middleTelno"
,A.END_TELNO AS "endTelno"
,A.MBTLNUM AS "mbtlnum"
,A.GROUP_ID AS "groupId"
,A.MBER_STTUS AS "sttus"
,A.REG_DT AS "regDt"
,(SELECT CODE_VAL FROM tb_cmn_code WHERE USE_YN = 'Y' AND GRP_ID = 'XIT013' AND CODE = A.MBER_STTUS) AS "userSttusCode"
</sql>
<sql id="findList_FROM">
FROM XIT_GNRL_MBER A
</sql>
<sql id="findList_WHERE">
<if test="'0'.toString() != sbscrbSttus">
AND A.MBER_STTUS LIKE #{sbscrbSttus}
</if>
<if test="@kr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(searchKeyword)">
<choose>
<when test="'0'.toString() == searchCondition">
AND A.MBER_ID LIKE #{searchKeyword}
</when>
<when test="'1'.toString() == searchCondition">
AND A.MBER_NM LIKE CONCAT('%',#{searchKeyword},'%')
</when>
</choose>
</if>
</sql>
<select id="findList" resultType="kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO">
/** XitGnrUserRegMngMapper.findList */
/** 일반사용자등록관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1 = 1
<include refid="findList_WHERE"/>
ORDER BY 12 DESC
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findListTotCnt" resultType="int">
/** XitGnrUserRegMngMapper.findListTotCnt */
/** 일반사용자등록관리 목록 총건수 조회 */
SELECT COUNT(1) AS "CNT"
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
</select>
<select id="findView" resultType="kr.xit.fims.framework.biz.mng.user.XitGnrUserRegMngVO">
/** XitGnrUserRegMngMapper.findView */
/** 일반사용자등록관리 상세정보 조회 */
SELECT
A.ESNTL_ID AS "uniqId"
,'USR01' AS "userTy"
,A.MBER_ID AS "mberId"
,A.MBER_NM AS "mberNm"
,A.PASSWORD AS "password"
,A.PASSWORD_HINT AS "passwordHint"
,A.PASSWORD_CNSR AS "passwordCnsr"
,A.IHIDNUM AS "ihidnum"
,A.SEXDSTN_CODE AS "sexdstnCode"
,A.ZIP AS "zip"
,A.ADRES AS "adres"
,A.AREA_NO AS "areaNo"
,A.MBER_STTUS AS "mberSttus"
,A.DETAIL_ADRES AS "detailAdres"
,A.END_TELNO AS "endTelno"
,A.MBTLNUM AS "mbtlnum"
,A.GROUP_ID AS "groupId"
,A.MBER_FXNUM AS "mberFxnum"
,A.MBER_EMAIL_ADRES AS "mberEmailAdres"
,A.MIDDLE_TELNO AS "middleTelno"
,A.REG_DT AS "regDt"
<!-- ,A.LOCK_AT AS "lockAt" -->
<include refid="findList_FROM"/>
WHERE A.ESNTL_ID = #{uniqId}
</select>
</mapper>

@ -186,28 +186,6 @@
<!-- *************************************************************************************************************
* xit_gnrl_mber : 일반사용자 정보
************************************************************************************************************** -->
<delete id="deleteGnrlMber" parameterType="string">
/* user-mysql-mapper|deleteGnrlMber-일반사용자정보 삭제|julim */
DELETE
FROM xit_gnrl_mber
WHERE mber_id = #{userId}
</delete>
<!-- *************************************************************************************************************
* xit_entrprs_mber : 기업사용자 정보
************************************************************************************************************** -->
<delete id="deleteEntrprsMber" parameterType="string">
/* user-mysql-mapper|delectEntrprsMber-기업사용자정보 삭제|julim */
DELETE
FROM xit_entrprs_mber
WHERE entrprs_mber_id = #{userId}
</delete>
<!-- ************************************************************************************************************* <!-- *************************************************************************************************************
* xit_author_group_info : 권한그룹 정보 * xit_author_group_info : 권한그룹 정보

Loading…
Cancel
Save