diff --git a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml deleted file mode 100644 index 594ed991..00000000 --- a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - -SELECT A.GRP_ID - , A.GRP_NM - , A.DSCRP - , A.REG_DT - FROM TB_ACTION_GRP A - - -AND GRP_ID IN (#{groupID}) - - -AND ${by} LIKE CONCAT('%', #{term}, '%') - - - - - - - - - - -/* 기능그룹 등록(actionGroupMapper.insertGroup) */ -INSERT INTO TB_ACTION_GRP ( - GRP_ID - , GRP_NM - , DSCRP - , REG_DT -) VALUES ( - #{id} - , #{name} - , #{description} - , -) - - - -/* 기능그룹 수정(actionGroupMapper.updateGroup) */ -UPDATE TB_ACTION_GRP SET - GRP_NM = #{name} - , DSCRP = #{description} - WHERE GRP_ID = #{id} - - - -/* 기능그룹 삭제(actionGroupMapper.removeGroups) */ -DELETE FROM TB_ACTION_GRP - WHERE GRP_ID IN (#{groupID}) - - - - - -/* 그룹별 기능 추가(actionGroupMapper.addActions) */ -INSERT INTO TB_GRP_ACTION (GRP_ID, ACTION, REG_DT, RGTR) -SELECT GRP_ID, ACTION,, #{currentUser.id} - FROM ( - SELECT #{groupID} GRP_ID, #{action} ACTION FROM DUAL - ) A - WHERE NOT EXISTS ( - SELECT GRP_ID, ACTION - FROM TB_GRP_ACTION B - WHERE B.GRP_ID = A.GRP_ID - AND B.ACTION = A.ACTION - ) - - - -/* 그룹별 기능 삭제(actionGroupMapper.removeActions) */ -DELETE FROM TB_GRP_ACTION - -AND GRP_ID IN (#{groupID}) -AND ACTION IN (#{action}) - - - - \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/code-mapper.xml b/src/main/resources/sql/mapper/base/code-mapper.xml deleted file mode 100644 index 60d696c2..00000000 --- a/src/main/resources/sql/mapper/base/code-mapper.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SELECT CTGR_ID - , CTGR_NM - , DSCRP - , USE_YN - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - FROM TB_CODE_CTGR - - AND USE_YN = 'Y' - AND CTGR_ID IN (#{categoryID}) - - - - - - - - - - -/* 코드 카테고리 등록(codeMapper.insertCategory) */ -INSERT INTO TB_CODE_CTGR ( - CTGR_ID - , CTGR_NM - , DSCRP - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - , USE_YN -) VALUES ( - #{category.id} - , #{category.name} - , #{category.description} - , - , #{currentUser.id} - , - , #{currentUser.id} - , 'Y' -) - - -/* 코드 카테고리 수정(codeMapper.updateCategory) */ -UPDATE TB_CODE_CTGR SET - CTGR_NM = #{category.name} - , DSCRP = #{category.description} - , MDFCN_DT = - , MDFR = #{currentUser.id} -WHERE CTGR_ID = #{category.id} - - - -/* 코드 카테고리 제거(codeMapper.removeCategories) */ -UPDATE TB_CODE_CTGR SET - MDFCN_DT = - , MDFR = #{currentUser.id} - , USE_YN = 'N' -WHERE CTGR_ID IN (#{categoryID}) - - - - -SELECT GRP_ID - , CTGR_ID - , GRP_NM - , DSCRP - , USE_YN - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - FROM TB_CODE_GRP - AND USE_YN = 'Y' - AND CTGR_ID IN (#{categoryID}) - AND GRP_ID IN (#{groupID}) - - - - - - - - -/* 코드그룹 등록(codeMapper.insertGroup) */ -INSERT INTO TB_CODE_GRP ( - GRP_ID - , GRP_NM - , CTGR_ID - , DSCRP - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - , USE_YN -) VALUES ( - #{group.id} - , #{group.name} - , #{group.categoryID} - , #{group.description} - , - , #{currentUser.id} - , - , #{currentUser.id} - , 'Y' -) - - -/* 코드그룹 수정(codeMapper.updateGroup) */ -UPDATE TB_CODE_GRP SET - GRP_NM = #{group.name} - , CTGR_ID = #{group.categoryID} - , DSCRP = #{group.description} - , MDFCN_DT = - , MDFR = #{currentUser.id} - WHERE GRP_ID = #{group.id} - - - -/*코드그룹 제거(codeMapper.removeGroups) */ -UPDATE TB_CODE_GRP SET - USE_YN = 'N' - , MDFCN_DT = - , MDFR = #{currentUser.id} - -CTGR_ID IN (#{categoryID}) -GRP_ID IN (#{groupID}) - - - - - -SELECT GRP_ID - , CODE - , CODE_VAL - , DSCRP - , ETC_1 - , ETC_2 - , ETC_3 - , SRT_ORD - , USE_YN - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - FROM TB_CMN_CODE - - AND USE_YN = 'Y' - AND GRP_ID IN (#{groupID}) - AND CODE IN (#{code}) - - - - - - - - - - -/* 코드 등록(codeMapper.insertCode) */ -INSERT INTO TB_CMN_CODE ( - GRP_ID - , CODE - , CODE_VAL - , DSCRP - , ETC_1 - , ETC_2 - , ETC_3 - , SRT_ORD - , REG_DT - , RGTR - , MDFCN_DT - , MDFR - , USE_YN -) VALUES ( - #{code.groupID} - , #{code.code} - , #{code.value} - , #{code.description} - , #{code.etc1} - , #{code.etc2} - , #{code.etc3} - , #{code.sortOrder} - , - , #{currentUser.id} - , - , #{currentUser.id} - , 'Y' -) - - - -/* 코드 수정(codeMapper.updateCode) */ -UPDATE TB_CMN_CODE SET - CODE_VAL = #{code.value} - , DSCRP = #{code.description} - , ETC_1 = #{code.etc1} - , ETC_2 = #{code.etc2} - , ETC_3 = #{code.etc3} - , MDFCN_DT = - , MDFR = #{currentUser.id} - WHERE GRP_ID = #{code.groupID} - AND CODE = #{code.code} - - - -/* 코드 정렬순서 변경(codeMapper.reorderCodes) */ -UPDATE TB_CMN_CODE SET - SRT_ORD = CASE CODE - WHEN #{code} THEN #{index} - ELSE SRT_ORD - END - , MDFCN_DT = - , MDFR = #{currentUser.id} - WHERE GRP_ID = #{groupID} - AND CODE IN (#{code}) - - - -/* 코드 제거(codeMapper.removeCodes) */ -UPDATE TB_CMN_CODE SET - MDFCN_DT = - , MDFR = #{currentUser.id} - , USE_YN = 'N' - -AND GRP_ID IN (#{groupID}) -AND CODE IN (#{code}) - - - - \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/menu-mapper.xml b/src/main/resources/sql/mapper/base/menu-mapper.xml deleted file mode 100644 index 25627dc5..00000000 --- a/src/main/resources/sql/mapper/base/menu-mapper.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - -SELECT A.MENU_NO - , A.MENU_NM - , A.PRNT_NO - , A.PGRM_FILE_NM - , A.ACTION - , A.DSCRP - , A.IMG_NM - , A.IMG_CNF - , A.SRT_ORD - , A.REG_DT - , A.RGTR - FROM TB_MENU A -WHERE MENU_NO = #{menuID} - ORDER BY PRNT_NO, SRT_ORD, MENU_NO - - - - - - - -/* 메뉴 등록(menuMapper.insertMenu) */ - -SELECT NEW_NO, NEW_ORD - FROM (SELECT NVL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, - () B -INSERT INTO TB_MENU ( - MENU_NO - , MENU_NM - , PRNT_NO - , PGRM_FILE_NM - , ACTION - , DSCRP - , IMG_NM - , IMG_CNF - , SRT_ORD - , REG_DT - , RGTR -) VALUES ( - #{menu.id} - , #{menu.name} - , #{menu.parentID} - , #{menu.programFilename} - , #{menu.action} - , #{menu.description} - , #{menu.imageName} - , #{menu.imageConf} - , #{menu.sortOrder} - , - , #{currentUser.id} -) - - - -/* 메뉴 수정(menuMapper.updateMenu) */ -UPDATE TB_MENU SET - MENU_NM = #{menu.name} - , PGRM_FILE_NM = #{menu.programFilename} - , ACTION = #{menu.action} - , DSCRP = #{menu.description} - , IMG_NM = #{menu.imageName} - , IMG_CNF = #{menu.imageConf} -WHERE MENU_NO = #{menu.id} - - -SELECT NVL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = NVL(#{parentID}, NVL(#{menu.parentID}, 0)) - - - -/* 메뉴 이동(menuMapper.moveMenus) */ -UPDATE TB_MENU SET - PRNT_NO = #{parentID} - , SRT_ORD = SRT_ORD + () - WHERE MENU_NO IN (#{menuID}) - - - -/* 메뉴 순서 변경(menuMapper.reorderMenus) */ -UPDATE TB_MENU SET - SRT_ORD = CASE MENU_NO - WHEN #{menuID} THEN #{index} - - ELSE MENU_NO END - WHERE MENU_NO IN (#{menuID}) - - - -/* 메뉴 제거(menuMapper.removeMenus) */ -DELETE FROM TB_MENU - WHERE MENU_NO IN (#{menuID}) - - - \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/policy-mapper.xml b/src/main/resources/sql/mapper/base/policy-mapper.xml deleted file mode 100644 index c2ff4553..00000000 --- a/src/main/resources/sql/mapper/base/policy-mapper.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -/* 로그인 정책 등록(policyMapper.insertPolicy) */ -INSERT INTO TB_LOGIN_POLICY ( - USER_ID - , IP_ADRS - , DPLCT_YN - , LIMIT_YN - , REG_DT - , RGTR - , MDFCN_DT - , MDFR -) VALUES ( - #{policy.userID} - , #{policy.ipAddress} - , #{policy.duplicateYN} - , #{policy.limitYN} - , - , #{currentUser.id} - , - , #{currentUser.id} -) - - - -/* 로그인 정책 수정(policyMapper.updatePolicy) */ -UPDATE TB_LOGIN_POLICY SET - IP_ADRS = #{policy.ipAddress} - , DPLCT_YN = #{policy.duplicateYN} - , LIMIT_YN = #{policy.limitYN} - , MDFR = #{currentUser.id} - , MDFCN_DT = -WHERE USER_ID = #{policy.userID} - - - -/* 로그인 정책 삭제(policyMapper.removePolicy) */ -DELETE FROM TB_LOGIN_POLICY - WHERE USER_ID IN (#{userID}) - - - \ No newline at end of file