|
|
|
@ -31,7 +31,7 @@ SELECT A.*
|
|
|
|
|
<insert id="insertMenu" parameterType="map">/* 메뉴 등록(menuMapper.insertMenu) */
|
|
|
|
|
<selectKey order="BEFORE" resultType="map" keyColumn="NEW_NO,NEW_ORD" keyProperty="menu.id,menu.sortOrder">
|
|
|
|
|
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,
|
|
|
|
|
(<include refid="newSortOrder" />) B</selectKey>
|
|
|
|
|
INSERT INTO TB_MENU (
|
|
|
|
|
MENU_NO
|
|
|
|
@ -69,7 +69,7 @@ UPDATE TB_MENU SET
|
|
|
|
|
, IMG_CNF = #{menu.imageConf}
|
|
|
|
|
WHERE MENU_NO = #{menu.id}</update>
|
|
|
|
|
|
|
|
|
|
<sql id="newSortOrder">SELECT IFNULL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = IFNULL(#{parentID}, IFNULL(#{menu.parentID}, 0))</sql>
|
|
|
|
|
<sql id="newSortOrder">SELECT NVL(MAX(SRT_ORD) + 1, 0) NEW_ORD FROM TB_MENU WHERE PRNT_NO = NVL(#{parentID}, NVL(#{menu.parentID}, 0))</sql>
|
|
|
|
|
|
|
|
|
|
<update id="moveMenus" parameterType="map">/* 메뉴 이동(menuMapper.moveMenus) */
|
|
|
|
|
UPDATE TB_MENU SET
|
|
|
|
|