zioinfo-mail/workspace/zioinfo-esn/restapi_lgit/target/classes/mapper/menu-sql.xml
DESKTOP-TKLFCPR\ython 371f77e7ab
Some checks failed
GUARDiA CI / Python Lint & Import Test (push) Has been cancelled
GUARDiA CI / Validate Install Scripts (push) Has been cancelled
GUARDiA CI / PR Validation Summary (push) Has been cancelled
fix(enhance-v4): APK QR 버그 수정 + 웹메일 라우터 수정
2026-06-02 20:23:55 +09:00

93 lines
3.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.esl.restapi.mapper.MenuMapper" >
<select id="selectMenuConfigList" resultType="com.esl.restapi.model.MenuModel">
select menu_code, info, parent_code, depth, sort, url
, (select count(*) from g_menu_level where level_code = #{level_code} and menu_code = x.menu_code and deleted_ind = 'N') cnt
from (
select menu_code, info, menu_code parent_code, depth, sort, url
from g_menu
where depth = 1
and deleted_ind = 'N'
union all
select b.menu_code, b.info, b.parent_code, b.depth, b.sort, b.url
from g_menu a
inner join g_menu b
on b.parent_code = a.menu_code
where a.depth = 1
and b.depth = 2
and a.deleted_ind = 'N'
and b.deleted_ind = 'N'
) x
order by parent_code, depth, sort
</select>
<select id="selectMenuConfigListDevelop" resultType="com.esl.restapi.model.MenuModel">
select menu_code, info, parent_code, depth, sort, url
, (select count(*) from g_menu_level where menu_code = x.menu_code and deleted_ind = 'N') cnt
from (
select menu_code, info, menu_code parent_code, depth, sort, url
from g_menu
where depth = 1
and deleted_ind = 'N'
union all
select b.menu_code, b.info, b.parent_code, b.depth, b.sort, b.url
from g_menu a
inner join g_menu b
on b.parent_code = a.menu_code
where a.depth = 1
and b.depth = 2
and a.deleted_ind = 'N'
and b.deleted_ind = 'N'
) x
order by parent_code, depth, sort
</select>
<select id="selectMenuList" resultType="com.esl.restapi.model.MenuModel">
select a.menu_code, a.info, a.parent_code, a.depth, a.sort, a.url
from (
select menu_code, info, menu_code parent_code, depth, sort, url
from g_menu
where depth = 1
and deleted_ind = 'N'
union all
select b.menu_code, b.info, b.parent_code, b.depth, b.sort, b.url
from g_menu a
inner join g_menu b
on b.parent_code = a.menu_code
where a.depth = 1
and b.depth = 2
and a.deleted_ind = 'N'
and b.deleted_ind = 'N'
) a inner join g_menu_level b
on b.menu_code = a.menu_code
where b.level_code = #{level_code}
and b.deleted_ind = 'N'
order by a.parent_code, a.depth, a.sort
</select>
<select id="selectMenuListDevelop" resultType="com.esl.restapi.model.MenuModel">
select menu_code, info, menu_code parent_code, depth, sort, url
from g_menu
where
deleted_ind = 'N'
order by parent_code, depth, sort
</select>
<delete id="deleteMenuLevel">
delete from g_menu_level
where level_code = #{level_code}
</delete>
<insert id="insertMenuLevel" parameterType="java.util.Map">
insert into g_menu_level (
level_code
, menu_code
, created_date
, created_id
, deleted_ind
) values
<foreach item="item" collection="list" separator=", ">
(#{item.level_code}, #{item.menu_code}, datetime('now'), #{item.created_id}, 'N')
</foreach>
</insert>
</mapper>