From e33d03fb6e6b292a91d8c42b27269022c2efc1c3 Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Thu, 3 Nov 2022 02:43:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B6=8C=ED=95=9C=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?-=20AuthRole=20=EC=A7=84=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mng/auth/mapper/AuthRoleMgtMapper.java | 25 ++- .../biz/mng/auth/model/XitAuthRuleMngVO.java | 144 ++---------------- .../mng/auth/service/AuthRoleMgtService.java | 30 +--- .../service/impl/AuthRoleMgtServiceImpl.java | 107 +++---------- .../mng/auth/web/AuthRoleMgtController.java | 127 ++++++++------- .../mng/auth/auth-grp-mysql-mapper.xml | 73 +++++++++ .../framework/mng/auth/auth-mysql-mapper.xml | 67 ++++++++ .../mng/auth/auth-role-mysql-mapper.xml | 95 ++++++++++-- 8 files changed, 347 insertions(+), 321 deletions(-) diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java index 88649ac8..ceb844fb 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/mapper/AuthRoleMgtMapper.java @@ -2,10 +2,12 @@ package kr.xit.framework.biz.mng.auth.mapper; import java.sql.SQLException; import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; -import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO; /** * @@ -28,17 +30,8 @@ public interface AuthRoleMgtMapper { * @author: 박민규 * @date: 2020. 4. 16. */ - public List findList(XitAuthRuleMngSearchVO searchVO) throws SQLException; - - /** - *
메소드 설명: 롤관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitAuthRuleMngSearchVO searchVO) throws SQLException; - + List selectAuthRoles(final Map paraMap, final RowBounds rowBounds); + /** *
메소드 설명: 롤관리 상세정보 조회
* @param vo @@ -46,6 +39,12 @@ public interface AuthRoleMgtMapper { * @author: 박민규 * @date: 2020. 4. 16. */ - public XitAuthRuleMngVO findView(XitAuthRuleMngVO vo) throws SQLException; + XitAuthRuleMngVO selectAuthRole(final String roleCode); + + int insertAuthRole(final XitAuthRuleMngVO vo); + + int updateAuthRole(final XitAuthRuleMngVO vo); + + int deleteAuthRole(final String roleCode); } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/model/XitAuthRuleMngVO.java b/src/main/java/kr/xit/framework/biz/mng/auth/model/XitAuthRuleMngVO.java index 9a714fd5..dc511f43 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/model/XitAuthRuleMngVO.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/model/XitAuthRuleMngVO.java @@ -1,6 +1,12 @@ package kr.xit.framework.biz.mng.auth.model; import kr.xit.framework.core.model.BaseVO; +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; /** * @@ -12,6 +18,12 @@ import kr.xit.framework.core.model.BaseVO; * @since 2002. 2. 2. * @version 1.0 Copyright(c) XIT All rights reserved. */ +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +@ToString public class XitAuthRuleMngVO extends BaseVO { /** * serialVersionUID @@ -32,7 +44,7 @@ public class XitAuthRuleMngVO extends BaseVO { /** * 롤패턴 */ - private String rolePtn; + private String rolePttrn; /** * 롤 설명 */ @@ -40,7 +52,7 @@ public class XitAuthRuleMngVO extends BaseVO { /** * 롤 타입 */ - private String roleTyp; + private String roleTy; /** * 롤 Sort */ @@ -53,132 +65,4 @@ public class XitAuthRuleMngVO extends BaseVO { * 권한 코드 */ private String authorCode; - - /** - * roleManage attribute 를 리턴한다. - * @return RoleManage - */ - public XitAuthRuleMngVO getRoleManage() { - return roleManage; - } - /** - * roleManage attribute 값을 설정한다. - * @param roleManage RoleManage - */ - public void setRoleManage(XitAuthRuleMngVO roleManage) { - this.roleManage = roleManage; - } - /** - * roleCode attribute 를 리턴한다. - * @return String - */ - public String getRoleCode() { - return roleCode; - } - /** - * roleCode attribute 값을 설정한다. - * @param roleCode String - */ - public void setRoleCode(String roleCode) { - this.roleCode = roleCode; - } - /** - * roleNm attribute 를 리턴한다. - * @return String - */ - public String getRoleNm() { - return roleNm; - } - /** - * roleNm attribute 값을 설정한다. - * @param roleNm String - */ - public void setRoleNm(String roleNm) { - this.roleNm = roleNm; - } - /** - * rolePtn attribute 를 리턴한다. - * @return String - */ - public String getRolePtn() { - return rolePtn; - } - /** - * rolePtn attribute 값을 설정한다. - * @param rolePtn String - */ - public void setRolePtn(String rolePtn) { - this.rolePtn = rolePtn; - } - /** - * roleDc attribute 를 리턴한다. - * @return String - */ - public String getRoleDc() { - return roleDc; - } - /** - * roleDc attribute 값을 설정한다. - * @param roleDc String - */ - public void setRoleDc(String roleDc) { - this.roleDc = roleDc; - } - /** - * roleTyp attribute 를 리턴한다. - * @return String - */ - public String getRoleTyp() { - return roleTyp; - } - /** - * roleTyp attribute 값을 설정한다. - * @param roleTyp String - */ - public void setRoleTyp(String roleTyp) { - this.roleTyp = roleTyp; - } - /** - * roleSort attribute 를 리턴한다. - * @return String - */ - public String getRoleSort() { - return roleSort; - } - /** - * roleSort attribute 값을 설정한다. - * @param roleSort String - */ - public void setRoleSort(String roleSort) { - this.roleSort = roleSort; - } - /** - * roleCreatDe attribute 를 리턴한다. - * @return String - */ - public String getRoleCreatDe() { - return roleCreatDe; - } - /** - * roleCreatDe attribute 값을 설정한다. - * @param roleCreatDe String - */ - public void setRoleCreatDe(String roleCreatDe) { - this.roleCreatDe = roleCreatDe; - } - /** - * authorCode attribute 를 리턴한다. - * @return String - */ - public String getAuthorCode() { - return authorCode; - } - /** - * authorCode attribute 값을 설정한다. - * @param authorCode String - */ - public void setAuthorCode(String authorCode) { - this.authorCode = authorCode; - } - } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthRoleMgtService.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthRoleMgtService.java index a6bf7f69..985697af 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthRoleMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/AuthRoleMgtService.java @@ -1,6 +1,9 @@ package kr.xit.framework.biz.mng.auth.service; import java.util.List; +import java.util.Map; + +import org.apache.ibatis.session.RowBounds; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; @@ -25,16 +28,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - public List findList(XitAuthRuleMngSearchVO searchVO); - - /** - *
메소드 설명: 롤관리 목록 총건수 조회
- * @param searchVO - * @return int 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public int findListTotCnt(XitAuthRuleMngSearchVO searchVO); + List findAuthRoles(final Map paraMap, final RowBounds rowBounds); /** *
메소드 설명: 롤관리 상세정보 조회
@@ -43,7 +37,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - public XitAuthRuleMngVO findView(XitAuthRuleMngVO vo); + XitAuthRuleMngVO findAuthRole(final String roleCode); /** *
메소드 설명: 롤관리 등록
@@ -51,7 +45,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - public void addProc(XitAuthRuleMngVO vo); + void addAuthRole(XitAuthRuleMngVO vo); /** *
메소드 설명: 롤관리 수정
@@ -59,7 +53,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - public void modifyProc(XitAuthRuleMngVO vo); + void modifyAuthRole(XitAuthRuleMngVO vo); /** *
메소드 설명: 롤관리 삭제
@@ -67,14 +61,6 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - public void removeProc(XitAuthRuleMngVO vo); - - /** - *
메소드 설명: 롤관리 다건 삭제
- * @param ids void 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - public void removesProc(String ids); + void removeAuthRole(final String roleCode); } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthRoleMgtServiceImpl.java b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthRoleMgtServiceImpl.java index c03b44a3..968a316a 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthRoleMgtServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/service/impl/AuthRoleMgtServiceImpl.java @@ -1,10 +1,11 @@ package kr.xit.framework.biz.mng.auth.service.impl; -import java.sql.SQLException; import java.util.List; +import java.util.Map; import javax.annotation.Resource; +import org.apache.ibatis.session.RowBounds; import org.springframework.stereotype.Service; import egovframework.rte.fdl.cmmn.exception.FdlException; @@ -12,7 +13,6 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService; import kr.xit.framework.biz.cmm.model.XitRoleInfoVO; import kr.xit.framework.biz.cmm.service.XitFrameCrudService; import kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper; -import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; import kr.xit.framework.biz.mng.auth.service.AuthRoleMgtService; import kr.xit.framework.core.message.XitMessageSource; @@ -21,7 +21,7 @@ import kr.xit.framework.core.message.XitMessageSource; public class AuthRoleMgtServiceImpl implements AuthRoleMgtService { @Resource - private AuthRoleMgtMapper xitAuthRuleMngMapper; + private AuthRoleMgtMapper mapper; @Resource private XitFrameCrudService xitFrameCrudService; @Resource(name="xitRoleIdGnrService") @@ -30,44 +30,21 @@ public class AuthRoleMgtServiceImpl implements AuthRoleMgtService { private XitMessageSource xitMessageSource; @Override - public List findList(XitAuthRuleMngSearchVO searchVO) { - List result = null; - try { - result = xitAuthRuleMngMapper.findList(searchVO); - } catch (SQLException e) { - throw new RuntimeException("롤관리 목록 조회 FAIL::", e); - } - return result; - } - - @Override - public int findListTotCnt(XitAuthRuleMngSearchVO searchVO) { - int result = 0; - try { - result = xitAuthRuleMngMapper.findListTotCnt(searchVO); - } catch (SQLException e) { - throw new RuntimeException("롤관리 목록 총건수 조회 FAIL::", e); - } - return result; + public List findAuthRoles(final Map paraMap, final RowBounds rowBounds) { + return mapper.selectAuthRoles(paraMap, rowBounds); } @Override - public XitAuthRuleMngVO findView(XitAuthRuleMngVO vo) { - XitAuthRuleMngVO result = null; - try { - result = xitAuthRuleMngMapper.findView(vo); - } catch (SQLException e) { - throw new RuntimeException("롤관리 상세정보 조회 FAIL::", e); - } - return result; + public XitAuthRuleMngVO findAuthRole(final String roleCode) { + return mapper.selectAuthRole(roleCode); } @Override - public void addProc(XitAuthRuleMngVO vo) { + public void addAuthRole(XitAuthRuleMngVO vo) { /** * 필수값 설정 */ - String roleTyp = vo.getRoleTyp(); + String roleTyp = vo.getRoleTy(); if("method".equals(roleTyp)) roleTyp = "mtd"; else if("pointcut".equals(roleTyp)) @@ -78,76 +55,32 @@ public class AuthRoleMgtServiceImpl implements AuthRoleMgtService { } catch (FdlException e) { throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage())); } - XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); + //XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); - /** - * 처리 - */ - xitFrameCrudService.addXitRoleInfo(roleInfoVO); + //mapper.insertAuthRole(vo); + //xitFrameCrudService.addXitRoleInfo(roleInfoVO); } @Override - public void modifyProc(XitAuthRuleMngVO vo) { + public void modifyAuthRole(XitAuthRuleMngVO vo) { /** * 필수값 설정 */ - XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); + //XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); - /** - * 처리 - */ - xitFrameCrudService.modifyXitRoleInfo(roleInfoVO); + //mapper.updateAuthRole(vo); + //xitFrameCrudService.modifyXitRoleInfo(roleInfoVO); } @Override - public void removeProc(XitAuthRuleMngVO vo) { - /** - * 필수값 설정 - */ - XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); + public void removeAuthRole(final String roleCode) { + - /** - * 처리 - */ - xitFrameCrudService.removeXitRoleInfo(roleInfoVO); - } - - @Override - public void removesProc(String ids) { - /** - * 처리 - */ - String [] roleCodes = ids.split(";"); - for(int i=0; i - * 메소드 설명: 메뉴VO를 CRUD Service의 VO로 변환 한다. - * - * - * @return XitRoleInfoVO 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - private XitRoleInfoVO convertToCrudVO(XitAuthRuleMngVO vo) { - XitRoleInfoVO roleInfoVO = new XitRoleInfoVO(); - roleInfoVO.setRole_code (vo.getRoleCode()); //역할 코드 - roleInfoVO.setRole_nm (vo.getRoleNm()); //역할 명 - roleInfoVO.setRole_pttrn (vo.getRolePtn()); //역할 패턴 - roleInfoVO.setRole_dc (vo.getRoleDc()); //역할 설명 - roleInfoVO.setRole_ty (vo.getRoleTyp()); //역할 유형 - roleInfoVO.setRole_sort (vo.getRoleSort()); //역할 정렬 -// roleInfoVO.setRole_creat_de(vo.getRoleCreatDe()); //역할 생성 일 - - return roleInfoVO; + //mapper.deleteAuthRole(roleCode); + //xitFrameCrudService.removeXitRoleInfo(roleInfoVO); } } diff --git a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java index 506623ab..9315e6a0 100644 --- a/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java +++ b/src/main/java/kr/xit/framework/biz/mng/auth/web/AuthRoleMgtController.java @@ -14,25 +14,35 @@ 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.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; 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.service.XitFrameCodeService; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; import kr.xit.framework.biz.mng.auth.service.AuthRoleMgtService; +import kr.xit.framework.biz.mng.menu.model.ProgramMngVO; import kr.xit.framework.core.constants.FrameworkConstants; import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE; import kr.xit.framework.core.message.XitMessageSource; +import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.validation.XitBeanValidator; +import kr.xit.framework.support.mybatis.MybatisUtils; +import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxUtils; +import kr.xit.framework.support.util.Checks; +import kr.xit.framework.support.util.ValidationError; +import kr.xit.framework.support.util.constants.MessageKey; /** * @@ -49,7 +59,7 @@ import kr.xit.framework.support.util.AjaxUtils; public class AuthRoleMgtController { @Resource - private AuthRoleMgtService xitAuthRuleMngService; + private AuthRoleMgtService service; @Resource private XitFrameCodeService xitFrameCodeService; @Autowired @@ -68,66 +78,70 @@ public class AuthRoleMgtController { @RequestMapping(value = "mngAuthRoleMgtForm", method={RequestMethod.GET, RequestMethod.POST}) public void mngAuthRoleMgtForm() { } - + + @RequestMapping(value = "mnuAuthRoleMgtPopup") + public ModelAndView mngAuthRoleMgtPopup(final XitAuthRuleMngVO vo){ + ModelAndView mav = new ModelAndView(); + + if(Checks.isEmpty(vo)){ + mav.addObject("roleManage", new ProgramMngVO()); + mav.addObject("pageTitle", "롤 등록"); + } else { + mav.addObject("roleManage", vo); + mav.addObject("pageTitle", "롤 정보 변경"); + } + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngAuthRoleMgtPopup.popup"); + return mav; + } + /** *
메소드 설명: 롤 관리 목록 페이지 조회
* @return String 요청처리 후 응답객체 * @author: 김동규 * @date: 2020. 7. 31. */ - @RequestMapping(value = "AuthRuleMng_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) - @ResponseBody - public Map AuthRuleMng_listAjax(@ModelAttribute("roleManageVO") XitAuthRuleMngSearchVO searchVO, ModelMap model) { - - /** paging */ - PaginationInfo paginationInfo = new PaginationInfo(); - paginationInfo.setCurrentPageNo(searchVO.getPage()>-1?searchVO.getPage():searchVO.getPageIndex()); - paginationInfo.setRecordCountPerPage(searchVO.getPerPage()>-1?searchVO.getPerPage():searchVO.getPageUnit()); - paginationInfo.setPageSize(searchVO.getPageSize()); - searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex()); - searchVO.setLastIndex(paginationInfo.getLastRecordIndex()); - searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage()); - - Map resultMap = new HashMap(); - try { - /** - * 조회 - */ - int totCnt = xitAuthRuleMngService.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 data = new HashMap(); - data.put("contents", xitAuthRuleMngService.findList(searchVO)); //[tui Grid] data-contents - Map pagination = new HashMap(); - pagination.put("page", searchVO.getPage()); - pagination.put("totalCount", 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; + @GetMapping(value = "findAuthRoles") + public ModelAndView findAuthRoles(final Map paraMap) { + return ResultResponse.of(service.findAuthRoles(paraMap, MybatisUtils.getPagingInfo(paraMap))); } + @PostMapping(value = "/addAuthRole") + public ModelAndView addAuthRole(@ModelAttribute final XitAuthRuleMngVO vo, final BindingResult bindingResult) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + //유효성 확인 + ValidationError.of("roleManage", vo, bindingResult); + service.addAuthRole(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; + } + + @PostMapping(value = "/modifyAuthRole") + public ModelAndView modifyAuthRole(@ModelAttribute final XitAuthRuleMngVO vo, final BindingResult bindingResult) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + //유효성 확인 + ValidationError.of("roleManage", vo, bindingResult); + service.modifyAuthRole(vo); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); + return mav; + } + + @PostMapping(value = "/removeAuthRole") + public ModelAndView removeAuthRole(final String roleCode) { + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + + service.removeAuthRole(roleCode); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); + return mav; + } + + + + + /** *
메소드 설명: 요청 페이지로 이동 한다.
- * @param page * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) * @param model * @return String 요청처리 후 응답객체 @@ -155,7 +169,7 @@ public class AuthRoleMgtController { ================*/ model.addAttribute("cmmCodeDetailList" , xitFrameCodeService.findCmmnDetailCodes("XIT029")); //롤유형코드 목록 - model.addAttribute("roleManage", xitAuthRuleMngService.findView(vo)); + model.addAttribute("roleManage", service.findAuthRole(null)); model.addAttribute("message", xitMessageSource.getMessage("success.common.select")); break; default: @@ -172,7 +186,6 @@ public class AuthRoleMgtController { /** *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param page * @param model * @return String 요청처리 후 응답객체 * @author: 박민규 @@ -233,7 +246,7 @@ public class AuthRoleMgtController { } //처리 try { - xitAuthRuleMngService.addProc(vo); + service.addAuthRole(vo); status.setComplete(); message = xitMessageSource.getMessage("success.common.insert"); model.addAttribute("roleCode", vo.getRoleCode()); @@ -260,7 +273,7 @@ public class AuthRoleMgtController { } //처리 try { - xitAuthRuleMngService.modifyProc(vo); + service.modifyAuthRole(vo); status.setComplete(); message = xitMessageSource.getMessage("success.common.update"); } catch (RuntimeException e) { @@ -275,7 +288,7 @@ public class AuthRoleMgtController { case "delete": //삭제 //처리 try { - xitAuthRuleMngService.removeProc(vo); + service.removeAuthRole(null); status.setComplete(); message = xitMessageSource.getMessage("success.common.delete"); break; @@ -291,7 +304,7 @@ public class AuthRoleMgtController { case "deletes": //다건 삭제 //처리 try { - xitAuthRuleMngService.removesProc(roleCodes); + //service.removesProc(); status.setComplete(); message = xitMessageSource.getMessage("success.common.delete"); } catch (RuntimeException e) { diff --git a/src/main/resources/sqlmapper/framework/mng/auth/auth-grp-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/auth-grp-mysql-mapper.xml index d053e3cd..7428ec61 100644 --- a/src/main/resources/sqlmapper/framework/mng/auth/auth-grp-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/auth/auth-grp-mysql-mapper.xml @@ -1,6 +1,79 @@ + + + + + /** addXitAuthorGroupInfo */ + /** 권한그룹정보 등록 */ + INSERT INTO XIT_AUTHOR_GROUP_INFO( + GROUP_ID + ,GROUP_NM + ,GROUP_CREAT_DE + ,GROUP_DC + ,AUTHOR_CODE + )VALUES( + #{group_id } + ,#{group_nm } + ,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') + ,#{group_dc } + ,#{author_code } + ) + + + /** modifyXitAuthorGroupInfo */ + /** 권한그룹정보 수정 */ + UPDATE XIT_AUTHOR_GROUP_INFO + SET + GROUP_CREAT_DE = GROUP_CREAT_DE + ,GROUP_NM = #{group_nm } + ,GROUP_DC = #{group_dc } + ,AUTHOR_CODE = #{author_code} + WHERE 1=1 + AND GROUP_ID = #{group_id} + + + /** removeXitAuthorGroupInfo */ + /** 권한그룹정보 삭제 */ + DELETE FROM XIT_AUTHOR_GROUP_INFO + WHERE 1=1 + AND GROUP_ID = #{group_id} + + + + + + + + + SELECT LIST.* FROM( diff --git a/src/main/resources/sqlmapper/framework/mng/auth/auth-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/auth-mysql-mapper.xml index be384cf3..78d08a70 100644 --- a/src/main/resources/sqlmapper/framework/mng/auth/auth-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/auth/auth-mysql-mapper.xml @@ -1,6 +1,73 @@ + + + + + /** addXitAuthorInfo */ + /** 권한정보 등록 */ + INSERT INTO XIT_AUTHOR_INFO( + AUTHOR_CODE + ,AUTHOR_NM + ,AUTHOR_DC + ,AUTHOR_CREAT_DE + )VALUES( + #{author_code } + ,#{author_nm } + ,#{author_dc } + ,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') + ) + + + /** modifyXitAuthorInfo */ + /** 권한정보 수정 */ + UPDATE XIT_AUTHOR_INFO + SET + AUTHOR_CREAT_DE = AUTHOR_CREAT_DE + ,AUTHOR_NM = #{author_nm} + ,AUTHOR_DC = #{author_dc} + WHERE 1=1 + AND AUTHOR_CODE = #{author_code} + + + /** removeXitAuthorInfo */ + /** 권한정보 삭제 */ + DELETE FROM XIT_AUTHOR_INFO + WHERE 1=1 + AND AUTHOR_CODE = #{author_code} + + + + + + + + + SELECT LIST.* FROM( diff --git a/src/main/resources/sqlmapper/framework/mng/auth/auth-role-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/auth-role-mysql-mapper.xml index 7691d4ef..7e134081 100644 --- a/src/main/resources/sqlmapper/framework/mng/auth/auth-role-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/auth/auth-role-mysql-mapper.xml @@ -53,16 +53,7 @@ - - - + - - + + + + + + + + /** addXitRoleInfo */ + /** 역할정보 등록 */ + INSERT INTO XIT_ROLE_INFO( + ROLE_CODE + ,ROLE_NM + ,ROLE_PTTRN + ,ROLE_DC + ,ROLE_TY + ,ROLE_SORT + ,ROLE_CREAT_DE + )VALUES( + #{role_code } + ,#{role_nm } + ,#{role_pttrn } + ,#{role_dc } + ,#{role_ty } + ,#{role_sort } + ,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s') + ) + + + /** modifyXitRoleInfo */ + /** 역할정보 수정 */ + UPDATE XIT_ROLE_INFO + SET + ROLE_NM = IFNULL(#{role_nm }, ROLE_NM) + ,ROLE_PTTRN = #{role_pttrn } + ,ROLE_DC = #{role_dc } + ,ROLE_TY = #{role_ty } + ,ROLE_SORT = #{role_sort } + ,ROLE_CREAT_DE = #{role_creat_de} + WHERE 1=1 + AND ROLE_CODE = #{role_code} + + + /** removeXitRoleInfo */ + /** 역할정보 삭제 */ + DELETE FROM XIT_ROLE_INFO + WHERE 1=1 + AND ROLE_CODE = #{role_code} + + +