diff --git a/src/main/resources/sql/mapper/menu-mapper.xml b/src/main/resources/sql/mapper/menu-mapper.xml index 2856c0b..599e194 100644 --- a/src/main/resources/sql/mapper/menu-mapper.xml +++ b/src/main/resources/sql/mapper/menu-mapper.xml @@ -31,7 +31,7 @@ SELECT A.* /* 메뉴 등록(menuMapper.insertMenu) */ SELECT NEW_NO, NEW_ORD - FROM (SELECT IFNULL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, + FROM (SELECT NVL(MAX(MENU_NO) + 1, 0) NEW_NO FROM TB_MENU) A, () B INSERT INTO TB_MENU ( MENU_NO @@ -69,7 +69,7 @@ UPDATE TB_MENU SET , IMG_CNF = #{menu.imageConf} WHERE MENU_NO = #{menu.id} -SELECT IFNULL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = IFNULL(#{parentID}, IFNULL(#{menu.parentID}, 0)) +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