From 41215a1126a94e5152e204976b7cf01845989bfd Mon Sep 17 00:00:00 2001 From: sjh88 Date: Wed, 25 Jan 2023 11:07:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A9=94=EB=89=B4=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20=EC=8B=9C=20=EB=A9=94=EB=89=B4=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EC=A1=B4=EC=9E=AC=ED=95=98=EB=8A=94=EC=A7=80=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8=20=ED=9B=84=20=EA=B6=8C=ED=95=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/mng/menu/mapper/IMenuMgtMapper.java | 2 ++ .../biz/mng/menu/service/MenuMgtService.java | 4 +++- .../framework/mng/menu/menu-mysql-mapper.xml | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) 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