feat(롤관리(mngAuthRoleMgt) 반영): tui-grid serialize 제거

main
minuk926 2 years ago
parent 5bb21e1023
commit 21c2ebad4f

@ -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; //역할 생성 일
}

@ -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);

@ -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<XitAuthRuleMngVO> selectAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
List<XitRoleInfoVO> selectAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
/**
* <pre> : </pre>
@ -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);

@ -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<XitAuthRuleMngVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
List<XitRoleInfoVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
/**
* <pre> : </pre>
@ -37,7 +38,7 @@ public interface AuthRoleMgtService {
* @author:
* @date: 2020. 4. 16.
*/
XitAuthRuleMngVO findAuthRole(final String roleCode);
XitRoleInfoVO findAuthRole(final String roleCode);
/**
* <pre> : </pre>
@ -45,7 +46,7 @@ public interface AuthRoleMgtService {
* @author:
* @date: 2020. 4. 16.
*/
void addAuthRole(XitAuthRuleMngVO vo);
void addAuthRole(XitRoleInfoVO vo);
/**
* <pre> : </pre>
@ -53,7 +54,7 @@ public interface AuthRoleMgtService {
* @author:
* @date: 2020. 4. 16.
*/
void modifyAuthRole(XitAuthRuleMngVO vo);
void modifyAuthRole(XitRoleInfoVO vo);
/**
* <pre> : </pre>

@ -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<XitAuthRuleMngVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds) {
public List<XitRoleInfoVO> findAuthRoles(final Map<String,Object> 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);
}
}

@ -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<String,Object> paraMap) {
@GetMapping(value = "/findAuthRoles")
public ModelAndView findAuthRoles(@RequestParam final Map<String,Object> 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;
}
/**
* <pre> : .</pre>
* @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;
}
/**
* <pre> : .</pre>
* @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();
}
/**
* <pre> : CUD </pre>
* @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<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
}else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
}

@ -1937,7 +1937,9 @@
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">AND ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">AND ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">AND ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE = #{role_creat_de}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE =
#{roleCreatDe
</if>
</select>
<select id="findXitRoleInfo" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/** findXitRoleInfo */
@ -1951,7 +1953,7 @@
,ROLE_CREAT_DE
FROM XIT_ROLE_INFO
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</select>
<insert id="addXitRoleInfo">
/** addXitRoleInfo */
@ -1984,16 +1986,16 @@
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_dc )">,ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_ty )">,ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_sort )">,ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{role_creat_de}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{roleCreatDe</if>
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</update>
<delete id="removeXitRoleInfo">
/** removeXitRoleInfo */
/** 역할정보 삭제 */
DELETE FROM XIT_ROLE_INFO
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</delete>

@ -1937,7 +1937,9 @@
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">AND ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">AND ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">AND ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE = #{role_creat_de}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE =
#{roleCreatDe
</if>
</select>
<select id="findXitRoleInfo" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/** findXitRoleInfo */
@ -1951,7 +1953,7 @@
,ROLE_CREAT_DE
FROM XIT_ROLE_INFO
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</select>
<insert id="addXitRoleInfo">
/** addXitRoleInfo */
@ -1984,16 +1986,16 @@
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_dc )">,ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_ty )">,ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_sort )">,ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{role_creat_de}</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{roleCreatDe</if>
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</update>
<delete id="removeXitRoleInfo">
/** removeXitRoleInfo */
/** 역할정보 삭제 */
DELETE FROM XIT_ROLE_INFO
WHERE 1=1
AND ROLE_CODE = #{role_code}
AND ROLE_CODE = #{roleCode
</delete>

@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
************************************************************************************************************** -->
<select id="findXitAuthorGroupInfos" resultType="kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO">
/** findXitAuthorGroupInfos */
/** 권한그룹정보 다건 조회 */

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthHierarchyMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
************************************************************************************************************** -->
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -2,6 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
************************************************************************************************************** -->
<select id="findXitAuthorInfos" resultType="kr.xit.framework.biz.cmm.model.XitAuthorInfoVO">
/** findXitAuthorInfos */
/** 권한정보 다건 조회 */

