no message
parent
089bb0713d
commit
0d6fdc6833
@ -1,15 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.cache.dao;
|
||||
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface CacheMenuMapper {
|
||||
List<Map<String, String>> selectMenuListAll(final String uniqId);
|
||||
|
||||
List<Map<String, String>> selectMenuListByUser(final String uniqId);
|
||||
|
||||
List<Map<String, String>> selectMenuListByAuthId(final String authId);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.cmm.dao;
|
||||
|
||||
import cokr.xit.fims.framework.core.XitMenuManageVO;
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: XIT프레임워크 메인화면 Mapper
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 3. 23. 오후 3:23:12
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@Mapper
|
||||
public interface XitMainMapper {
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 화면의 상단 메뉴목록을 조회 한다.</pre>
|
||||
* @param vo
|
||||
* @return List<XitMenuManageVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 3. 24.
|
||||
*/
|
||||
public List<XitMenuManageVO> findMainMenuHeads(XitMenuManageVO vo) throws SQLException;
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 화면의 좌측 메뉴목록을 조회 한다.</pre>
|
||||
* @param vo
|
||||
* @return List<XitMenuManageVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 3. 24.
|
||||
*/
|
||||
public List<XitMenuManageVO> findtMainMenuLefts(XitMenuManageVO vo) throws SQLException;
|
||||
|
||||
public String findMenuPath(String menu_no) throws SQLException;
|
||||
public String findMenuPath2(String pgmId) throws SQLException;
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.cmm.service;
|
||||
|
||||
import cokr.xit.fims.framework.core.XitMenuManageVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: XIT프레임워크 메인화면 Service
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 3. 23. 오후 3:23:12
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
public interface XitMainService {
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 화면의 상단 메뉴목록을 조회 한다.</pre>
|
||||
* @param uniqId 사용자 고유아이디
|
||||
* @return List<XitMenuManageVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 3. 24.
|
||||
*/
|
||||
public List<XitMenuManageVO> findMainMenuHeads(String uniqId);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 화면의 좌측 메뉴목록을 조회 한다.</pre>
|
||||
* @param uniqId 사용자 고유아이디
|
||||
* @return List<XitMenuManageVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 3. 24.
|
||||
*/
|
||||
public List<XitMenuManageVO> findtMainMenuLefts(String uniqId);
|
||||
|
||||
public String findMenuPath(String menu_no);
|
||||
public String findMenuPath2(String pgmId);
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.cmm.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.cmm.dao.XitMainMapper;
|
||||
import cokr.xit.fims.framework.biz.cmm.service.XitMainService;
|
||||
import cokr.xit.fims.framework.core.XitMenuManageVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class XitMainServiceBean extends AbstractServiceBean implements XitMainService {
|
||||
|
||||
private final XitMainMapper xitMainMapper;
|
||||
|
||||
@Override
|
||||
public List<XitMenuManageVO> findMainMenuHeads(String uniqId) {
|
||||
XitMenuManageVO vo = new XitMenuManageVO();
|
||||
vo.setTmpUniqId(uniqId);
|
||||
|
||||
|
||||
List<XitMenuManageVO> result = null;
|
||||
try {
|
||||
result = xitMainMapper.findMainMenuHeads(vo);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("상단 메뉴목록 조회 실패", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XitMenuManageVO> findtMainMenuLefts(String uniqId) {
|
||||
XitMenuManageVO vo = new XitMenuManageVO();
|
||||
vo.setTmpUniqId(uniqId);
|
||||
|
||||
List<XitMenuManageVO> result = null;
|
||||
try {
|
||||
result = xitMainMapper.findtMainMenuLefts(vo);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("좌측 메뉴목록 조회 실패", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String findMenuPath(String menu_no) {
|
||||
String result = null;
|
||||
try {
|
||||
result = xitMainMapper.findMenuPath(menu_no);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("메뉴 조회 실패", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String findMenuPath2(String pgmId) {
|
||||
String result = null;
|
||||
try {
|
||||
result = xitMainMapper.findMenuPath2(pgmId);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("메뉴 조회 실패", e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.dao;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 권한관리 Mapper
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:38:07
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthAuthorMgtMapper {
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한관리 목록 조회</pre>
|
||||
*
|
||||
* @param paraMap
|
||||
* @param rowBounds
|
||||
* @return List<XitAuthRegMngVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
<T> List<XitAuthorInfoVO> selectAuthorInfos(final Map<String,Object> paraMap, final RowBounds rowBounds);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param t Map과 VO 모두 받을수 있게 generic 사용 (AuthHierarchy에서 VO 사용)
|
||||
* @return
|
||||
* @param <T>
|
||||
*/
|
||||
<T> List<XitAuthorInfoVO> selectAuthorInfos(final T t);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한관리 상세정보 조회</pre>
|
||||
* @param vo
|
||||
* @return XitAuthRegMngVO 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
<T> XitAuthorInfoVO selectAuthorInfo(final T t);
|
||||
int insertAuthorInfo(final XitAuthorInfoVO vo);
|
||||
int updateAuthorInfo(final XitAuthorInfoVO vo);
|
||||
int deleteAuthorInfo(final String authId);
|
||||
|
||||
|
||||
List<XitRoleSclsrtRescueVO> selectRoleSclsrtRescues(final XitRoleSclsrtRescueVO vo);
|
||||
XitRoleSclsrtRescueVO selectRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);
|
||||
int insertRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);
|
||||
int deleteRoleSclsrtRescue(final XitRoleSclsrtRescueVO vo);
|
||||
|
||||
|
||||
List<XitRoleInfoVO> selectAuthRoleGrantList(Map<String, Object> paraMap);
|
||||
int deleteRoleGrant(Map<String, Object> map);
|
||||
int saveRoleGrant(Map<String, Object> map);
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.dao;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 롤관리 Mapper
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:38:07
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@Mapper
|
||||
public interface AuthRoleMgtMapper {
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 목록 조회</pre>
|
||||
*/
|
||||
@SuppressWarnings("MybatisXMapperMethodInspection")
|
||||
List<XitRoleInfoVO> selectAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 상세정보 조회</pre>
|
||||
* @param vo
|
||||
* @return XitAuthRuleMngVO 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
<T> XitRoleInfoVO selectAuthRole(final T t);
|
||||
|
||||
int insertAuthRole(final XitRoleInfoVO vo);
|
||||
|
||||
int updateAuthRole(final XitRoleInfoVO vo);
|
||||
|
||||
int deleteAuthRole(final String roleCode);
|
||||
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 권한관리 Service
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:38:56
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
public interface AuthAuthorMgtService {
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한관리 목록 조회</pre>
|
||||
* @param paraMap
|
||||
* @return List<XitAuthRegMngVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap, final RowBounds rowBounds);
|
||||
List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap);
|
||||
|
||||
<T> XitAuthorInfoVO findAuthAuthor(final T t);
|
||||
void addAuthAuthor(final XitAuthorInfoVO vo);
|
||||
void modifyAuthAuthor(final XitAuthorInfoVO vo);
|
||||
void removeAuthAuthor(final String authId);
|
||||
|
||||
|
||||
List<XitRoleInfoVO> findAuthRoleGrantList(final Map<String, Object> paraMap);
|
||||
void saveAuthRoleGrantList(final Map<String, Object> paraMap);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 롤관리 Service
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:38:56
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
public interface AuthRoleMgtService {
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 목록 조회</pre>
|
||||
* @param paraMap
|
||||
* @return List<XitAuthRuleMngVO> 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
List<XitRoleInfoVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 상세정보 조회</pre>
|
||||
* @param t
|
||||
* @return XitAuthRuleMngVO 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
<T> XitRoleInfoVO findAuthRole(final T t);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 등록</pre>
|
||||
* @param vo void 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
void addAuthRole(final XitRoleInfoVO vo);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 수정</pre>
|
||||
* @param vo void 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
void modifyAuthRole(final XitRoleInfoVO vo);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤관리 삭제</pre>
|
||||
* @param vo void 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 4. 16.
|
||||
*/
|
||||
void removeAuthRole(final String roleCode);
|
||||
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthAuthorMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthAuthorMgtService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AuthAuthorMgtServiceBean extends AbstractServiceBean implements AuthAuthorMgtService {
|
||||
private final AuthAuthorMgtMapper mapper;
|
||||
|
||||
/** 부모 권한코드 */
|
||||
private static final String PARNTS_AUTHOR = "ROLE_USER";
|
||||
/** 자녀 권한코드 */
|
||||
private static final String CHLDRN_AUTHOR = "ROLE_ADMIN";
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitAuthorInfoVO> findAuthAuthors(final Map<String,Object> paraMap, final RowBounds rowBounds) {
|
||||
return mapper.selectAuthorInfos(paraMap, rowBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitAuthorInfoVO> findAuthAuthors(final Map<String, Object> paraMap) {
|
||||
return mapper.selectAuthorInfos(paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public <T> XitAuthorInfoVO findAuthAuthor(final T t) {
|
||||
return mapper.selectAuthorInfo(t);
|
||||
}
|
||||
|
||||
/* =====================================================
|
||||
* 2020.05.21 박민규
|
||||
* 신규권한 등록프로세스 주석 및 수정
|
||||
* -사유: egovFrame의 권한계층은 부모~자녀 순으로 "익명사용자->사용자->관리자"로 기본제공 되며
|
||||
* 부모권한에 부여된 ROLE을 자녀가 상속받는 개념이다.
|
||||
* 다만 기본제공되는 권한계층을 사용 시 카페의 "관리자>매니저>정회원>준회원>비회원"과 같은 권한계층 관리에 적합하기에
|
||||
* 업체별(또는 부서별)로 권한그룹을 별도 관리 해야하는 경우에 적합하지 않다.
|
||||
* -작업내용: 기본제공되는 "익명사용자->사용자->관리자" 관리구조에서 사용자와 관리자 그룹 사이에 신규권한그룹을 삽입하여
|
||||
* "익명사용자->사용자->신규권한1/신규권한2/...->관리자"로 권한계층을 구성하여
|
||||
* n개의 신규그룹은 "사용자"에게서 기본적인 ROLE을 상속받고
|
||||
* n개의 신규그룹의 ROLE을 "관리자"가 상속받도록 한다.
|
||||
* AS-IS: "익명사용자->사용자->관리자"의 권한계층에 삽입되지 않아 상위권한(PARENT)의 ROLE을 승계받지 못 함.
|
||||
* TO-BE: "익명사용자->사용자->신규권한1/신규권한2/...->관리자"순의 상하관계를 가지게 되므로 신규권한그룹도 상위권한(PARENT)의 ROLE을 승계 받음.
|
||||
===================================================== */
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addAuthAuthor(final XitAuthorInfoVO vo){
|
||||
//권한정보 Insert
|
||||
mapper.insertAuthorInfo(vo);
|
||||
|
||||
//계층구조생성
|
||||
XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO();
|
||||
//부모관계 생성
|
||||
roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR);
|
||||
roleSclsrtRescueVO.setChldrnRole(vo.getAuthId());
|
||||
mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO);
|
||||
//자녀관계 생성
|
||||
roleSclsrtRescueVO.setParntsRole(vo.getAuthId());
|
||||
roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR);
|
||||
mapper.insertRoleSclsrtRescue(roleSclsrtRescueVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modifyAuthAuthor(final XitAuthorInfoVO vo){
|
||||
mapper.updateAuthorInfo(vo);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void removeAuthAuthor(final String authId){
|
||||
//계층구조 삭제
|
||||
XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO();
|
||||
roleSclsrtRescueVO.setParntsRole(PARNTS_AUTHOR);
|
||||
roleSclsrtRescueVO.setChldrnRole(authId);
|
||||
mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO);
|
||||
//자녀관계 제거
|
||||
roleSclsrtRescueVO.setParntsRole(authId);
|
||||
roleSclsrtRescueVO.setChldrnRole(CHLDRN_AUTHOR);
|
||||
mapper.deleteRoleSclsrtRescue(roleSclsrtRescueVO);
|
||||
|
||||
mapper.deleteAuthorInfo(authId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitRoleInfoVO> findAuthRoleGrantList(final Map<String, Object> paraMap) {
|
||||
return mapper.selectAuthRoleGrantList(paraMap);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveAuthRoleGrantList(final Map<String, Object> paraMap) {
|
||||
List<Map<String,Object>> mapList = (List<Map<String, Object>>)paraMap.get("grantData");
|
||||
|
||||
mapList.forEach(map -> {
|
||||
map.put("authId", paraMap.get("authId"));
|
||||
if(Objects.equals(map.get("regYn"), "N"))
|
||||
mapper.deleteRoleGrant(map);
|
||||
else
|
||||
mapper.saveRoleGrant(map);
|
||||
});
|
||||
}
|
||||
}
|
@ -1,158 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthAuthorMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthGrpMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthGrpMgtService;
|
||||
import cokr.xit.fims.framework.biz.mng.user.dao.UserMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.user.XitUserScrtySetupVO;
|
||||
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
|
||||
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.egovframe.rte.fdl.cmmn.exception.FdlException;
|
||||
import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@Service
|
||||
public class AuthGrpMgtServiceBean extends AbstractServiceBean implements AuthGrpMgtService {
|
||||
|
||||
private final AuthGrpMgtMapper mapper;
|
||||
private final AuthAuthorMgtMapper authAuthorMgtMapper;
|
||||
private final UserMgtMapper userMgtMapper;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("groupIdGnrService")
|
||||
private final EgovIdGnrService groupIdGnrService;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitAuthorGroupInfoVO> findAuthGrps(final Map<String, Object> paraMap, final RowBounds rowBounds) {
|
||||
return mapper.selectAuthorGroupInfos(paraMap, rowBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public <T> XitAuthorGroupInfoVO findAuthGrp(final T t) {
|
||||
return mapper.selectAuthorGroupInfo(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addAuthGrp(final XitAuthorGroupInfoVO vo) {
|
||||
// 유효성 확인
|
||||
this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthId());
|
||||
|
||||
try {
|
||||
vo.setGrpId(groupIdGnrService.getNextStringId());
|
||||
} catch (FdlException e) {
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage());
|
||||
}
|
||||
mapper.insertAuthorGroupInfo(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modifyAuthGrp(final XitAuthorGroupInfoVO vo) {
|
||||
// 유효성 확인
|
||||
this.isCheckUserForCanChange(XitCmmnUtil.getUserInfo().getUniqId(), vo.getAuthId());
|
||||
|
||||
mapper.updateAuthorGroupInfo(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removeAuthGrp(final String grpId) {
|
||||
mapper.deleteAuthorGroupInfo(grpId);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public void isCheckUserForCanChange(final String uniqId, final String trgetAuthId) {
|
||||
//사용자보안설정 조회
|
||||
XitUserScrtySetupVO userScrtySetupVO = new XitUserScrtySetupVO();
|
||||
userScrtySetupVO.setUserId(uniqId);
|
||||
List<XitUserScrtySetupVO> listUserScrtySetupVO = userMgtMapper.selectUserScrtySetups(userScrtySetupVO);
|
||||
String userAuthId = XitCmmnUtil.isEmpty(listUserScrtySetupVO)?null:listUserScrtySetupVO.get(0).getAuthId();
|
||||
|
||||
if(!this.isCheckUserAuthIdForCanChange(userAuthId, trgetAuthId))
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "자신의 권한보다 상위 권한을 설정 할 수 없습니다.");;
|
||||
}
|
||||
|
||||
|
||||
private boolean isCheckUserAuthIdForCanChange(final String userAuthId, final String trgetAuthId) {
|
||||
//역할(권한)계층구조 데이터 목록 조회
|
||||
List<XitRoleSclsrtRescueVO> listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(null);
|
||||
//역할(권한)계층구조를 사용하지 않고 있는 경우 true 반환
|
||||
if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO)) {
|
||||
log.debug("Do not use a RoleSclsrtRescue Data !!");
|
||||
return true;
|
||||
}else {
|
||||
//사용자의 권한 정보가 없을 때(비정상적인 루트로 등록한 사용자 계정으로 판단)
|
||||
if(XitCmmnUtil.isEmpty(userAuthId)) {
|
||||
log.debug("This user is have not UserScrtySetup Data !!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
boolean isExists = false;
|
||||
//사용자 권한과 매칭되는 역할(권한)계층정보 유무 확인
|
||||
for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) {
|
||||
if(item.getParntsRole().equals(userAuthId)) {
|
||||
isExists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//사용자 권한이 최상위 권한이면 true 반환
|
||||
if(!isExists)
|
||||
for(XitRoleSclsrtRescueVO item : listRoleSclsrtRescueVO) {
|
||||
if(item.getChldrnRole().equals(userAuthId)) {
|
||||
log.debug("This user is Top-Level Author !!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//사용자의 역할(권한)정보가 없으면 false 반환
|
||||
if(!isExists) {
|
||||
log.debug("This user is have not RoleSclsrtRescue Data !!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 상위권한 여부 확인
|
||||
*
|
||||
*/
|
||||
return !this.isHighAuthor(listRoleSclsrtRescueVO, userAuthId, trgetAuthId);
|
||||
}
|
||||
|
||||
private boolean isHighAuthor(final List<XitRoleSclsrtRescueVO> list, final String authId, final String highAuthId) {
|
||||
boolean result = false;
|
||||
|
||||
for (XitRoleSclsrtRescueVO item : list) {
|
||||
// 상위 권한으로 확인 되었으면 stop
|
||||
if (result)
|
||||
break;
|
||||
// 권한코드가 일치하지 않으면 skip
|
||||
if (!item.getParntsRole().equals(authId))
|
||||
continue;
|
||||
|
||||
if (item.getChldrnRole().equals(highAuthId)) { // 상위 권한과 일치하면
|
||||
result = true;
|
||||
} else { // 상위 권한과 일치하지 않으면 재호출
|
||||
result = this.isHighAuthor(list, item.getChldrnRole(), highAuthId);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1,251 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthAuthorMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthHierarchyMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthHierarchyMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthHierarchyMgtService;
|
||||
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
|
||||
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class AuthHierarchyMgtServiceBean extends AbstractServiceBean implements AuthHierarchyMgtService {
|
||||
|
||||
private final AuthHierarchyMgtMapper mapper;
|
||||
|
||||
private final AuthAuthorMgtMapper authAuthorMgtMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitAuthHierarchyMngVO> findAuthHierarchies(final Map<String, Object> paraMap, final RowBounds rowBounds) {
|
||||
List<XitAuthHierarchyMngVO> voList = mapper.selectAuthHierarchies(paraMap, rowBounds);
|
||||
//권한구조 설정
|
||||
|
||||
if(XitCmmnUtil.notEmpty(voList)) {
|
||||
for(XitAuthHierarchyMngVO vo : voList) {
|
||||
String strAuthorRescueCode = this.getStrAuthHierarchy(vo.getAuthId());
|
||||
vo.setAuthorRescueCode(strAuthorRescueCode);
|
||||
vo.setAuthorRescueCodeNm(this.convertKorNm(strAuthorRescueCode));
|
||||
}
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public XitAuthHierarchyMngVO findAuthHierarchyInfo(final XitAuthHierarchyMngVO vo) {
|
||||
XitAuthHierarchyMngVO result = new XitAuthHierarchyMngVO();
|
||||
|
||||
List<XitRoleSclsrtRescueVO> listRoleSclsrtRescueVO = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO());
|
||||
if(XitCmmnUtil.isEmpty(listRoleSclsrtRescueVO))
|
||||
return result;
|
||||
|
||||
|
||||
String topButtonAuthId = this.getStrAuthHierarchy(listRoleSclsrtRescueVO.get(0).getChldrnRole());
|
||||
topButtonAuthId = topButtonAuthId.split(">")[0].trim();
|
||||
String strAuthorRescueCode = this.getStrAuthHierarchy(topButtonAuthId);
|
||||
result.setAuthorRescueCode(strAuthorRescueCode);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void saveAuthHierarchy(final XitAuthHierarchyMngVO vo) {
|
||||
if(XitCmmnUtil.isEmpty(vo.getAuthId()))
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "권한코드는 필수조건 입니다.");
|
||||
|
||||
String[] arrAuthIdGrp = vo.getAuthId().split(","); //권한코드 묶음 목록
|
||||
|
||||
/**
|
||||
* 유효성 확인
|
||||
* -최상위 부모는 반드시 한개 이어야 한다.
|
||||
* -최하위 자녀(최고관리자)는 반드시 한개 이어야 한다.
|
||||
*/
|
||||
if(arrAuthIdGrp[0].split(";").length>1)
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최상위 부모는 한개만 설정 가능 합니다.");
|
||||
// 최하위 자녀 갯수 확인
|
||||
if(arrAuthIdGrp[arrAuthIdGrp.length-1].split(";").length>1)
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"최하위 자녀는 한개만 설정 가능 합니다.");
|
||||
// 다중상속 구간 갯수 확인
|
||||
int cnt = 0;
|
||||
for(String authIdGrp : arrAuthIdGrp) {
|
||||
if(authIdGrp.split(";").length > 1)
|
||||
cnt++;
|
||||
}
|
||||
if(cnt > 1)
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG,"다중상속은 하나의 구간만 설정 가능 합니다.");
|
||||
|
||||
//권한계층구조 일괄 제거
|
||||
authAuthorMgtMapper.deleteRoleSclsrtRescue(new XitRoleSclsrtRescueVO());
|
||||
//권한계층 데이터 등록
|
||||
for(int i=0; i<arrAuthIdGrp.length; i++) {
|
||||
//마지막 권한이면 stop
|
||||
if(i==arrAuthIdGrp.length-1)
|
||||
break;
|
||||
|
||||
|
||||
String[] arrParntsRole = arrAuthIdGrp[i].split(";");
|
||||
String[] arrChldrnRole = arrAuthIdGrp[i+1].split(";");
|
||||
for(int j=0; j<arrParntsRole.length; j++) {
|
||||
String parntsRole = arrParntsRole[j];
|
||||
for(int k=0; k<arrChldrnRole.length; k++) {
|
||||
String chldrnRole = arrChldrnRole[k];
|
||||
XitRoleSclsrtRescueVO roleSclsrtRescueVO = new XitRoleSclsrtRescueVO();
|
||||
roleSclsrtRescueVO.setParntsRole(parntsRole);
|
||||
roleSclsrtRescueVO.setChldrnRole(chldrnRole);
|
||||
authAuthorMgtMapper.insertRoleSclsrtRescue(roleSclsrtRescueVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한의 권한계층 구조를 문자열로 반환 한다.</pre>
|
||||
* @param authId
|
||||
* @return String 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 11. 2.
|
||||
*/
|
||||
private String getStrAuthHierarchy(final String authId) {
|
||||
LinkedHashMap<String, String> mParnts = new LinkedHashMap<String, String>();
|
||||
LinkedHashMap<String, String> mChldrn = new LinkedHashMap<String, String>();
|
||||
|
||||
|
||||
List<XitRoleSclsrtRescueVO> list = authAuthorMgtMapper.selectRoleSclsrtRescues(new XitRoleSclsrtRescueVO());
|
||||
this.getAuthHierarchy(list, authId, false, mParnts);
|
||||
this.getAuthHierarchy(list, authId, true, mChldrn);
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
Iterator<String> it = mParnts.keySet().iterator();
|
||||
while(it.hasNext()) {
|
||||
sb.append(mParnts.get(it.next())).append(" > ");
|
||||
}
|
||||
sb.append(authId).append(" > ");
|
||||
it = mChldrn.keySet().iterator();
|
||||
while(it.hasNext()) {
|
||||
sb.append(mChldrn.get(it.next())).append(" > ");
|
||||
}
|
||||
|
||||
String result = sb.toString().trim();
|
||||
return result.substring(0, result.length()-2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한코드의 권한구조상의 상/하위 권한을 resultMap(LinkedHashMap)에 담아 반환 한다.</pre>
|
||||
* @param list 역할계층구조 목록 데이터
|
||||
* @param authId 권한코드
|
||||
* @param isChldrnSearch 상위권한 탐색 여부(true: 상위권한 탐색, false: 하위권한 탐색)
|
||||
* @param resultMap 응답객체
|
||||
* @return void 요청처리 후 응답객체
|
||||
* @author: 박민규
|
||||
* @date: 2020. 11. 2.
|
||||
*/
|
||||
private void getAuthHierarchy(final List<XitRoleSclsrtRescueVO> list, final String authId, final boolean isChldrnSearch, final LinkedHashMap<String, String> resultMap) {
|
||||
|
||||
for (XitRoleSclsrtRescueVO item : list) {
|
||||
|
||||
if(isChldrnSearch) {
|
||||
// 권한코드가 일치하지 않으면 skip
|
||||
if (!item.getParntsRole().equals(authId))
|
||||
continue;
|
||||
|
||||
//권한코드 Set
|
||||
if(resultMap.containsKey(authId)) {
|
||||
//동일한 값이면 담지 않음
|
||||
if(resultMap.get(authId).equals(item.getChldrnRole()))
|
||||
continue;
|
||||
|
||||
resultMap.put(authId, resultMap.get(authId)+", "+item.getChldrnRole());
|
||||
}else {
|
||||
//동일한 값이 있으면 담지 않음
|
||||
Iterator<String> it = resultMap.values().iterator();
|
||||
boolean isExists = false;
|
||||
LOOP:
|
||||
while(it.hasNext()) {
|
||||
String[] values = it.next().split(",");
|
||||
for(int j=0; j<values.length; j++) {
|
||||
String value = values[j].trim();
|
||||
if(value.equals(item.getChldrnRole())) {
|
||||
isExists = true;
|
||||
break LOOP;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isExists)
|
||||
resultMap.put(authId, item.getChldrnRole());
|
||||
|
||||
}
|
||||
|
||||
//재탐색
|
||||
this.getAuthHierarchy(list, item.getChldrnRole(), isChldrnSearch, resultMap);
|
||||
}else {
|
||||
|
||||
// 권한코드가 일치하지 않으면 skip
|
||||
if (!item.getChldrnRole().equals(authId))
|
||||
continue;
|
||||
|
||||
//재탐색
|
||||
this.getAuthHierarchy(list, item.getParntsRole(), isChldrnSearch, resultMap);
|
||||
|
||||
//권한코드 Set
|
||||
if(resultMap.containsKey(authId)) {
|
||||
//동일한 값이면 담지 않음
|
||||
if(resultMap.get(authId).equals(item.getParntsRole()))
|
||||
continue;
|
||||
|
||||
resultMap.put(authId, resultMap.get(authId)+", "+item.getParntsRole());
|
||||
}else {
|
||||
//동일한 값이 있으면 담지 않음
|
||||
if(!resultMap.containsValue(item.getParntsRole())) {
|
||||
resultMap.put(authId, item.getParntsRole());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private String convertKorNm(final String strAuthorRescueCode) {
|
||||
//권한코드 Map 생성
|
||||
List<XitAuthorInfoVO> listAuthorInfoVO = authAuthorMgtMapper.selectAuthorInfos(null);
|
||||
Map<String, String> mAuthorInfo = new HashMap<String, String>();
|
||||
for(XitAuthorInfoVO item : listAuthorInfoVO) {
|
||||
mAuthorInfo.put(item.getAuthId(), item.getAuthNm());
|
||||
}
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String[] items = strAuthorRescueCode.split(">");
|
||||
for(int i=0; i<items.length; i++) {
|
||||
String item = items[i];
|
||||
|
||||
if(i>0)
|
||||
sb.append(" > ");
|
||||
|
||||
String[] arrAuthId = item.split(",");
|
||||
for(int j=0; j<arrAuthId.length; j++) {
|
||||
String authId = arrAuthId[j].trim();
|
||||
|
||||
|
||||
if(j==0)
|
||||
sb.append(mAuthorInfo.get(authId));
|
||||
else
|
||||
sb.append(", ").append(mAuthorInfo.get(authId));
|
||||
}
|
||||
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.dao.AuthRoleMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthRoleMgtService;
|
||||
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.egovframe.rte.fdl.cmmn.exception.FdlException;
|
||||
import org.egovframe.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class AuthRoleMgtServiceBean extends AbstractServiceBean implements AuthRoleMgtService {
|
||||
|
||||
private final AuthRoleMgtMapper mapper;
|
||||
@Autowired
|
||||
@Qualifier("groupIdGnrService")
|
||||
private final EgovIdGnrService groupIdGnrService;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<XitRoleInfoVO> findAuthRoles(final Map<String,Object> paraMap, final RowBounds rowBounds) {
|
||||
return mapper.selectAuthRoles(paraMap, rowBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public <T> XitRoleInfoVO findAuthRole(final T t) {
|
||||
return mapper.selectAuthRole(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
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";
|
||||
try {
|
||||
vo.setRoleCode(roleTyp.concat("-").concat(groupIdGnrService.getNextStringId()));
|
||||
} catch (FdlException e) {
|
||||
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, e.getMessage());
|
||||
}
|
||||
mapper.insertAuthRole(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void modifyAuthRole(final XitRoleInfoVO vo) {
|
||||
mapper.updateAuthRole(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removeAuthRole(final String roleCode) {
|
||||
mapper.deleteAuthRole(roleCode);
|
||||
}
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.web;
|
||||
|
||||
import cokr.xit.foundation.web.AbstractController;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthAuthorMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
|
||||
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
|
||||
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
|
||||
import cokr.xit.fims.framework.support.util.Checks;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 권한관리 Controller
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:39:52
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(name = "", value = "/framework/biz/mng/auth")
|
||||
public class AuthAuthorMgtController extends AbstractController {
|
||||
|
||||
private final AuthAuthorMgtService service;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(name = "", value = "/mngAuthAuthorMgtPopup")
|
||||
public ModelAndView mngAuthAuthorMgtPopup(final XitAuthorInfoVO vo){
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getAuthId())){
|
||||
mav.addObject("authorInfoVO", new XitAuthorInfoVO());
|
||||
mav.addObject("pageTitle", "권한 등록");
|
||||
} else {
|
||||
mav.addObject("authorInfoVO", service.findAuthAuthor(vo));
|
||||
mav.addObject("pageTitle", "권한 변경");
|
||||
}
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthAuthorMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 권한관리 목록 페이지 조회</pre>
|
||||
*/
|
||||
@GetMapping(name = "", value = "findAuthAuthors")
|
||||
public ModelAndView findAuthAuthors(@RequestParam final Map<String,Object> paraMap) {
|
||||
return new ModelAndView("jsonView").addObject("result",service.findAuthAuthors(paraMap, MybatisUtils.getPagingInfo(paraMap)));
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/addAuthAuthor")
|
||||
//public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
|
||||
public ModelAndView addAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo){
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
//TODO : validate
|
||||
//ValidationError.of("", vo, bindingResult);
|
||||
service.addAuthAuthor(vo);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/modifyAuthAuthor")
|
||||
//public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo, final BindingResult bindingResult){
|
||||
public ModelAndView modifyAuthAuthor(@ModelAttribute final XitAuthorInfoVO vo){
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
//TODO : validate
|
||||
//ValidationError.of("", vo, bindingResult);
|
||||
service.modifyAuthAuthor(vo);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/removeAuthAuthor")
|
||||
public ModelAndView removeAuthAuthor(final String authId){
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
service.removeAuthAuthor(authId);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@RequestMapping(name = "", value = "/mngAuthRoleGrantMgtPopup")
|
||||
public ModelAndView mngAuthRoleGrantMgtPopup(@RequestParam Map<String,Object> paraMap) {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
List<Map<String,String>> regYnList = new ArrayList<>();
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("code", "Y");
|
||||
map.put("code_val", "등록");
|
||||
regYnList.add(map);
|
||||
map = new HashMap<>();;
|
||||
map.put("code", "N");
|
||||
map.put("code_val", "미등록");
|
||||
regYnList.add(map);
|
||||
|
||||
mav.addObject("pageTitle", "권한별 롤 목록");
|
||||
mav.addObject("regYnList", regYnList);
|
||||
mav.addObject("authorRoleManageVO", paraMap);
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthRoleGrantMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping(name = "", value="/findAuthRoleGrantList")
|
||||
public ModelAndView findAuthRoleGrantList(@RequestParam final Map<String,Object> paraMap) {
|
||||
return new ModelAndView("jsonView").addObject("result",service.findAuthRoleGrantList(paraMap));
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/saveAuthRoleGrantList")
|
||||
public ModelAndView saveAuthRoleGrantList(@RequestBody final Map<String, Object> paraMap) {
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
service.saveAuthRoleGrantList(paraMap);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.web;
|
||||
|
||||
import cokr.xit.foundation.web.AbstractController;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthHierarchyMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthAuthorMgtService;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthHierarchyMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
|
||||
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
|
||||
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
|
||||
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
|
||||
import cokr.xit.fims.framework.support.util.ValidationError;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.egovframe.rte.fdl.security.securedobject.EgovSecuredObjectService;
|
||||
import org.egovframe.rte.fdl.security.userdetails.jdbc.EgovJdbcUserDetailsManager;
|
||||
import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
|
||||
import org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 권한계층관리 Controller
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 11. 2. 오전 9:39:52
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(name = "", value = "/framework/biz/mng/auth")
|
||||
public class AuthHierarchyMgtController extends AbstractController {
|
||||
|
||||
private final AuthHierarchyMgtService service;
|
||||
private final AuthAuthorMgtService authAuthorMgtService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(name = "", value = "/mngAuthHierarchyMgtPopup")
|
||||
public ModelAndView mngAuthHierarchyMgtPopup(XitAuthHierarchyMngVO vo){
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
//최하위 권한의 권한계층 조회
|
||||
XitAuthHierarchyMngVO authHierarchyMngVO = service.findAuthHierarchyInfo(vo);
|
||||
//권한코드 Map 생성
|
||||
List<XitAuthorInfoVO> authorInfoVOList = authAuthorMgtService.findAuthAuthors(null);
|
||||
Map<String, String> mAuthorInfo = new HashMap<String, String>();
|
||||
authorInfoVOList.forEach(infoVO -> mAuthorInfo.put(infoVO.getAuthId(), infoVO.getAuthNm()));
|
||||
|
||||
//권한코드 목록에서 비중복 권한만 추출
|
||||
Map<String, String> mNoDuplAuthorInfo = new HashMap<String, String>();
|
||||
mNoDuplAuthorInfo.putAll(mAuthorInfo);
|
||||
String[] arrAuthorRescue = authHierarchyMngVO.getAuthorRescueCode().split(">");
|
||||
for(int i=0; i<arrAuthorRescue.length; i++) {
|
||||
String[] arrAuthId = arrAuthorRescue[i].split(",");
|
||||
for(int j=0; j<arrAuthId.length; j++) {
|
||||
String authId = arrAuthId[j].trim();
|
||||
if(mNoDuplAuthorInfo.containsKey(authId)) {
|
||||
mNoDuplAuthorInfo.remove(authId);
|
||||
}
|
||||
}
|
||||
}
|
||||
//권한계층 미설정 권한 목록 설정
|
||||
List<XitAuthorInfoVO> listAuthorInfo = new ArrayList<>();
|
||||
for (String authId : mNoDuplAuthorInfo.keySet()) {
|
||||
XitAuthorInfoVO authorInfo = new XitAuthorInfoVO();
|
||||
authorInfo.setAuthId(authId);
|
||||
authorInfo.setAuthNm(mNoDuplAuthorInfo.get(authId));
|
||||
listAuthorInfo.add(authorInfo);
|
||||
}
|
||||
|
||||
mav.addObject("authorList", listAuthorInfo);
|
||||
mav.addObject("mAuthorInfo", mAuthorInfo);
|
||||
mav.addObject("authHierarchyManage", authHierarchyMngVO);
|
||||
mav.addObject("pageTitle", "권한 계층 설정");
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthHierarchyMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping(name = "", value = "/findAuthHierarchies")
|
||||
public ModelAndView findAuthHierarchies(@RequestParam final Map<String,Object> paraMap){
|
||||
return new ModelAndView("jsonView").addObject("result",service.findAuthHierarchies(paraMap, MybatisUtils.getPagingInfo(paraMap)));
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/saveAuthHierarchy")
|
||||
public ModelAndView saveAuthHierarchy(@ModelAttribute final XitAuthHierarchyMngVO vo, final BindingResult bindingResult){
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
ValidationError.of("authHierarchyManage", vo, bindingResult);
|
||||
service.saveAuthHierarchy(vo);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.auth.web;
|
||||
|
||||
import cokr.xit.foundation.web.AbstractController;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO;
|
||||
import cokr.xit.fims.framework.biz.mng.auth.service.AuthRoleMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
|
||||
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
|
||||
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
|
||||
import cokr.xit.fims.framework.support.util.Checks;
|
||||
import cokr.xit.fims.framework.support.util.ValidationError;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 롤관리 Controller
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 4. 16. 오전 9:39:52
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(name = "", value = "/framework/biz/mng/auth")
|
||||
public class AuthRoleMgtController extends AbstractController {
|
||||
|
||||
private final AuthRoleMgtService service;
|
||||
|
||||
|
||||
@RequestMapping(name = "", value = "/mngAuthRoleMgtPopup")
|
||||
public ModelAndView mngAuthRoleMgtPopup(@ModelAttribute final XitRoleInfoVO vo){
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
if(Checks.isEmpty(vo) || Checks.isEmpty(vo.getRoleCode())){
|
||||
mav.addObject("roleManage", new XitRoleInfoVO());
|
||||
mav.addObject("pageTitle", "롤 등록");
|
||||
} else {
|
||||
mav.addObject("roleManage", service.findAuthRole(vo));
|
||||
mav.addObject("pageTitle", "롤 정보 변경");
|
||||
}
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/mngAuthRoleMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 롤 관리 목록 페이지 조회</pre>
|
||||
* @return String 요청처리 후 응답객체
|
||||
* @author: 김동규
|
||||
* @date: 2020. 7. 31.
|
||||
*/
|
||||
@GetMapping(name = "", value = "/findAuthRoles")
|
||||
public ModelAndView findAuthRoles(@RequestParam final Map<String,Object> paraMap) {
|
||||
return new ModelAndView("jsonView").addObject("result",service.findAuthRoles(paraMap, MybatisUtils.getPagingInfo(paraMap)));
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/addAuthRole")
|
||||
public ModelAndView addAuthRole(@ModelAttribute final XitRoleInfoVO 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(name = "", value = "/modifyAuthRole")
|
||||
public ModelAndView modifyAuthRole(@ModelAttribute final XitRoleInfoVO 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(name = "", 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;
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.dao;
|
||||
|
||||
import cokr.xit.fims.framework.biz.cmm.XitMenuCreatDtlsVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO;
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MenuByRoleMgtMapper {
|
||||
|
||||
<T> List<MenuCreateMngVO> selectRoleInfos(T t);
|
||||
|
||||
<T> List<MenuCreateMngVO> selectMenuInfoByRoleList(T t);
|
||||
int deleteMenuCreatDtls(final String authId);
|
||||
int insertMenuCreatDtls(final XitMenuCreatDtlsVO vo);
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.dao;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ProgramMgtMapper {
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램관리 목록 조회</pre>
|
||||
*/
|
||||
<T> List<ProgramMngVO> selectPrograms(final T t, final RowBounds rowBounds);
|
||||
<T> List<ProgramMngVO> selectPrograms(final T t);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램관리 상세정보 조회</pre>
|
||||
*/
|
||||
<T> ProgramMngVO selectProgram(final T t);
|
||||
|
||||
int updateProgram(final ProgramMngVO vo);
|
||||
|
||||
int insertProgram(final ProgramMngVO vo);
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램 정보 삭제</pre>
|
||||
*/
|
||||
int deleteProgram(final String programFileNm);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.service;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 메뉴생성관리 Service
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 3. 26. 오전 10:07:11
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
public interface MenuByRoleMgtService {
|
||||
|
||||
<T> List<MenuCreateMngVO> findRoleInfos(T t);
|
||||
<T> List<MenuCreateMngVO> findMenuInfoByRoleList(T t);
|
||||
void saveMenuByRoleList(Map<String, Object> paraMap);
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.service;
|
||||
|
||||
import cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 프로그램관리 Service
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 3. 26. 오전 10:07:11
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
public interface ProgramMgtService {
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램 목록 조회</pre>
|
||||
*/
|
||||
List<ProgramMngVO> findPrograms(final Map<String, Object> paraMap, final RowBounds rowBounds);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램 상세정보 조회</pre>
|
||||
*/
|
||||
ProgramMngVO findProgram(final String pgrmFileNm);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램 등록</pre>
|
||||
*/
|
||||
int addProgram(final ProgramMngVO vo);
|
||||
|
||||
/**
|
||||
* <pre>메소드 설명: 프로그램 변경</pre>
|
||||
*/
|
||||
int modifyProgram(final ProgramMngVO vo);
|
||||
|
||||
int removeProgram(final String programFileNm);
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.cache.service.CacheService;
|
||||
import cokr.xit.fims.framework.biz.cmm.XitMenuCreatDtlsVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.dao.MenuByRoleMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.service.MenuByRoleMgtService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//TODO : 캐쉬 반영??
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MenuByRoleMgtServiceBean extends AbstractServiceBean implements MenuByRoleMgtService {
|
||||
|
||||
private final MenuByRoleMgtMapper mapper;
|
||||
private final CacheService cacheService;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public <T> List<MenuCreateMngVO> findRoleInfos(T t) {
|
||||
return mapper.selectRoleInfos(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public <T> List<MenuCreateMngVO> findMenuInfoByRoleList(T t) {
|
||||
return mapper.selectMenuInfoByRoleList(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveMenuByRoleList(Map<String, Object> paraMap) {
|
||||
String authId = String.valueOf(paraMap.get("authId"));
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> menuNoList = (List<String>)paraMap.get("menuNoList");
|
||||
|
||||
// 해당 권한의 메뉴 삭제
|
||||
mapper.deleteMenuCreatDtls(authId);
|
||||
|
||||
// 메뉴 등록
|
||||
menuNoList.forEach((menuNo) -> {
|
||||
mapper.insertMenuCreatDtls(
|
||||
XitMenuCreatDtlsVO
|
||||
.builder()
|
||||
.authId(authId)
|
||||
.menuNo(menuNo)
|
||||
.build()
|
||||
);
|
||||
});
|
||||
cacheService.evictAllMenuCache();
|
||||
}
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.service.bean;
|
||||
|
||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.dao.ProgramMgtMapper;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.service.ProgramMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
import cokr.xit.fims.framework.core.utils.XitCmmnUtil;
|
||||
import cokr.xit.fims.framework.support.exception.BizRuntimeException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ProgramMgtServiceBean extends AbstractServiceBean implements ProgramMgtService {
|
||||
|
||||
private final ProgramMgtMapper mapper;
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<ProgramMngVO> findPrograms(final Map<String, Object> paraMap, final RowBounds rowBounds) {
|
||||
return mapper.selectPrograms(paraMap, rowBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public ProgramMngVO findProgram(final String pgrmFileNm) {
|
||||
return mapper.selectProgram(pgrmFileNm);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int addProgram(final ProgramMngVO vo) {
|
||||
return mapper.insertProgram(vo);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int modifyProgram(final ProgramMngVO vo) {
|
||||
String table = "프로그램목록";
|
||||
FrameworkConstants.DB_ACTION action = FrameworkConstants.DB_ACTION.U;
|
||||
|
||||
/**
|
||||
* 필수조건 확인
|
||||
*/
|
||||
String emsg = null;
|
||||
if(XitCmmnUtil.isEmpty(vo.getPgrmFileNm()))
|
||||
emsg = String.format("(%s)프로그램파일명(은)는 필수조건 입니다.", table);
|
||||
if(emsg!=null){
|
||||
log.error(emsg);
|
||||
throw BizRuntimeException.create(emsg);
|
||||
}
|
||||
|
||||
int result = mapper.updateProgram(vo);
|
||||
if(result<1) throw BizRuntimeException.create(String.format("%s 실패. 일치하는 자료가 없습니다.", action.getKorNm()));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int removeProgram(final String programFileNm) {
|
||||
return mapper.deleteProgram(programFileNm);
|
||||
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.web;
|
||||
|
||||
import cokr.xit.foundation.web.AbstractController;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.service.MenuByRoleMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
|
||||
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(name = "", value = "/framework/biz/mng/menu")
|
||||
public class MenuByRoleMgtController extends AbstractController {
|
||||
|
||||
private final MenuByRoleMgtService service;
|
||||
|
||||
|
||||
@RequestMapping(name = "", value = "/mngMenuByRoleMgtPopup")
|
||||
public ModelAndView mngMenuByRoleMgtPopup(final MenuCreateMngVO vo) {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
mav.addObject("list_menulist", service.findMenuInfoByRoleList(vo));
|
||||
mav.addObject("resultVO", vo);
|
||||
mav.addObject("pageTitle", "권한별 메뉴");
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuByRoleMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(name = "", value = "/findMenuByRoleList")
|
||||
public ModelAndView findMenus(@RequestParam final Map<String,Object> paraMap) {
|
||||
return new ModelAndView("jsonView").addObject("result",service.findRoleInfos(paraMap));
|
||||
}
|
||||
|
||||
@PostMapping(name = "", value = "/saveMenuByRoleList")
|
||||
public ModelAndView saveMenuByRoleList(@RequestBody final Map<String, Object> paraMap){
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
service.saveMenuByRoleList(paraMap);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
}
|
@ -1,133 +0,0 @@
|
||||
package cokr.xit.fims.framework.biz.mng.menu.web;
|
||||
|
||||
import cokr.xit.foundation.web.AbstractController;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO;
|
||||
import cokr.xit.fims.framework.biz.mng.menu.service.ProgramMgtService;
|
||||
import cokr.xit.fims.framework.core.constants.FrameworkConstants;
|
||||
|
||||
import cokr.xit.fims.framework.support.mybatis.MybatisUtils;
|
||||
import cokr.xit.fims.framework.support.util.AjaxMessageMapRenderer;
|
||||
import cokr.xit.fims.framework.support.util.Checks;
|
||||
import cokr.xit.fims.framework.support.util.ValidationError;
|
||||
import cokr.xit.fims.framework.support.util.constants.MessageKey;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @업무그룹명: 프로그램관리 Controller
|
||||
* @설명:
|
||||
* @최초작성일: 2020. 3. 25. 오후 4:05:40
|
||||
* @최초작성자: 박민규
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2002. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Controller
|
||||
@RequestMapping(name = "", value = "/framework/biz/mng/menu")
|
||||
public class ProgramMgtController extends AbstractController {
|
||||
private final ProgramMgtService service;
|
||||
|
||||
|
||||
@RequestMapping(name = "", value = "/mngProgramSchPopup")
|
||||
public ModelAndView mngProgramSchPopup(@RequestParam final Map<String, Object> paraMap) {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
mav.addAllObjects(paraMap);
|
||||
mav.addObject("pageTitle", "프로그램 조회");
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngProgramSchPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로그램 변경 / 추가를 위한 popup page
|
||||
* @param pgrmFileNm : 변경시 필수
|
||||
* @return ModelAndView
|
||||
*/
|
||||
@RequestMapping(name = "", value = "/mngProgramMgtPopup")
|
||||
public ModelAndView mngProgramMgtPopup(final String pgrmFileNm) {
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
if(Checks.isEmpty(pgrmFileNm)){
|
||||
mav.addObject("progrmMngVO", new ProgramMngVO());
|
||||
mav.addObject("pageTitle", "프로그램 정보 등록");
|
||||
} else {
|
||||
mav.addObject("progrmMngVO", service.findProgram(pgrmFileNm));
|
||||
mav.addObject("pageTitle", "프로그램 정보 변경");
|
||||
}
|
||||
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngProgramMgtPopup.popup");
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 메소드 설명: 자료 검색
|
||||
* Paging처리 : parameter로 Map 사용
|
||||
* @RequestParam 필요
|
||||
* @param paraMap
|
||||
* @return String 요청처리 후 응답객체
|
||||
* @author: 최정민
|
||||
* @date: 2022. 10. 13.
|
||||
*/
|
||||
|
||||
/*@PostMapping(name = "", value = "ProgramMng_list.do")*/
|
||||
@GetMapping(name = "", value = "/findPrograms")
|
||||
public ModelAndView findPrograms(@RequestParam final Map<String,Object> paraMap) {
|
||||
return new ModelAndView("jsonView").addObject("result",service.findPrograms(paraMap, MybatisUtils.getPagingInfo(paraMap)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로그램 등록
|
||||
* @param vo
|
||||
* @param bindingResult
|
||||
* @return ModelAndView
|
||||
*/
|
||||
@PostMapping(name = "", value = "/addProgram")
|
||||
public ModelAndView addProgram(@ModelAttribute final ProgramMngVO vo, final BindingResult bindingResult) {
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
//유효성 확인
|
||||
ValidationError.of("progrmMngVO", vo, bindingResult);
|
||||
service.addProgram(vo);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로그램 변경
|
||||
* @param vo
|
||||
* @param bindingResult
|
||||
* @return ModelAndView
|
||||
*/
|
||||
@PostMapping(name = "", value = "/modifyProgram")
|
||||
public ModelAndView modifyProgram(
|
||||
@ModelAttribute final ProgramMngVO vo, final BindingResult bindingResult) {
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
//유효성 확인
|
||||
ValidationError.of("progrmMngVO", vo, bindingResult);
|
||||
service.modifyProgram(vo);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로그램 삭제
|
||||
* @param pgrmFileNm
|
||||
* @return ModelAndView
|
||||
*/
|
||||
@PostMapping(name = "", value = "/removeProgram")
|
||||
public ModelAndView removeProgram(final String pgrmFileNm) {
|
||||
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
|
||||
|
||||
service.removeProgram(pgrmFileNm);
|
||||
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
|
||||
return mav;
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.cache.dao.CacheMenuMapper">
|
||||
<select id="selectMenuListAll" parameterType="string" resultType="java.util.Map">
|
||||
/* cachemenu-mysql-mapper|selectMenuListAll-전체 메뉴 조회|julim */
|
||||
<include refid="sqlTree"/>
|
||||
SELECT D.menu_id AS "menuSid"
|
||||
, D.menu_name AS "menuName"
|
||||
, (CASE B.ACTION WHEN '/' THEN '#' ELSE B.ACTION END) AS "menuView"
|
||||
, D.menu_depth AS "menuDepth"
|
||||
, D.parnt_menu_id AS "parentSid"
|
||||
, D.menu_full_path AS "menuPath"
|
||||
, D.menu_full_path_name AS "menuPathname"
|
||||
, '' AS "superYn"
|
||||
, ( SELECT COUNT(1)
|
||||
FROM TREE_QUERY SA
|
||||
WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt"
|
||||
, '' AS "iconClass"
|
||||
FROM tb_menu B
|
||||
INNER JOIN tree_query D
|
||||
ON B.menu_no = D.menu_id
|
||||
ORDER BY D.parnt_menu_id, B.srt_ord
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUser" parameterType="string" resultType="java.util.Map">
|
||||
/* cachemenu-mysql-mapper|selectMenuListByUser-사용자별 메뉴 조회|julim */
|
||||
<include refid="sqlTree"/>
|
||||
SELECT D.menu_id AS "menuSid"
|
||||
, D.menu_name AS "menuName"
|
||||
, (CASE B.ACTION WHEN '/' THEN '#' ELSE B.ACTION END) AS "menuView"
|
||||
, D.menu_depth AS "menuDepth"
|
||||
, D.parnt_menu_id AS "parentSid"
|
||||
, D.menu_full_path AS "menuPath"
|
||||
, D.menu_full_path_name AS "menuPathname"
|
||||
, '' AS "superYn"
|
||||
, ( SELECT COUNT(1)
|
||||
FROM TREE_QUERY SA
|
||||
WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt"
|
||||
, D.icon_class AS "iconClass"
|
||||
FROM xit_menu_creat_dtls A
|
||||
INNER JOIN tb_menu B
|
||||
ON A.menu_no = B.menu_no
|
||||
INNER JOIN (
|
||||
SELECT FA.auth_Id, FA.USER_ID
|
||||
FROM xit_user_scrty_setup FA
|
||||
WHERE FA.USER_ID = #{uniqId}
|
||||
) C
|
||||
ON A.auth_Id = C.auth_Id
|
||||
INNER JOIN tree_query D
|
||||
ON B.menu_no = D.menu_id
|
||||
ORDER BY D.parnt_menu_id, B.srt_ord
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByAuthId" parameterType="string" resultType="java.util.Map">
|
||||
/* cachemenu-mysql-mapper|selectMenuListByAuthId-권한별 메뉴 조회|julim */
|
||||
<include refid="sqlTree"/>
|
||||
SELECT D.menu_id AS "menuSid"
|
||||
, D.menu_name AS "menuName"
|
||||
, (CASE B.ACTION WHEN '/' THEN '#' ELSE B.ACTION END) AS "menuView"
|
||||
, D.menu_depth AS "menuDepth"
|
||||
, D.parnt_menu_id AS "parentSid"
|
||||
, D.menu_full_path AS "menuPath"
|
||||
, D.menu_full_path_name AS "menuPathname"
|
||||
, '' AS "superYn"
|
||||
, (SELECT COUNT(1)
|
||||
FROM TREE_QUERY SA
|
||||
WHERE SA.parnt_menu_id = D.menu_id) AS "childCnt"
|
||||
, D.icon_class AS "iconClass"
|
||||
FROM xit_menu_creat_dtls A
|
||||
JOIN tb_menu B
|
||||
ON A.menu_no = B.menu_no
|
||||
JOIN tree_query D
|
||||
ON B.menu_no = D.menu_id
|
||||
WHERE A.auth_Id = #{authId}
|
||||
ORDER BY D.parnt_menu_id, B.srt_ord
|
||||
</select>
|
||||
|
||||
<sql id="sqlTree">
|
||||
WITH RECURSIVE tree_query(
|
||||
menu_id
|
||||
, PARNT_menu_id
|
||||
, menu_name
|
||||
, menu_full_path
|
||||
, menu_full_path_name
|
||||
, menu_depth
|
||||
, icon_class
|
||||
) AS (
|
||||
SELECT A.menu_no AS "menu_id"
|
||||
, A.prnt_no AS "parnt_menu_id"
|
||||
, A.menu_nm AS "menu_name"
|
||||
, CAST(CONCAT('', A.menu_no) AS VARCHAR(100))
|
||||
, CAST(CONCAT('', A.menu_nm) AS VARCHAR(1000))
|
||||
, 1 AS "menu_depth"
|
||||
, '' AS "icon_class"
|
||||
FROM tb_menu A
|
||||
WHERE A.prnt_no = 0
|
||||
UNION ALL
|
||||
SELECT A.menu_no AS "menu_id"
|
||||
, A.prnt_no AS "parnt_menu_id"
|
||||
, A.menu_nm AS "menu_name"
|
||||
, CONCAT(B.menu_full_path, '_', A.menu_no) AS "menu_full_path"
|
||||
, CONCAT(B.menu_full_path_name, ' > ', A.menu_nm) AS "menu_full_path_name"
|
||||
, B.menu_depth + 1 AS "menu_depth"
|
||||
, '' AS "icon_class"
|
||||
FROM tb_menu A
|
||||
INNER JOIN tree_query B
|
||||
ON A.prnt_no = B.menu_id
|
||||
WHERE B.menu_id != 0
|
||||
)
|
||||
</sql>
|
||||
|
||||
</mapper>
|
@ -1,66 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.cmm.dao.XitMainMapper">
|
||||
|
||||
<select id="findMainMenuHeads" resultType="cokr.xit.fims.framework.core.XitMenuManageVO">
|
||||
/** findMainMenuHeads */
|
||||
/** 화면 상단 메뉴목록 조회 */
|
||||
SELECT
|
||||
B.MENU_NO AS "menuNo"
|
||||
,B.srt_ord AS "srtOrd"
|
||||
,B.MENU_NM AS "menuNm"
|
||||
,B.prnt_no AS "prntNo"
|
||||
,B.dscrp AS "dscrp"
|
||||
,B.img_cnf AS "relateImagePath"
|
||||
,B.img_nm AS "imgNm"
|
||||
,B.pgrm_file_nm AS "pgrmFileNm"
|
||||
,(SELECT SA.URL FROM XIT_PROGRM_LIST SA WHERE B.pgrm_file_nm = SA.pgrm_file_nm) AS "chkURL"
|
||||
,C.USER_ID
|
||||
FROM XIT_MENU_CREAT_DTLS A
|
||||
INNER JOIN tb_menu B ON A.MENU_NO = B.MENU_NO
|
||||
INNER JOIN (SELECT FA.auth_Id, FA.USER_ID
|
||||
FROM TB_AUTH_USER FA
|
||||
WHERE FA.USER_ID = #{tmpUniqId}
|
||||
) C ON A.auth_Id = C.auth_Id
|
||||
WHERE 1=1
|
||||
AND B.MENU_NO > 0
|
||||
AND B.prnt_no = 0
|
||||
ORDER BY B.srt_ord
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findtMainMenuLefts" resultType="cokr.xit.fims.framework.core.XitMenuManageVO">
|
||||
/** findtMainMenuLefts */
|
||||
/** 화면 좌측 메뉴목록 조회 */
|
||||
SELECT
|
||||
B.MENU_NO AS "menuNo"
|
||||
,B.srt_ord AS "srtOrd"
|
||||
,B.MENU_NM AS "menuNm"
|
||||
,B.prnt_no AS "prntNo"
|
||||
,B.img_cnf AS "relateImagePath"
|
||||
,B.img_nm AS "imgNm"
|
||||
,(SELECT SA.URL FROM XIT_PROGRM_LIST SA WHERE B.pgrm_file_nm = SA.pgrm_file_nm) AS "chkURL"
|
||||
FROM XIT_MENU_CREAT_DTLS A
|
||||
INNER JOIN tb_menu B ON A.MENU_NO = B.MENU_NO
|
||||
INNER JOIN (SELECT FA.auth_Id, FA.USER_ID
|
||||
FROM TB_AUTH_USER FA
|
||||
WHERE FA.USER_ID = #{tmpUniqId}
|
||||
) C ON A.auth_Id = C.auth_Id
|
||||
WHERE 1=1
|
||||
ORDER BY B.srt_ord
|
||||
</select>
|
||||
|
||||
<select id="findMenuPath" resultType="String">
|
||||
SELECT A.ACTION
|
||||
FROM tb_menu A
|
||||
WHERE A.MENU_NO = #{menuNo}
|
||||
</select>
|
||||
|
||||
<select id="findMenuPath2" resultType="String">
|
||||
SELECT A.ACTION
|
||||
FROM tb_menu A
|
||||
, XIT_PROGRM_LIST B
|
||||
WHERE A.pgrm_file_nm = B.pgrm_file_nm
|
||||
AND B.pgrm_file_nm = #{pgmId}
|
||||
</select>
|
||||
</mapper>
|
@ -1,165 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.mng.auth.dao.AuthAuthorMgtMapper">
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* TB_AUTHORITY : 권한 정보
|
||||
************************************************************************************************************** -->
|
||||
<sql id="sqlAuthorInfo">
|
||||
SELECT auth_Id
|
||||
, AUTH_NM
|
||||
, dscrp
|
||||
, REG_DT
|
||||
FROM TB_AUTHORITY
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(authId)">
|
||||
AND auth_Id = #{authId}
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(authNm)">
|
||||
AND INSTR(AUTH_NM, #{authNm}) > 0
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(dscrp)">
|
||||
AND INSTR(dscrp, #{dscrp}) > 0
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectAuthorInfos" resultType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO">
|
||||
/* auth-author-mysql-mapper|selectAuthorInfos-권한 목록 조회|julim */
|
||||
<include refid="sqlAuthorInfo"/>
|
||||
ORDER BY REG_DT DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAuthorInfo" resultType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO">
|
||||
/* auth-author-mysql-mapper|selectAuthorInfo-권한 정보 조회|julim */
|
||||
<include refid="sqlAuthorInfo"/>
|
||||
</select>
|
||||
|
||||
<insert id="insertAuthorInfo" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO">
|
||||
/* auth-author-mysql-mapper|insertAuthorInfo-권한 정보 등록|julim */
|
||||
INSERT INTO TB_AUTHORITY (
|
||||
auth_Id
|
||||
, AUTH_NM
|
||||
, dscrp
|
||||
, REG_DT
|
||||
) VALUES (
|
||||
#{authId}
|
||||
,#{authNm}
|
||||
,#{dscrp}
|
||||
,DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateAuthorInfo" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO">
|
||||
/* auth-author-mysql-mapper|updateAuthorInfos-권한 정보 변경|julim */
|
||||
UPDATE TB_AUTHORITY
|
||||
SET AUTH_NM = IF(AUTH_NM = #{authNm}, AUTH_NM, #{authNm})
|
||||
, dscrp = IF(dscrp = #{dscrp}, dscrp, #{dscrp})
|
||||
WHERE auth_Id = #{authId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAuthorInfo" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorInfoVO">
|
||||
/* auth-author-mysql-mapper|deleteAuthorInfos-권한 정보 삭제|julim */
|
||||
DELETE
|
||||
FROM TB_AUTHORITY
|
||||
WHERE auth_Id = #{authId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectAuthRoleGrantList" resultType="cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO">
|
||||
/* auth-author-mysql-mapper|selectAuthRoleGrantList- 권한별 롤 조회|julim */
|
||||
SELECT xri.role_code
|
||||
, xri.role_nm
|
||||
, xri.role_pttrn
|
||||
, xri.dscrp
|
||||
, xri.role_ty
|
||||
, xri.role_sort
|
||||
, DATE_FORMAT(arr.creat_dt, '%Y%m%d%H%i%s') AS creatDt
|
||||
, IF(arr.role_code IS NULL, 'N', 'Y') AS "regYn"
|
||||
FROM xit_role_info xri
|
||||
LEFT OUTER JOIN ( SELECT auth_Id
|
||||
, role_code
|
||||
, creat_dt
|
||||
FROM xit_author_role_relate
|
||||
WHERE auth_Id = #{authId}
|
||||
) arr
|
||||
ON xri.role_code = arr.role_code
|
||||
ORDER BY arr.role_code DESC, xri.role_sort
|
||||
</select>
|
||||
|
||||
<delete id="deleteRoleGrant" parameterType="map">
|
||||
/* auth-author-mysql-mapper|deleteRoleGrant-권한 롤 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_author_role_relate
|
||||
WHERE auth_Id = #{authId}
|
||||
AND role_code = #{roleCode}
|
||||
</delete>
|
||||
|
||||
<insert id="saveRoleGrant" parameterType="map">
|
||||
/* auth-author-mysql-mapper|saveRoleGrant-권한 롤 등록|julim */
|
||||
INSERT INTO xit_author_role_relate (
|
||||
auth_Id
|
||||
, role_code
|
||||
, creat_dt
|
||||
) VALUES (
|
||||
#{authId}
|
||||
, #{roleCode}
|
||||
, NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
creat_dt = NOW()
|
||||
</insert>
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_role_sclsrt_rescue : 역할 계층 정보
|
||||
************************************************************************************************************** -->
|
||||
<select id="selectRoleSclsrtRescues" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO" resultType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO">
|
||||
/* auth-author-mysql-mapper|selectRoleSclsrtRescues-역할계층 조회|julim */
|
||||
SELECT parnts_role
|
||||
, chldrn_role
|
||||
FROM xit_role_sclsrt_rescue
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(parntsRole)">
|
||||
AND parnts_role = #{parntsRole}
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(chldrnRole)">
|
||||
AND chldrn_role = #{chldrnRole}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleSclsrtRescue" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO" resultType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO">
|
||||
/* auth-author-mysql-mapper|selectRoleSclsrtRescue-역할계층 정보 조회|julim */
|
||||
SELECT parnts_role
|
||||
, chldrn_role
|
||||
FROM xit_role_sclsrt_rescue
|
||||
WHERE parnts_role = #{parntsRole}
|
||||
AND chldrn_role = #{chldrnRole}
|
||||
</select>
|
||||
<insert id="insertRoleSclsrtRescue" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO">
|
||||
/* auth-author-mysql-mapper|insertRoleSclsrtRescue-역할계층 정보 등록|julim */
|
||||
INSERT
|
||||
INTO xit_role_sclsrt_rescue(
|
||||
parnts_role
|
||||
, chldrn_role
|
||||
)VALUES(
|
||||
#{parntsRole}
|
||||
, #{chldrnRole}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deleteRoleSclsrtRescue" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitRoleSclsrtRescueVO">
|
||||
/* auth-author-mysql-mapper|deleteRoleSclsrtRescue-역할계층 삭제 조회|julim */
|
||||
DELETE
|
||||
FROM xit_role_sclsrt_rescue
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(parntsRole)">
|
||||
AND parnts_role = #{parntsRole}
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(chldrnRole)">
|
||||
AND chldrn_role = #{chldrnRole}
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,70 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.mng.auth.dao.AuthGrpMgtMapper">
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_author_group_info : 권한그룹 정보
|
||||
************************************************************************************************************** -->
|
||||
<select id="selectAuthorGroupInfos" resultType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO">
|
||||
/* auth-grp-mysql-mapper|selectAuthorGroupInfos-권한그룹 목록 조회|julim */
|
||||
SELECT agi.grp_id
|
||||
, agi.group_nm
|
||||
, agi.dscrp
|
||||
, agi.auth_Id
|
||||
, xai.AUTH_NM
|
||||
, agi.group_creat_de
|
||||
FROM xit_author_group_info agi
|
||||
LEFT OUTER JOIN TB_AUTHORITY xai
|
||||
ON agi.auth_Id = xai.auth_Id
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(groupNm)">
|
||||
AND agi.group_nm = #{groupNm}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAuthorGroupInfo" resultType="cokr.xit.fims.framework.biz.mng.auth.XitAuthorGroupInfoVO">
|
||||
/* auth-grp-mysql-mapper|selectAuthorGroupInfo-권한그룹 정보 조회|julim */
|
||||
SELECT grp_id
|
||||
, group_nm
|
||||
, dscrp
|
||||
, auth_Id
|
||||
, group_creat_de
|
||||
FROM xit_author_group_info
|
||||
WHERE grp_id = #{grpId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAuthorGroupInfo">
|
||||
/* auth-grp-mysql-mapper|insertAuthorGroupInfo-권한그룹 등록|julim */
|
||||
INSERT INTO xit_author_group_info(
|
||||
grp_id
|
||||
, group_nm
|
||||
, dscrp
|
||||
, auth_Id
|
||||
, group_creat_de
|
||||
)VALUES(
|
||||
#{grpId}
|
||||
, #{groupNm}
|
||||
, #{dscrp}
|
||||
, #{authId}
|
||||
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateAuthorGroupInfo">
|
||||
/* auth-grp-mysql-mapper|updateAuthorGroupInfo-권한그룹 정보 변경|julim */
|
||||
UPDATE xit_author_group_info
|
||||
SET group_nm = IF(group_nm = #{groupNm}, group_nm, #{groupNm})
|
||||
, dscrp = IF(dscrp = #{dscrp}, dscrp, #{dscrp})
|
||||
, auth_Id = IF(auth_Id = #{authId}, auth_Id, #{authId})
|
||||
WHERE grp_id = #{grpId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAuthorGroupInfo">
|
||||
/* auth-grp-mysql-mapper|deleteAuthorGroupInfo-권한그룹 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_author_group_info
|
||||
WHERE grp_id = #{grpId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,81 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.mng.auth.dao.AuthRoleMgtMapper">
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_role_info : 롤(역할) 정보
|
||||
************************************************************************************************************** -->
|
||||
<sql id="sqlRoleInfo">
|
||||
SELECT role_code
|
||||
, role_nm
|
||||
, role_pttrn
|
||||
, dscrp
|
||||
, role_ty
|
||||
, role_sort
|
||||
, role_creat_de
|
||||
FROM xit_role_info
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(roleCode)">
|
||||
AND role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(roleNm)">
|
||||
AND INSTR(role_nm, #{roleNm}) > 0
|
||||
</if>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(roleTy)">
|
||||
AND role_ty = #{roleTy}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectAuthRoles" parameterType="map" resultType="cokr.xit.fims.framework.biz.mng.auth.XitAuthRuleMngVO">
|
||||
/* auth-role-mysql-mapper|selectAuthRoles-롤목록 조회|julim */
|
||||
<include refid="sqlRoleInfo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectAuthRole" resultType="cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO">
|
||||
/* auth-role-mysql-mapper|selectAuthRole-롤 정보 조회|julim */
|
||||
<include refid="sqlRoleInfo"/>
|
||||
</select>
|
||||
|
||||
<insert id="insertAuthRole" parameterType="cokr.xit.fims.framework.biz.mng.auth.XitRoleInfoVO">
|
||||
/* auth-role-mysql-mapper|insertAuthRole-롤 정보 등록|julim */
|
||||
INSERT
|
||||
INTO xit_role_info (
|
||||
role_code
|
||||
, role_nm
|
||||
, role_pttrn
|
||||
, dscrp
|
||||
, role_ty
|
||||
, role_sort
|
||||
, role_creat_de
|
||||
) VALUES (
|
||||
#{roleCode}
|
||||
, #{roleNm}
|
||||
, #{rolePttrn}
|
||||
, #{dscrp}
|
||||
, #{roleTy}
|
||||
, #{roleSort}
|
||||
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateAuthRole" parameterType="cokr.xit.fims.framework.biz.mng.auth.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})
|
||||
, dscrp = IF(dscrp = #{dscrp}, dscrp, #{dscrp})
|
||||
, 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="deleteAuthRole" parameterType="string">
|
||||
/* auth-role-mysql-mapper|deleteAuthRole-롤 정보 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_role_info
|
||||
WHERE role_code = #{roleCode}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -1,80 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.mng.menu.dao.MenuByRoleMgtMapper">
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* TB_AUTHORITY : 권한 정보
|
||||
************************************************************************************************************** -->
|
||||
<sql id="sqlAuthorInfo">
|
||||
SELECT xai.auth_Id
|
||||
, xai.AUTH_NM
|
||||
, xai.dscrp
|
||||
, xai.REG_DT
|
||||
, (SELECT COUNT(auth_Id)
|
||||
FROM xit_menu_creat_dtls
|
||||
WHERE xai.auth_Id = auth_Id ) AS chkYeoBu
|
||||
FROM TB_AUTHORITY xai
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(authId)">
|
||||
AND INSTR(xai.auth_Id, #{authId})
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleInfos" resultType="cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO">
|
||||
/* menu-by-role-mysql-mapper|selectRoleInfos-권한 목록 조회|julim */
|
||||
<include refid="sqlAuthorInfo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleInfo" resultType="cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO">
|
||||
/* menu-by-role-mysql-mapper|selectRoleInfo-권한 정보 조회|julim */
|
||||
<include refid="sqlAuthorInfo"/>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* tb_menu : 메뉴 정보
|
||||
************************************************************************************************************** -->
|
||||
<select id="selectMenuInfoByRoleList" resultType="cokr.xit.fims.framework.biz.mng.menu.MenuCreateMngVO">
|
||||
/* menu-by-role-mysql-mapper|selectMenuInfoByRoleList-권한별 메뉴 목록 조회|julim */
|
||||
SELECT
|
||||
A.menu_no
|
||||
, A.srt_ord
|
||||
, A.menu_nm
|
||||
, A.prnt_no
|
||||
, (SELECT count(B.menu_no)
|
||||
FROM xit_menu_creat_dtls B
|
||||
WHERE B.menu_no = A.menu_no
|
||||
AND B.auth_Id = #{authId}) AS chkYeoBu
|
||||
FROM tb_menu A
|
||||
WHERE A.menu_no > 0
|
||||
ORDER BY A.srt_ord
|
||||
</select>
|
||||
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_menu_creat_dtls : 권한별 메뉴
|
||||
************************************************************************************************************** -->
|
||||
<delete id="deleteMenuCreatDtls">
|
||||
/* menu-by-role-mysql-mapper|deleteMenuCreatDtls-권한별 메뉴 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_menu_creat_dtls
|
||||
WHERE auth_Id = #{authId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertMenuCreatDtls">
|
||||
/* menu-by-role-mysql-mapper|insertMenuCreatDtls-권한별 메뉴 등록|julim */
|
||||
INSERT
|
||||
INTO xit_menu_creat_dtls (
|
||||
menu_no
|
||||
, auth_Id
|
||||
, mapng_creat_id
|
||||
) VALUES (
|
||||
#{menuNo}
|
||||
, #{authId}
|
||||
, #{mapngCreatId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
@ -1,70 +0,0 @@
|
||||
<?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="cokr.xit.fims.framework.biz.mng.menu.dao.ProgramMgtMapper">
|
||||
|
||||
<!-- *************************************************************************************************************
|
||||
* xit_progrm_list : 프로그램 정보
|
||||
************************************************************************************************************** -->
|
||||
<sql id="sqlProgram">
|
||||
SELECT pgrm_file_nm
|
||||
, progrm_stre_cours
|
||||
, progrm_stre_cours AS progrmStrePath
|
||||
, progrm_korean_nm
|
||||
/*, CONCAT(SUBSTRING(dscrp, 10, 1),'...') AS dscrp -->*/
|
||||
, dscrp
|
||||
, url
|
||||
FROM xit_progrm_list
|
||||
</sql>
|
||||
|
||||
<select id="selectPrograms" resultType="cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO">
|
||||
/* program-mysql-mapper|selectPrograms-프로그램 목록 조회|julim */
|
||||
<include refid="sqlProgram"/>
|
||||
<where>
|
||||
<if test="@cokr.xit.fims.framework.core.utils.XitCmmnUtil@notEmpty(progrmKoreanNm)">
|
||||
AND INSTR(progrm_korean_nm, #{progrmKoreanNm}) > 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProgram" parameterType="string" resultType="cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO">
|
||||
/* program-mysql-mapper|selectProgram-프로그램 정보 조회|julim */
|
||||
<include refid="sqlProgram"/>
|
||||
WHERE pgrm_file_nm = #{pgrmFileNm}
|
||||
</select>
|
||||
|
||||
<insert id="insertProgram" parameterType="cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO">
|
||||
/* program-mysql-mapper|insertProgram-프로그램 등록|julim */
|
||||
INSERT
|
||||
INTO xit_progrm_list(
|
||||
pgrm_file_nm
|
||||
, progrm_stre_cours
|
||||
, progrm_korean_nm
|
||||
, dscrp
|
||||
, url
|
||||
) VALUES (
|
||||
#{pgrmFileNm}
|
||||
, #{progrmStrePath}
|
||||
, #{progrmKoreanNm}
|
||||
, #{dscrp}
|
||||
, #{URL}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateProgram" parameterType="cokr.xit.fims.framework.biz.mng.menu.ProgramMngVO">
|
||||
/* program-mysql-mapper|updateProgram-프로그램 정보 변경|julim */
|
||||
UPDATE xit_progrm_list
|
||||
SET progrm_korean_nm = #{progrmKoreanNm}
|
||||
, progrm_stre_cours = #{progrmStrePath}
|
||||
, dscrp = #{dscrp}
|
||||
, url = #{URL}
|
||||
WHERE pgrm_file_nm = #{pgrmFileNm}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProgram" parameterType="string">
|
||||
/* program-mysql-mapper|deleteProgram-프로그램 정보 삭제|julim */
|
||||
DELETE
|
||||
FROM xit_progrm_list
|
||||
WHERE pgrm_file_nm = #{pgrmFileNm}
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue