feat: 권한별 사용자 관리

main
Jonguk. Lim 2 years ago
parent 41aabf98cf
commit 7a936cacdd

@ -22,7 +22,7 @@ import kr.xit.framework.core.utils.XitCmmnUtil;
public class AuthUserMgtServiceImpl implements AuthUserMgtService { public class AuthUserMgtServiceImpl implements AuthUserMgtService {
@Resource @Resource
private AuthUserMgtMapper xitAuthUsrMngMapper; private AuthUserMgtMapper mapper;
@Resource @Resource
private XitFrameCrudService xitFrameCrudService; private XitFrameCrudService xitFrameCrudService;
@Resource @Resource
@ -32,7 +32,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public List<XitAuthUsrMngVO> findList(XitAuthUsrMngSearchVO searchVO) { public List<XitAuthUsrMngVO> findList(XitAuthUsrMngSearchVO searchVO) {
List<XitAuthUsrMngVO> result = null; List<XitAuthUsrMngVO> result = null;
try { try {
result = xitAuthUsrMngMapper.findList(searchVO); result = mapper.findList(searchVO);
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 목록 조회 FAIL::", e); throw new RuntimeException("사용자별권한관리 목록 조회 FAIL::", e);
} }
@ -43,7 +43,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public int findListTotCnt(XitAuthUsrMngSearchVO searchVO) { public int findListTotCnt(XitAuthUsrMngSearchVO searchVO) {
int result = 0; int result = 0;
try { try {
result = xitAuthUsrMngMapper.findListTotCnt(searchVO); result = mapper.findListTotCnt(searchVO);
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 목록 총건수 조회 FAIL::", e); throw new RuntimeException("사용자별권한관리 목록 총건수 조회 FAIL::", e);
} }
@ -54,7 +54,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public XitAuthUsrMngVO findView(XitAuthUsrMngVO vo) { public XitAuthUsrMngVO findView(XitAuthUsrMngVO vo) {
XitAuthUsrMngVO result = null; XitAuthUsrMngVO result = null;
try { try {
result = xitAuthUsrMngMapper.findView(vo); result = mapper.findView(vo);
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 상세정보 조회 FAIL::", e); throw new RuntimeException("사용자별권한관리 상세정보 조회 FAIL::", e);
} }
@ -145,13 +145,13 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
@Override @Override
public List<Map<String, String>> findListGroup(XitBaseSearchVO searchVO) { public List<Map<String, String>> findListGroup(XitBaseSearchVO searchVO) {
return xitAuthUsrMngMapper.findListGroup(searchVO); return mapper.findListGroup(searchVO);
} }
@Override @Override
public int findListGroupTotCnt(XitBaseSearchVO searchVO) { public int findListGroupTotCnt(XitBaseSearchVO searchVO) {
return xitAuthUsrMngMapper.findListGroupTotCnt(searchVO); return mapper.findListGroupTotCnt(searchVO);
} }

@ -24,10 +24,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.support.SessionStatus; import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService; import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO; import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO;
@ -54,7 +52,7 @@ import kr.xit.framework.support.util.AjaxUtils;
public class AuthUserMgtController { public class AuthUserMgtController {
@Resource @Resource
private AuthUserMgtService xitAuthUsrMngService; private AuthUserMgtService service;
@Resource @Resource
private XitFrameCrudService xitFrameCrudService; private XitFrameCrudService xitFrameCrudService;
@Autowired @Autowired
@ -70,10 +68,7 @@ public class AuthUserMgtController {
* @date: 2020. 4. 16. * @date: 2020. 4. 16.
*/ */
@GetMapping(value = "/mngAuthUserMgtForm") @GetMapping(value = "/mngAuthUserMgtForm")
public ModelAndView mngAuthUserMgtForm(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO) { public void mngAuthUserMgtForm(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO) {
ModelAndView mav = new ModelAndView();
mav.addObject("authorManageList", xitFrameCrudService.findXitAuthorInfos(new XitAuthorInfoVO()));
return mav;
} }
/** /**
@ -100,7 +95,7 @@ public class AuthUserMgtController {
/** /**
* *
*/ */
int totCnt = xitAuthUsrMngService.findListTotCnt(searchVO); int totCnt = service.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt); paginationInfo.setTotalRecordCount(totCnt);
/** /**
* *
@ -111,7 +106,7 @@ public class AuthUserMgtController {
resultMap.put("result", true); //[tui Grid] result resultMap.put("result", true); //[tui Grid] result
resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message resultMap.put("message", xitMessageSource.getMessage("success.common.select")); //[tui Grid] result message
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
data.put("contents", xitAuthUsrMngService.findList(searchVO)); //[tui Grid] data-contents data.put("contents", service.findList(searchVO)); //[tui Grid] data-contents
Map<String, Integer> pagination = new HashMap<String, Integer>(); Map<String, Integer> pagination = new HashMap<String, Integer>();
pagination.put("page", searchVO.getPage()); pagination.put("page", searchVO.getPage());
pagination.put("totalCount", totCnt); pagination.put("totalCount", totCnt);
@ -195,9 +190,9 @@ public class AuthUserMgtController {
searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
list = xitAuthUsrMngService.findListGroup(searchVO); list = service.findListGroup(searchVO);
totCnt = xitAuthUsrMngService.findListGroupTotCnt(searchVO); totCnt = service.findListGroupTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt); paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("groupList", list); model.addAttribute("groupList", list);
@ -265,9 +260,9 @@ public class AuthUserMgtController {
vo.setAuthorCode(strAuthorCodes[i]); vo.setAuthorCode(strAuthorCodes[i]);
vo.setMberTyCode(strMberTyCode[i]); vo.setMberTyCode(strMberTyCode[i]);
if("N".equals(strRegYns[i])) if("N".equals(strRegYns[i]))
xitAuthUsrMngService.addProc(vo); service.addProc(vo);
else else
xitAuthUsrMngService.modifyProc(vo); service.modifyProc(vo);
} }
status.setComplete(); status.setComplete();
message = xitMessageSource.getMessage("success.common.insert"); message = xitMessageSource.getMessage("success.common.insert");
@ -292,7 +287,7 @@ public class AuthUserMgtController {
case "deletes": //다건 삭제 case "deletes": //다건 삭제
//처리 //처리
try { try {
xitAuthUsrMngService.removesProc(userIds, groupIds); service.removesProc(userIds, groupIds);
status.setComplete(); status.setComplete();
message = xitMessageSource.getMessage("success.common.delete"); message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) { } catch (RuntimeException e) {

@ -1,15 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> <%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<form:form id="listForm" name="listForm" action="<c:url value='/framework/biz/mng/auth/AuthUsrMng_list.do'/>" method="post"> <form:form>
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="userId" id="userId"/>
<input type="hidden" name="userIds" id="userIds"/>
<input type="hidden" name="authorCodes" id="authorCodes"/>
<input type="hidden" name="regYns" id="regYns"/>
<input type="hidden" name="mberTyCodes" id="mberTyCodes"/>
<input type="hidden" name="groupIds" id="groupIds"/>
<input type="hidden" name="pageIndex" value="<c:out value='${authorGroupVO.pageIndex}'/>"/>
<div class="search r2"> <div class="search r2">
<table> <table>
@ -18,9 +10,9 @@
<col style="width: 8%;"/> <col style="width: 8%;"/>
<col style="width: 20%;"/> <col style="width: 20%;"/>
<col style="width: 8%;"/> <col style="width: 8%;"/>
<col style="width: ;"/> <col/>
<col style="width: 8%;"/> <col style="width: 8%;"/>
<col style="width: ;"/> <col/>
<col style="width: 7%;"/> <col style="width: 7%;"/>
</colgroup> </colgroup>
<tbody> <tbody>
@ -31,7 +23,9 @@
<option value="3" <c:if test="${authorGroupVO.searchCondition == '3'}">selected</c:if> >그룹</option> <option value="3" <c:if test="${authorGroupVO.searchCondition == '3'}">selected</c:if> >그룹</option>
</select> </select>
<input name="searchKeyword" title="검색어" type="text" value="<c:out value="${userSearchVO.searchKeyword}"/>" /> <input name="searchKeyword" title="검색어" type="text" value="<c:out value="${userSearchVO.searchKeyword}"/>" />
<a href="#LINK" id="grpSearch_btn" class="btn sm darkgray" ><img src="<c:url value='/images/img_search.gif' />" alt="그룹검색" />검색</a> <a href="#" id="grpSearch_btn" class="btn sm darkgray" >
<img src="<c:url value='/resources/images/img_search.gif' />" alt="그룹검색" />검색
</a>
</td> </td>
<td> <td>
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" /> <input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />

Loading…
Cancel
Save