From 21c2ebad4f8ef257ac011394ccc748819991a55a Mon Sep 17 00:00:00 2001 From: minuk926 Date: Thu, 3 Nov 2022 21:54:19 +0900 Subject: [PATCH] =?UTF-8?q?feat(=EB=A1=A4=EA=B4=80=EB=A6=AC(mngAuthRoleMgt?= =?UTF-8?q?)=20=EB=B0=98=EC=98=81):=20tui-grid=20serialize=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/cmm/model/XitRoleInfoVO.java | 71 ++---- .../service/impl/XitFrameCrudServiceImpl.java | 8 +- .../mng/auth/mapper/AuthRoleMgtMapper.java | 10 +- .../mng/auth/service/AuthRoleMgtService.java | 9 +- .../service/impl/AuthRoleMgtServiceImpl.java | 45 +--- .../mng/auth/web/AuthRoleMgtController.java | 227 +----------------- .../cmm/XitFrameCrud-mysql-mapper.xml | 12 +- .../cmm/XitFrameCrud-oracle-mapper.xml | 12 +- .../mng/auth/auth-grp-mysql-mapper.xml | 3 + .../mng/auth/auth-hierarchy-mysql-mapper.xml | 5 + .../framework/mng/auth/auth-mysql-mapper.xml | 3 + .../mng/auth/auth-role-mysql-mapper.xml | 206 ++++++---------- .../mng/auth/auth-user-mysql-mapper.xml | 5 + .../framework/mng/auth/XitAuthRegMng.xml | 18 +- .../biz/mng/auth/mngAuthRoleMgtForm.jsp | 30 +-- .../biz/mng/auth/mngAuthRoleMgtPopup.jsp | 8 +- .../framework/js/cmm/xit-tui-grid.js | 2 +- 17 files changed, 195 insertions(+), 479 deletions(-) diff --git a/src/main/java/kr/xit/framework/biz/cmm/model/XitRoleInfoVO.java b/src/main/java/kr/xit/framework/biz/cmm/model/XitRoleInfoVO.java index 836e3659..4888a25b 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/model/XitRoleInfoVO.java +++ b/src/main/java/kr/xit/framework/biz/cmm/model/XitRoleInfoVO.java @@ -1,6 +1,12 @@ package kr.xit.framework.biz.cmm.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,61 +18,24 @@ 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 XitRoleInfoVO extends BaseVO { /** * serialVersionUID */ private static final long serialVersionUID = -2397747474398186436L; - protected String role_code; //역할 코드 - protected String role_nm; //역할 명 - protected String role_pttrn; //역할 패턴 - protected String role_dc; //역할 설명 - protected String role_ty; //역할 유형 - protected String role_sort; //역할 정렬 - protected String role_creat_de; //역할 생성 일 - - - public String getRole_code() { - return role_code; - } - public void setRole_code(String role_code) { - this.role_code = role_code; - } - public String getRole_nm() { - return role_nm; - } - public void setRole_nm(String role_nm) { - this.role_nm = role_nm; - } - public String getRole_pttrn() { - return role_pttrn; - } - public void setRole_pttrn(String role_pttrn) { - this.role_pttrn = role_pttrn; - } - public String getRole_dc() { - return role_dc; - } - public void setRole_dc(String role_dc) { - this.role_dc = role_dc; - } - public String getRole_ty() { - return role_ty; - } - public void setRole_ty(String role_ty) { - this.role_ty = role_ty; - } - public String getRole_sort() { - return role_sort; - } - public void setRole_sort(String role_sort) { - this.role_sort = role_sort; - } - public String getRole_creat_de() { - return role_creat_de; - } - public void setRole_creat_de(String role_creat_de) { - this.role_creat_de = role_creat_de; - } + protected String roleCode; //역할 코드 + protected String roleNm; //역할 명 + protected String rolePttrn; //역할 패턴 + protected String roleDc; //역할 설명 + protected String roleTy; //역할 유형 + protected String roleSort; //역할 정렬 + protected String roleCreatDe; //역할 생성 일 + } diff --git a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java index d785bd9c..53b0150d 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java +++ b/src/main/java/kr/xit/framework/biz/cmm/service/impl/XitFrameCrudServiceImpl.java @@ -3570,7 +3570,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getRole_code())) + if(XitCmmnUtil.isEmpty(vo.getRoleCode())) emsg = String.format("(%s)역할코드(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3601,7 +3601,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getRole_code())) + if(XitCmmnUtil.isEmpty(vo.getRoleCode())) emsg = String.format("(%s)역할코드(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3634,7 +3634,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getRole_code())) + if(XitCmmnUtil.isEmpty(vo.getRoleCode())) emsg = String.format("(%s)역할코드(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); @@ -3667,7 +3667,7 @@ public class XitFrameCrudServiceImpl implements XitFrameCrudService{ * 필수조건 확인 */ String emsg = null; - if(XitCmmnUtil.isEmpty(vo.getRole_code())) + if(XitCmmnUtil.isEmpty(vo.getRoleCode())) emsg = String.format("(%s)역할코드(은)는 필수조건 입니다.", table); if(emsg!=null){ logger.error(emsg); 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 ceb844fb..43281d17 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 @@ -4,9 +4,11 @@ import java.sql.SQLException; import java.util.List; import java.util.Map; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; import egovframework.rte.psl.dataaccess.mapper.Mapper; +import kr.xit.framework.biz.cmm.model.XitRoleInfoVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; /** @@ -30,7 +32,7 @@ public interface AuthRoleMgtMapper { * @author: 박민규 * @date: 2020. 4. 16. */ - List selectAuthRoles(final Map paraMap, final RowBounds rowBounds); + List selectAuthRoles(final Map paraMap, final RowBounds rowBounds); /** *
메소드 설명: 롤관리 상세정보 조회
@@ -39,11 +41,11 @@ public interface AuthRoleMgtMapper { * @author: 박민규 * @date: 2020. 4. 16. */ - XitAuthRuleMngVO selectAuthRole(final String roleCode); + XitRoleInfoVO selectAuthRole(final String roleCode); - int insertAuthRole(final XitAuthRuleMngVO vo); + int insertAuthRole(final XitRoleInfoVO vo); - int updateAuthRole(final XitAuthRuleMngVO vo); + int updateAuthRole(final XitRoleInfoVO vo); int deleteAuthRole(final String roleCode); 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 985697af..f28ed50d 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 @@ -5,6 +5,7 @@ import java.util.Map; import org.apache.ibatis.session.RowBounds; +import kr.xit.framework.biz.cmm.model.XitRoleInfoVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO; import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO; @@ -28,7 +29,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - List findAuthRoles(final Map paraMap, final RowBounds rowBounds); + List findAuthRoles(final Map paraMap, final RowBounds rowBounds); /** *
메소드 설명: 롤관리 상세정보 조회
@@ -37,7 +38,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - XitAuthRuleMngVO findAuthRole(final String roleCode); + XitRoleInfoVO findAuthRole(final String roleCode); /** *
메소드 설명: 롤관리 등록
@@ -45,7 +46,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - void addAuthRole(XitAuthRuleMngVO vo); + void addAuthRole(XitRoleInfoVO vo); /** *
메소드 설명: 롤관리 수정
@@ -53,7 +54,7 @@ public interface AuthRoleMgtService { * @author: 박민규 * @date: 2020. 4. 16. */ - void modifyAuthRole(XitAuthRuleMngVO vo); + void modifyAuthRole(XitRoleInfoVO vo); /** *
메소드 설명: 롤관리 삭제
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 968a316a..acbaaa26 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 @@ -16,6 +16,8 @@ import kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper; 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; +import kr.xit.framework.support.exception.BizRuntimeException; +import kr.xit.framework.support.util.constants.MessageKey; @Service public class AuthRoleMgtServiceImpl implements AuthRoleMgtService { @@ -30,57 +32,36 @@ public class AuthRoleMgtServiceImpl implements AuthRoleMgtService { private XitMessageSource xitMessageSource; @Override - public List findAuthRoles(final Map paraMap, final RowBounds rowBounds) { + public List findAuthRoles(final Map paraMap, final RowBounds rowBounds) { return mapper.selectAuthRoles(paraMap, rowBounds); } @Override - public XitAuthRuleMngVO findAuthRole(final String roleCode) { + public XitRoleInfoVO findAuthRole(final String roleCode) { return mapper.selectAuthRole(roleCode); } @Override - public void addAuthRole(XitAuthRuleMngVO vo) { - /** - * 필수값 설정 - */ + public void addAuthRole(final XitRoleInfoVO vo) { String roleTyp = vo.getRoleTy(); - if("method".equals(roleTyp)) - roleTyp = "mtd"; - else if("pointcut".equals(roleTyp)) - roleTyp = "pct"; - else roleTyp = "web"; + if("method".equals(roleTyp)) roleTyp = "mtd"; + else if("pointcut".equals(roleTyp)) roleTyp = "pct"; + else roleTyp = "web"; try { vo.setRoleCode(roleTyp.concat("-").concat(idgenService.getNextStringId())); } catch (FdlException e) { - throw new RuntimeException(String.format("%s %s", xitMessageSource.getMessage("fail.common.insert"), e.getMessage())); + throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, String.format("%s %s", xitMessageSource.getMessage(MessageKey.CMM_INSERT_FAIL), e.getMessage())); } - //XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); - - - //mapper.insertAuthRole(vo); - //xitFrameCrudService.addXitRoleInfo(roleInfoVO); + mapper.insertAuthRole(vo); } @Override - public void modifyAuthRole(XitAuthRuleMngVO vo) { - /** - * 필수값 설정 - */ - //XitRoleInfoVO roleInfoVO = convertToCrudVO(vo); - - - //mapper.updateAuthRole(vo); - //xitFrameCrudService.modifyXitRoleInfo(roleInfoVO); - + public void modifyAuthRole(XitRoleInfoVO vo) { + mapper.updateAuthRole(vo); } @Override public void removeAuthRole(final String roleCode) { - - - - //mapper.deleteAuthRole(roleCode); - //xitFrameCrudService.removeXitRoleInfo(roleInfoVO); + mapper.deleteAuthRole(roleCode); } } 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 9315e6a0..e121e4a6 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 @@ -26,6 +26,7 @@ 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.XitRoleInfoVO; 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; @@ -75,22 +76,22 @@ public class AuthRoleMgtController { * @author: 박민규 * @date: 2020. 4. 16. */ - @RequestMapping(value = "mngAuthRoleMgtForm", method={RequestMethod.GET, RequestMethod.POST}) + @RequestMapping(value = "/mngAuthRoleMgtForm", method={RequestMethod.GET, RequestMethod.POST}) public void mngAuthRoleMgtForm() { } - @RequestMapping(value = "mnuAuthRoleMgtPopup") - public ModelAndView mngAuthRoleMgtPopup(final XitAuthRuleMngVO vo){ + @RequestMapping(value = "/mngAuthRoleMgtPopup") + public ModelAndView mngAuthRoleMgtPopup(@ModelAttribute final XitRoleInfoVO vo){ ModelAndView mav = new ModelAndView(); if(Checks.isEmpty(vo)){ - mav.addObject("roleManage", new ProgramMngVO()); + mav.addObject("roleManage", new XitRoleInfoVO()); mav.addObject("pageTitle", "롤 등록"); } else { mav.addObject("roleManage", vo); mav.addObject("pageTitle", "롤 정보 변경"); } - mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngAuthRoleMgtPopup.popup"); + mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthRoleMgtPopup.popup"); return mav; } @@ -100,13 +101,13 @@ public class AuthRoleMgtController { * @author: 김동규 * @date: 2020. 7. 31. */ - @GetMapping(value = "findAuthRoles") - public ModelAndView findAuthRoles(final Map paraMap) { + @GetMapping(value = "/findAuthRoles") + public ModelAndView findAuthRoles(@RequestParam 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) { + public ModelAndView addAuthRole(@ModelAttribute final XitRoleInfoVO vo, final BindingResult bindingResult) { ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); //유효성 확인 @@ -117,7 +118,7 @@ public class AuthRoleMgtController { } @PostMapping(value = "/modifyAuthRole") - public ModelAndView modifyAuthRole(@ModelAttribute final XitAuthRuleMngVO vo, final BindingResult bindingResult) { + public ModelAndView modifyAuthRole(@ModelAttribute final XitRoleInfoVO vo, final BindingResult bindingResult) { ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); //유효성 확인 @@ -135,212 +136,4 @@ public class AuthRoleMgtController { AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS); return mav; } - - - - - - /** - *
메소드 설명: 요청 페이지로 이동 한다.
- * @param tilesDef 타일즈 적용 Type(none: tiles 미적용) - * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "AuthRuleMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST}) - public String AuthRuleMng_page(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("roleManageVO") XitAuthRuleMngVO vo - , @ModelAttribute("roleManageSearchVO") XitAuthRuleMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "input": //등록 페이지 - /*================ - * 코드목록 조회 - ================*/ - model.addAttribute("cmmCodeDetailList" , xitFrameCodeService.findCmmnDetailCodes("XIT029")); //롤유형코드 목록 - break; - - case "edit": //수정 페이지 - case "view": //상세 페이지 - /*================ - * 코드목록 조회 - ================*/ - model.addAttribute("cmmCodeDetailList" , xitFrameCodeService.findCmmnDetailCodes("XIT029")); //롤유형코드 목록 - - model.addAttribute("roleManage", service.findAuthRole(null)); - model.addAttribute("message", xitMessageSource.getMessage("success.common.select")); - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - if(!"".equals(tilesDef)) - tilesDef = "."+tilesDef; - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthRuleMng_"+cmd+tilesDef; - - } - - - /** - *
메소드 설명: 요청 팝업 페이지 이동 한다.
- * @param model - * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "AuthRuleMng_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST}) - public String AuthRuleMng_page_popup(@PathVariable String cmd - , @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef - , @ModelAttribute("roleManageVO") XitAuthRuleMngVO vo - , @ModelAttribute("roleManageSearchVO") XitAuthRuleMngSearchVO searchVO - , ModelMap model) { - switch (cmd) { - case "": // - break; - default: - throw new RuntimeException("유효하지 않은 요청 입니다."); - } - - - return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthRuleMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); - } - - - - /** - *
메소드 설명: 롤관리 CUD 처리
- * @return String 요청처리 후 응답객체 - * @author: 박민규 - * @throws IOException - * @throws ServletException - * @date: 2020. 4. 16. - */ - @RequestMapping(value = "AuthRuleMng_{cmd}_proc", method=RequestMethod.POST) - public void AuthRuleMng_cmd_proc(@PathVariable String cmd - ,@ModelAttribute("roleManageVO") XitAuthRuleMngVO vo - ,@ModelAttribute("roleManageSearchVO") XitAuthRuleMngSearchVO searchVO - ,@RequestParam(value="roleCodes", required=false, defaultValue="") String roleCodes - ,BindingResult bindingResult - ,SessionStatus status - ,Model model - ,HttpServletRequest request - ,HttpServletResponse response - ) throws ServletException, IOException { - - /** - * 처리 분기 - */ - String sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_list.do"; - String message = null; - switch (cmd) { - case "insert": //등록 - //유효성 확인 - beanValidator.validate(vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_input.do"; - break; - } - //처리 - try { - service.addAuthRole(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.insert"); - model.addAttribute("roleCode", vo.getRoleCode()); - sLocationUrl = "redirect:/framework/biz/mng/auth/AuthRuleMng_edit.do"; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_input.do"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.insert"); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_input.do"; - } - break; - -// case "inserts": //다건 등록 -// break; - - case "update": //수정 - //유효성 확인 - beanValidator.validate(vo, bindingResult); - if (bindingResult.hasErrors()) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_edit.do"; - break; - } - //처리 - try { - service.modifyAuthRole(vo); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.update"); - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.update"); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_edit"; - } - break; - - case "delete": //삭제 - //처리 - try { - service.removeAuthRole(null); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - break; - } catch (RuntimeException e) { - message = e.getMessage(); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_edit"; - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - sLocationUrl = "forward:/framework/biz/mng/auth/AuthRuleMng_edit"; - } - break; - - case "deletes": //다건 삭제 - //처리 - try { - //service.removesProc(); - status.setComplete(); - message = xitMessageSource.getMessage("success.common.delete"); - } catch (RuntimeException e) { - message = e.getMessage(); - } catch (Exception e) { - message = xitMessageSource.getMessage("fail.common.delete"); - } - break; - - default: - new RuntimeException("유효하지 않은 요청 입니다."); - } - - - - /** - * 응답 설정 - */ - /* ============================ - * 2020.09.10 박민규 - * 서버 호출 방식에 관계 없이 응답처리가 가능하도록 개선 - * -기존 호출방식도 유지하며 ajax로 서버호출 시 json 으로 응답처리가 가능하도록 개선 - * [AS-IS] 반환타입 String, return url에 "forward"구문으로 처리 - * [TO-BE] 반환타입 void, DispatchServlet으로 forward 처리, ajax 호출인 경우 json응답처리 서비스로 forward - ============================ */ - //2020.09.10 주석처리 -// model.addAttribute("message", message); -// return sLocationUrl; - model.addAttribute("message", message); - if(AjaxUtils.isAjaxRequest(request)){ //ajax 요청시 - //반환 데이터 설정 - Map resultMap = new HashMap(); - resultMap.put("message", message); - XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap); - }else { //submit 요청 시 - XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap()); - } - } } diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml index e5f2bd63..58d1715e 100644 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-mysql-mapper.xml @@ -1937,7 +1937,9 @@ AND ROLE_DC = #{role_dc } AND ROLE_TY = #{role_ty } AND ROLE_SORT = #{role_sort } - AND ROLE_CREAT_DE = #{role_creat_de} + AND ROLE_CREAT_DE = + #{roleCreatDe + /** addXitRoleInfo */ @@ -1984,16 +1986,16 @@ ,ROLE_DC = #{role_dc } ,ROLE_TY = #{role_ty } ,ROLE_SORT = #{role_sort } - ,ROLE_CREAT_DE = #{role_creat_de} + ,ROLE_CREAT_DE = #{roleCreatDe WHERE 1=1 - AND ROLE_CODE = #{role_code} + AND ROLE_CODE = #{roleCode /** removeXitRoleInfo */ /** 역할정보 삭제 */ DELETE FROM XIT_ROLE_INFO WHERE 1=1 - AND ROLE_CODE = #{role_code} + AND ROLE_CODE = #{roleCode diff --git a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-oracle-mapper.xml b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-oracle-mapper.xml index 5d505f39..3aaf4173 100644 --- a/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-oracle-mapper.xml +++ b/src/main/resources/sqlmapper/framework/cmm/XitFrameCrud-oracle-mapper.xml @@ -1937,7 +1937,9 @@ AND ROLE_DC = #{role_dc } AND ROLE_TY = #{role_ty } AND ROLE_SORT = #{role_sort } - AND ROLE_CREAT_DE = #{role_creat_de} + AND ROLE_CREAT_DE = + #{roleCreatDe + /** addXitRoleInfo */ @@ -1984,16 +1986,16 @@ ,ROLE_DC = #{role_dc } ,ROLE_TY = #{role_ty } ,ROLE_SORT = #{role_sort } - ,ROLE_CREAT_DE = #{role_creat_de} + ,ROLE_CREAT_DE = #{roleCreatDe WHERE 1=1 - AND ROLE_CODE = #{role_code} + AND ROLE_CODE = #{roleCode /** removeXitRoleInfo */ /** 역할정보 삭제 */ DELETE FROM XIT_ROLE_INFO WHERE 1=1 - AND ROLE_CODE = #{role_code} + AND ROLE_CODE = #{roleCode 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 7428ec61..39b980ca 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 @@ -2,6 +2,9 @@ + /** findXitAuthorInfos */ /** 권한정보 다건 조회 */ 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 7e134081..fe69b203 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 @@ -1,148 +1,86 @@ + - - - SELECT LIST.* FROM( - - - - ) LIST LIMIT #{firstIndex}, #{recordCountPerPage} - - - - - SELECT A.ROLE_CODE AS "roleCode" - ,A.ROLE_NM AS "roleNm" - ,A.ROLE_PTTRN AS "rolePtn" - ,A.ROLE_DC AS "roleDc" - ,( - SELECT CODE_NM - FROM XIT_CMMN_DETAIL_CODE - WHERE CODE_ID = 'XIT029' AND CODE = A.ROLE_TY) AS "roleTyp" - ,A.ROLE_SORT AS "roleSort" - ,A.ROLE_CREAT_DE AS "roleCreatDe" - - - FROM XIT_ROLE_INFO A - - - - AND A.ROLE_NM LIKE CONCAT('%',#{searchKeyword},'%') - - - - - - - - - - - + /* auth-role-mysql-mapper|selectAuthRoles-롤목록 조회|julim */ + SELECT role_code + , role_nm + , role_pttrn + , role_dc + , role_ty + , role_sort + , role_creat_de + FROM xit_role_info + + + AND role_code = #{roleCode} + + + AND INSTR(role_nm, #{roleNm}) > 0 + + + AND role_ty = #{roleTy} + + - - - - - + /* auth-role-mysql-mapper|selectAuthRole-롤 정보 조회|julim */ /** 역할정보 조회 */ - SELECT ROLE_CODE - ,ROLE_NM - ,ROLE_PTTRN - ,ROLE_DC - ,ROLE_TY - ,ROLE_SORT - ,ROLE_CREAT_DE - FROM XIT_ROLE_INFO - WHERE 1=1 - AND ROLE_CODE = #{role_code} + SELECT role_code + , role_nm + , role_pttrn + , role_dc + , role_ty + , role_sort + , role_creat_de + FROM xit_role_info + WHERE role_code = #{roleCode} - - /** 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') + + + /* auth-role-mysql-mapper|insertAuthRole-롤 정보 등록|julim */ + INSERT + INTO xit_role_info ( + role_code + , role_nm + , role_pttrn + , role_dc + , role_ty + , role_sort + , role_creat_de + ) VALUES ( + #{roleCode} + , #{roleNm} + , #{rolePttrn} + , #{roleDc} + , #{roleTy} + , #{roleSort} + , 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} + + + /* auth-role-mysql-mapper|updateAuthRole-롤 정보 변경|julim */ + UPDATE xit_role_info + SET role_nm = IF(role_nm = #{roleNm}, role_nm, #{roleNm}) + , role_pttrn = IF(role_pttrn = #{rolePttrn}, role_pttrn, #{rolePttrn}) + , role_dc = IF(role_dc = #{roleDc}, role_dc, #{roleDc}) + , role_ty = IF(role_ty = #{roleTy}, role_ty, #{roleTy}) + , role_sort = IF(role_sort = #{roleSort}, role_sort, #{roleSort}) + WHERE role_code = #{roleCode} - - /** removeXitRoleInfo */ - /** 역할정보 삭제 */ - DELETE FROM XIT_ROLE_INFO - WHERE 1=1 - AND ROLE_CODE = #{role_code} - + + /* auth-role-mysql-mapper|deleteAuthRole-롤 정보 삭제|julim */ + DELETE + FROM xit_role_info + WHERE role_code = #{roleCode} + diff --git a/src/main/resources/sqlmapper/framework/mng/auth/auth-user-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/auth/auth-user-mysql-mapper.xml index 1c9f959a..7d3a9936 100644 --- a/src/main/resources/sqlmapper/framework/mng/auth/auth-user-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/auth/auth-user-mysql-mapper.xml @@ -1,6 +1,11 @@ + + + SELECT LIST.* FROM( diff --git a/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml b/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml index 8aeca05f..ab3fabda 100644 --- a/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml +++ b/src/main/resources/validator/framework/mng/auth/XitAuthRegMng.xml @@ -26,16 +26,24 @@
+ + + - + + + + - - + - +
- \ No newline at end of file + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtForm.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtForm.jsp index 0bc20a94..aabbf0d4 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtForm.jsp @@ -39,7 +39,6 @@ 등록 - 삭제 @@ -121,7 +120,7 @@ { header: '롤 ID', name: 'roleCode', - minWidth: 200, + minWidth: 100, sortable: true, filter: 'select', //fiter 옵션(select/text/number/date/.. 등이 있으며 설정방법은 상이하므로 사이트 참조) sortingType: 'desc', @@ -141,7 +140,7 @@ { header: '롤 명', name: 'roleNm', - minWidth: 220, + minWidth: 150, sortable: false, align: 'left' }, @@ -152,6 +151,13 @@ sortable: false, align: 'center' }, + { + header: '롤 설명', + name: 'roleDc', + minWidth: 150, + sortable: false, + align: 'left' + }, { header: '롤 Sort', name: 'roleSort', @@ -160,18 +166,14 @@ align: 'center' }, { - header: '롤 설명', - name: 'roleDc', - minWidth: 220, - sortable: false, - align: 'left' - }, - { - header: '등록일자', + header: '등록일시', name: 'roleCreatDe', - width: 80, + width: 120, sortable: false, - align: 'center' + align: 'center', + formatter({value}) { + return setDateTimeFmt(value); // + } } ]; @@ -180,7 +182,7 @@ rowHeaders: ['rowNum'], columns: gridColumns, columnOptions: { - frozenCount: 1 //고정컬럼 갯수 + frozenCount: 3 //고정컬럼 갯수 , minWidth: 80 //최소 사이즈 } }; diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtPopup.jsp index 1c91f180..5f8c8329 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/mng/auth/mngAuthRoleMgtPopup.jsp @@ -59,7 +59,7 @@ - + @@ -100,7 +100,7 @@ 등록 - 닫기 + 닫기 @@ -123,6 +123,7 @@ add : () => { if(!validateRoleManage(document.getElementById("roleManage"))) return; + $("#roleTy").val('kdkdk'); cmmBizAjax('add', { url: '' ,data: $("#roleManage").serialize() @@ -130,7 +131,7 @@ } ,modify : () => { - if(!validateRoleManage(document.getElementById("#roleManage"))) return; + if(!validateRoleManage(document.getElementById("roleManage"))) return; cmmBizAjax('modify', { url: '' @@ -167,5 +168,6 @@ * initialize **************************************************************************/ $(document).ready(function(){ + $('#roleCreatDe').val(setDateTimeFmt('')); }); diff --git a/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js b/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js index 06c9f083..d009e166 100644 --- a/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js +++ b/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js @@ -108,7 +108,7 @@ const TuiGrid = { header: {}, //[선택]헤더정보(헤더 명칭 및 매핑 field) columns: [], //[필수]컬럼정보(헤더 명칭 및 매핑 field) rowHeaders: [], //[선택]ROW 헤더 타입(rowNum: 순번, checkbox: 체크박스) - bodyHeight: 350, //[선택]Grid 높이 (number(단위: px)|'auto'|'fitToParent') + bodyHeight: 467, //[선택]Grid 높이 (number(단위: px)|'auto'|'fitToParent') minBodyHeight: 350, //[선택]Grid 최소 높이 (단위: px) rowHeight: 30, //[선택]Grid row 높이 (number(단위: px)|'auto' ) minRowHeight: 25, //[선택]Grid row 최소 높이 (단위: px)