94 lines
3.1 KiB
XML
94 lines
3.1 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.dbnt.faisp.main.menuMgt.mapper.MenuMgtMapper">
|
|
<sql id="selectMenuMgtListWhere">
|
|
<where>
|
|
<if test='useChk == "T"'>
|
|
and use_chk = 'T'
|
|
</if>
|
|
<if test='useChk == "F"'>
|
|
and (use_chk is null or use_chk = '')
|
|
</if>
|
|
<if test='cat1Cd != null and cat1Cd != ""'>
|
|
and cat1_cd = #{cat1Cd}
|
|
</if>
|
|
<if test='cat1Cd != null and cat1Cd != ""'>
|
|
and cat1_cd = #{cat1Cd}
|
|
</if>
|
|
<if test='cat2Cd != null and cat2Cd != ""'>
|
|
and cat2_cd = #{cat2Cd}
|
|
</if>
|
|
<if test='cat3Cd != null and cat3Cd != ""'>
|
|
and cat3_cd = #{cat3Cd}
|
|
</if>
|
|
<if test='menuUrl != null and menuUrl != ""'>
|
|
and menu_url like '%'||#{menuUrl}||'%'
|
|
</if>
|
|
</where>
|
|
</sql>
|
|
<select id="selectMenuMgtList" resultType="MenuMgt" parameterType="MenuMgt">
|
|
select menu_key as menuKey,
|
|
cat1_cd as cat1Cd,
|
|
cat2_cd as cat2Cd,
|
|
cat3_cd as cat3Cd,
|
|
order_str as orderStr,
|
|
menu_url as menuUrl,
|
|
approval_chk as approvalChk,
|
|
deadline_chk as deadlineChk,
|
|
use_chk as useChk
|
|
from menu_mgt
|
|
<include refid="selectMenuMgtListWhere"></include>
|
|
order by order_str, cat1_cd, cat2_cd, cat3_cd
|
|
limit #{rowCnt} offset #{firstIndex}
|
|
</select>
|
|
<select id="selectMenuMgtListCnt" resultType="int" parameterType="MenuMgt">
|
|
select count(*)
|
|
from menu_mgt
|
|
<include refid="selectMenuMgtListWhere"></include>
|
|
</select>
|
|
|
|
<select id="selectAccessMenuListWhereUserSeq" resultType="MenuMgt" parameterType="int">
|
|
select ab.menu_key,
|
|
ab.cat1_cd,
|
|
ab.cat2_cd,
|
|
ab.cat3_cd,
|
|
ab.order_str,
|
|
ab.menu_url,
|
|
aa.access_auth
|
|
from access_config aa
|
|
inner join menu_mgt ab on aa.menu_key = ab.menu_key
|
|
where aa.user_seq = #{userSeq}
|
|
and aa.access_auth is not null
|
|
and aa.access_auth <> ''
|
|
order by order_str, cat1_cd, cat2_cd, cat3_cd
|
|
</select>
|
|
|
|
<select id="selectMenuMgtListToAccessAuth" resultType="MenuMgt" parameterType="MenuMgt">
|
|
select ab.menu_key,
|
|
ab.cat1_cd,
|
|
ab.cat2_cd,
|
|
ab.cat3_cd,
|
|
ab.menu_url
|
|
from access_config aa
|
|
inner join menu_mgt ab on aa.menu_key = ab.menu_key
|
|
where aa.user_seq = #{userSeq}
|
|
and aa.access_auth is not null
|
|
and aa.access_auth <> ''
|
|
<include refid="selectMenuMgtListWhere"></include>
|
|
order by order_str, cat1_cd, cat2_cd, cat3_cd
|
|
limit #{rowCnt} offset #{firstIndex}
|
|
</select>
|
|
|
|
<select id="selectMenuMgtListToAccessAuthCnt" resultType="int" parameterType="MenuMgt">
|
|
select count(*)
|
|
from access_config aa
|
|
inner join menu_mgt ab on aa.menu_key = ab.menu_key
|
|
where aa.user_seq = #{userSeq}
|
|
and aa.access_auth is not null
|
|
and aa.access_auth <> ''
|
|
<include refid="selectMenuMgtListWhere"></include>
|
|
</select>
|
|
</mapper> |