fix : 유저 관련 수정

main
이범준 1 year ago
parent 8801a98305
commit 6fe8dae679

@ -32,7 +32,7 @@ public interface UserMgtService {
void addUser(final XitUserInfoVO userInfoVO); void addUser(final XitUserInfoVO userInfoVO);
void modifyUser(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); String getDefaultAuthorCode(final String grpId);

@ -127,30 +127,21 @@ public class UserMgtServiceBean extends AbstractServiceBean implements UserMgtSe
} }
@Override @Override
@Transactional @Transactional
public void removeUser(final String userTy, final String userId) { public void removeUser(final String userId) {
//업무사용자 삭제 //업무사용자 삭제
if (userTy.equals("USR03")){ Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(userId);
Map<String,Object> userInfoCheckMap = mapper.selectCheckUserInfo(userId); String scrtySetupTrgetId = String.valueOf(userInfoCheckMap.get("user_id"));
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")){ //기업회원 삭제
//사용자보안설정 삭제
if(Checks.isNotEmpty(mapper.selectUserScrtySetup(scrtySetupTrgetId))) {
mapper.deleteUserScrtySetup(scrtySetupTrgetId);
} }
//사용자정보변경내역 전체 삭제
mapper.deleteUserInfoChangeDtlsList(userId);
//업무사용자(직원)삭제
mapper.deleteUserInfo(userId);
} }
/** /**

@ -110,10 +110,10 @@ public class UserMgtController extends AbstractController {
} }
@PostMapping(name = "", value = "/removeUser") @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); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.removeUser(userTy, userId); service.removeUser(userId);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav; return mav;
} }

@ -159,9 +159,9 @@
SELECT AUTHOR_CODE AS "authorCode" SELECT AUTHOR_CODE AS "authorCode"
FROM XIT_USER_SCRTY_SETUP FROM XIT_USER_SCRTY_SETUP
WHERE SCRTY_SETUP_TRGET_ID = ( WHERE SCRTY_SETUP_TRGET_ID = (
SELECT USER_KEY SELECT USER_ID
FROM XIT_VW_USER_MASTR FROM XIT_VW_USER_MASTR
WHERE USER_ID = #{searchKeyword} WHERE USER_ACNT = #{searchKeyword}
) )
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save