diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/UserMgtService.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/UserMgtService.java index a22e1695..02707f28 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/UserMgtService.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/UserMgtService.java @@ -32,7 +32,7 @@ public interface UserMgtService { void addUser(final XitUserInfoVO userInfoVO); void modifyUser(final XitUserInfoVO userInfoVO); - void removeUser(final String userTy, final String uniqId); + void removeUser(final String uniqId); String getDefaultAuthorCode(final String grpId); diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java index 1794bc05..83a9b155 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/service/bean/UserMgtServiceBean.java @@ -127,30 +127,21 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe } @Override @Transactional - public void removeUser(final String userTy, final String userId) { + public void removeUser(final String userId) { //업무사용자 삭제 - if (userTy.equals("USR03")){ - Map userInfoCheckMap = mapper.selectCheckUserInfo(userId); - String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("user_key")); - - //사용자보안설정 삭제 - if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) { - mapper.deleteUserScrtySetup(scrtySetupTrgetId); - } - //사용자정보변경내역 전체 삭제 - mapper.deleteUserInfoChangeDtlsList(userId); - //업무사용자(직원)삭제 - mapper.deleteUserInfo(userId); - - //일반회원 삭제 - }else if(userTy.equals("USR01")){ - - - //기업회원 삭제 - }else if(userTy.equals("USR02")){ //기업회원 삭제 + Map userInfoCheckMap = mapper.selectCheckUserInfo(userId); + String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("user_id")); + //사용자보안설정 삭제 + if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) { + mapper.deleteUserScrtySetup(scrtySetupTrgetId); } + //사용자정보변경내역 전체 삭제 + mapper.deleteUserInfoChangeDtlsList(userId); + //업무사용자(직원)삭제 + mapper.deleteUserInfo(userId); + } /** diff --git a/src/main/java/kr/xit/fims/framework/biz/mng/user/web/UserMgtController.java b/src/main/java/kr/xit/fims/framework/biz/mng/user/web/UserMgtController.java index 1eef3eda..61c9dab7 100644 --- a/src/main/java/kr/xit/fims/framework/biz/mng/user/web/UserMgtController.java +++ b/src/main/java/kr/xit/fims/framework/biz/mng/user/web/UserMgtController.java @@ -110,10 +110,10 @@ public class UserMgtController extends AbstractController { } @PostMapping(name = "", value = "/removeUser") - public ModelAndView removeUser(@RequestParam final String userTy, @RequestParam final String userId){ + public ModelAndView removeUser(@RequestParam final String userId){ ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); - service.removeUser(userTy, userId); + service.removeUser(userId); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); return mav; } diff --git a/src/main/resources/sql/mapper/framework/mng/menu/menu-mysql-mapper.xml b/src/main/resources/sql/mapper/framework/mng/menu/menu-mysql-mapper.xml index 602c94c1..e9e16c1e 100644 --- a/src/main/resources/sql/mapper/framework/mng/menu/menu-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/framework/mng/menu/menu-mysql-mapper.xml @@ -159,9 +159,9 @@ SELECT AUTHOR_CODE AS "authorCode" FROM XIT_USER_SCRTY_SETUP WHERE SCRTY_SETUP_TRGET_ID = ( - SELECT USER_KEY + SELECT USER_ID FROM XIT_VW_USER_MASTR - WHERE USER_ID = #{searchKeyword} + WHERE USER_ACNT = #{searchKeyword} )