<?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.vci.ubcs.system.mapper.ClassifyAuthMapper">
|
<resultMap id="classifyAuthMap" type="com.vci.ubcs.system.entity.ClassifyAuth">
|
<result column="oid" property="oid"/>
|
<result column="ROLE_ID" property="roleId"/>
|
<result column="CLASSIFY_ID" property="classifyId"/>
|
<result column="BUTTON_IDS" property="buttonIds"/>
|
</resultMap>
|
|
<select id="getClassifyAuthList" resultMap="classifyAuthMap">
|
SELECT *
|
FROM PL_ORG_CLASSIFYAUTH
|
WHERE CLASSIFY_ID = #{classifyId};
|
</select>
|
|
|
<select id="getViewClassByRoleIds" resultType="java.lang.String">
|
SELECT CLASSIFY_ID
|
FROM PL_ORG_CLASSIFYAUTH
|
WHERE
|
<if test="roleIds != null and ! roleIds.isEmpty() and roleIds.size() > 0">
|
ROLE_ID IN
|
<foreach item="item" index="index" collection="roleIds" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
AND AUTH_TYPE = #{authType}
|
AND BUTTON_IDS LIKE CONCAT('%', CONCAT((SELECT ID
|
FROM PL_SYS_MENU
|
WHERE CODE = #{menuCode}), '%'))
|
</select>
|
|
|
</mapper>
|