@ -1,148 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(
</sql>
<sql id="pageAfter">
) LIST LIMIT #{firstIndex}, #{recordCountPerPage}
</sql>
<sql id="findList_SELECT">
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"
</sql>
<sql id="findList_FROM">
FROM XIT_ROLE_INFO A
</sql>
<sql id="findList_WHERE">
<if test="'1'.toString() == searchCondition">
AND A.ROLE_NM LIKE CONCAT('%',#{searchKeyword},'%')
</if>
</sql>
<select id="findList" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
/** XitAuthRuleMngMapper.findList */
/** 롤관리 목록 조회 */
<if test="searchGubun == 'list'">
<include refid="pageBefore" />
</if>
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE 1=1
<include refid="findList_WHERE"/>
ORDER BY A.ROLE_CREAT_DE DESC
<if test="searchGubun == 'list'">
<include refid="pageAfter" />
</if>
</select>
<select id="findView" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
/** XitAuthRuleMngMapper.findView */
/** 롤관리 상세정보 조회 */
<include refid="findList_SELECT"/>
<include refid="findList_FROM"/>
WHERE A.ROLE_CODE = #{roleCode}
<!-- *************************************************************************************************************
* xit_role_info : 롤(역할) 정보
************************************************************************************************************** -->
<select id="selectAuthRoles" parameterType="map" resultType="kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO">
/* 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
<where>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(RoleCode)">
AND role_code = #{roleCode}
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleNm)">
AND INSTR(role_nm, #{roleNm}) > 0
</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(roleTy)">
AND role_ty = #{roleTy}
</if>
</where>
</select>
<select id="findXitRoleInfos" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/** findXitRoleInfos */
/** 역할정보 다건 조회 */
SELECT ROLE_CODE
,ROLE_NM
,ROLE_PTTRN
,ROLE_DC
,ROLE_TY
,ROLE_SORT
,ROLE_CREAT_DE
FROM XIT_ROLE_INFO
WHERE 1=1
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_code )">AND ROLE_CODE = #{role_code }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">AND ROLE_NM = #{role_nm }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">AND ROLE_PTTRN = #{role_pttrn }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">AND ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">AND ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">AND ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_creat_de)">AND ROLE_CREAT_DE = #{role_creat_de}</if>
</select>
<select id="findXitRoleInfo" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/** findXitRoleInfo */
<select id="selectAuthRole" parameterType="string" resultType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/* 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}
</select>
<insert id="addXitRoleInfo">
/** addXitRoleInfo */
/** 역할정보 등록 */
INSERT INTO XIT_ROLE_INFO(
ROLE_CODE
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">,ROLE_NM </if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">,ROLE_PTTRN </if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">,ROLE_DC </if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">,ROLE_TY </if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">,ROLE_SORT </if>
,ROLE_CREAT_DE
)VALUES(
#{role_code }
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_nm )">,#{role_nm }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_pttrn )">,#{role_pttrn }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_dc )">,#{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_ty )">,#{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notEmpty(role_sort )">,#{role_sort }</if>
,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
<insert id="insertAuthRole" parameterType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/* 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')
)
</insert>
<update id="modifyXitRoleInfo">
/** modifyXitRoleInfo */
/** 역할정보 수정 */
UPDATE XIT_ROLE_INFO
SET
ROLE_NM = IFNULL(#{role_nm }, ROLE_NM)
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_pttrn )">,ROLE_PTTRN = #{role_pttrn }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_dc )">,ROLE_DC = #{role_dc }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_ty )">,ROLE_TY = #{role_ty }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_sort )">,ROLE_SORT = #{role_sort }</if>
<if test="@kr.xit.framework.core.utils.XitCmmnUtil@notBlank(role_creat_de)">,ROLE_CREAT_DE = #{role_creat_de}</if>
WHERE 1=1
AND ROLE_CODE = #{role_code}
<update id="updateAuthRole" parameterType="kr.xit.framework.biz.cmm.model.XitRoleInfoVO">
/* 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}
</update>
<delete id="removeXitRoleInfo">
/** removeXitRoleInfo */
/** 역할정보 삭제 */
DELETE FROM XIT_ROLE_INFO
WHERE 1=1
AND ROLE_CODE = #{role_code}
</delete>
<delete id="deleteAuthRole" parameterType="string">
/* auth-role-mysql-mapper|deleteAuthRole-롤 정보 삭제|julim */
DELETE
FROM xit_role_info
WHERE role_code = #{roleCode}
</delete>
</mapper>

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthUserMgtMapper">
<!-- *************************************************************************************************************
* xit_user_info : 업무사용자 정보
************************************************************************************************************** -->
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -26,16 +26,24 @@
<formset>
<form name="roleManage">
<field property="roleCode" depends="required">
<arg0 key="롤코드" resource="false"/>
</field>
<field property="roleNm" depends="required">
<arg0 key="롤 명" resource="false"/>
<arg0 key="롤명" resource="false"/>
</field>
<field property="rolePttrn" depends="required">
<arg0 key="롤패턴" resource="false"/>
</field>
<field property="rolePtn" depends="required">
<arg0 key="롤 패턴" resource="false"/>
<!--
<field property="roleTy" depends="required">
<arg0 key="롤타입" resource="false"/>
</field>
-->
<field property="roleSort" depends="required, integer">
<arg0 key="롤 Sort" resource="false"/>
<arg0 key="롤Sort" resource="false"/>
</field>
</form>
</formset>
</form-validation>
</form-validation>

@ -39,7 +39,6 @@
</span>
<span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
<a href="#" class="btn red" id="btnRemove" title="삭제">삭제</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
@ -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 //최소 사이즈
}
};

@ -59,7 +59,7 @@
<label>롤타입</label>
</th>
<td nowrap="nowrap">
<code:select id="roleTyp" name="roleTyp" codeId="XIT029" defaultSelect="${roleManage.roleTy}" title="롤타입" cls="selectBox" alt="롤타입"/>
<code:select id="roleTy" name="roleTy" codeId="XIT029" defaultSelect="${roleManage.roleTy}" title="롤타입" cls="selectBox" alt="롤타입"/>
</td>
</tr>
<tr>
@ -100,7 +100,7 @@
<a href="#" class="btn blue" id="btnRegist">등록</a>
</c:otherwise>
</c:choose>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
<a href="#" class="btn lightgray" id="btnClose" onclick="window.close()">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
@ -123,6 +123,7 @@
add : () => {
if(!validateRoleManage(document.getElementById("roleManage"))) return;
$("#roleTy").val('kdkdk');
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/auth/addAuthRole.do"/>'
,data: $("#roleManage").serialize()
@ -130,7 +131,7 @@
}
,modify : () => {
if(!validateRoleManage(document.getElementById("#roleManage"))) return;
if(!validateRoleManage(document.getElementById("roleManage"))) return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/auth/modifyAuthRole.do"/>'
@ -167,5 +168,6 @@
* initialize
**************************************************************************/
$(document).ready(function(){
$('#roleCreatDe').val(setDateTimeFmt('<c:out value="${roleManage.roleCreatDe}"/>'));
});
</script>

@ -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)

Loading…
Cancel
Save