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 {
@Resource
private AuthUserMgtMapper xitAuthUsrMngMapper;
private AuthUserMgtMapper mapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource
@ -32,7 +32,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public List<XitAuthUsrMngVO> findList(XitAuthUsrMngSearchVO searchVO) {
List<XitAuthUsrMngVO> result = null;
try {
result = xitAuthUsrMngMapper.findList(searchVO);
result = mapper.findList(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 목록 조회 FAIL::", e);
}
@ -43,7 +43,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public int findListTotCnt(XitAuthUsrMngSearchVO searchVO) {
int result = 0;
try {
result = xitAuthUsrMngMapper.findListTotCnt(searchVO);
result = mapper.findListTotCnt(searchVO);
} catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 목록 총건수 조회 FAIL::", e);
}
@ -54,7 +54,7 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
public XitAuthUsrMngVO findView(XitAuthUsrMngVO vo) {
XitAuthUsrMngVO result = null;
try {
result = xitAuthUsrMngMapper.findView(vo);
result = mapper.findView(vo);
} catch (SQLException e) {
throw new RuntimeException("사용자별권한관리 상세정보 조회 FAIL::", e);
}
@ -145,13 +145,13 @@ public class AuthUserMgtServiceImpl implements AuthUserMgtService {
@Override
public List<Map<String, String>> findListGroup(XitBaseSearchVO searchVO) {
return xitAuthUsrMngMapper.findListGroup(searchVO);
return mapper.findListGroup(searchVO);
}
@Override
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.ResponseBody;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;
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.mng.auth.model.XitAuthUsrMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO;
@ -54,7 +52,7 @@ import kr.xit.framework.support.util.AjaxUtils;
public class AuthUserMgtController {
@Resource
private AuthUserMgtService xitAuthUsrMngService;
private AuthUserMgtService service;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Autowired
@ -70,10 +68,7 @@ public class AuthUserMgtController {
* @date: 2020. 4. 16.
*/
@GetMapping(value = "/mngAuthUserMgtForm")
public ModelAndView mngAuthUserMgtForm(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO) {
ModelAndView mav = new ModelAndView();
mav.addObject("authorManageList", xitFrameCrudService.findXitAuthorInfos(new XitAuthorInfoVO()));
return mav;
public void mngAuthUserMgtForm(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO) {
}
/**
@ -100,7 +95,7 @@ public class AuthUserMgtController {
/**
*
*/
int totCnt = xitAuthUsrMngService.findListTotCnt(searchVO);
int totCnt = service.findListTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
/**
*
@ -111,7 +106,7 @@ public class AuthUserMgtController {
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", 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>();
pagination.put("page", searchVO.getPage());
pagination.put("totalCount", totCnt);
@ -195,9 +190,9 @@ public class AuthUserMgtController {
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
list = xitAuthUsrMngService.findListGroup(searchVO);
list = service.findListGroup(searchVO);
totCnt = xitAuthUsrMngService.findListGroupTotCnt(searchVO);
totCnt = service.findListGroupTotCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("groupList", list);
@ -265,9 +260,9 @@ public class AuthUserMgtController {
vo.setAuthorCode(strAuthorCodes[i]);
vo.setMberTyCode(strMberTyCode[i]);
if("N".equals(strRegYns[i]))
xitAuthUsrMngService.addProc(vo);
service.addProc(vo);
else
xitAuthUsrMngService.modifyProc(vo);
service.modifyProc(vo);
}
status.setComplete();
message = xitMessageSource.getMessage("success.common.insert");
@ -292,7 +287,7 @@ public class AuthUserMgtController {
case "deletes": //다건 삭제
//처리
try {
xitAuthUsrMngService.removesProc(userIds, groupIds);
service.removesProc(userIds, groupIds);
status.setComplete();
message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) {

@ -1,15 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ 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">
<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}'/>"/>
<form:form>
<div class="search r2">
<table>
@ -18,9 +10,9 @@
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
@ -31,7 +23,9 @@
<option value="3" <c:if test="${authorGroupVO.searchCondition == '3'}">selected</c:if> >그룹</option>
</select>
<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>
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />

Loading…
Cancel
Save