diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java index 60f7fab6..a06aa138 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/mapper/IMenuMgtMapper.java @@ -26,10 +26,12 @@ public interface IMenuMgtMapper { List selectMenuInfos(final T t, final RowBounds rowBounds); List selectMenuInfos(final T t); XitMenuInfoVO selectMenuInfo(final T t); + List selectMenuCreatDtls(final T t); int insertMenuInfo(final XitMenuInfoVO vo); int updateMenuInfo(final XitMenuInfoVO vo); int deleteMenuInfo(final String menuNo); + int deleteMenuCreatDtlsList(final String menuNo); diff --git a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java index 9a6525da..a54284af 100644 --- a/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java +++ b/src/main/java/kr/xit/framework/biz/mng/menu/service/MenuMgtService.java @@ -78,8 +78,10 @@ public class MenuMgtService implements IMenuMgtService { if(mapper.selectMenuInfos(XitMenuInfoVO.builder().upperMenuNo(menuNo).build()).size() > 0) throw BizRuntimeException.create("fail.common.delete.upperMenuExist"); + //권한별 메뉴 관리 조회 후 삭제 + if(mapper.selectMenuCreatDtls(XitMenuInfoVO.builder().menuNo(menuNo).build()).size() > 0) + mapper.deleteMenuCreatDtlsList(menuNo); - //TODO: xit_menu_creat_dtls 해당 정보 삭제후 실행??? mapper.deleteMenuInfo(menuNo); cacheService.evictAllMenuCache(); } diff --git a/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml b/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml index 84a66cc5..361b6a3a 100644 --- a/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml +++ b/src/main/resources/sqlmapper/framework/mng/menu/menu-mysql-mapper.xml @@ -39,6 +39,15 @@ + + /* menu-mysql-mapper|insertMenuInfo-메뉴 정보 등록|julim */ INSERT @@ -90,6 +99,14 @@ + + /* menu-mysql-mapper|deleteMenuCreatDtlsList-메뉴생성내역 권한 데이터 삭제|julim */ + DELETE + FROM xit_menu_creat_dtls + WHERE menu_no = #{menuNo} + + + /* menu-mysql-mapper|deleteAllMenuCreatDtlsList-메뉴생성내역 전체데이터 삭제|julim */ DELETE