first commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?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.mhd.user.domain.roleAggregate.repository.mapper.CustomAuthRoleMapper">
|
||||
|
||||
<sql id="selectRoleMenuVo">
|
||||
SELECT
|
||||
a.custom_auth_role_id,
|
||||
a.menu_id,
|
||||
a.role_id,
|
||||
a.table_json,
|
||||
a.form_json,
|
||||
a.button_json,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name
|
||||
FROM
|
||||
`custom_auth_role` a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="getCustomAuthByRoleOrUserId" parameterType="com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthRoleDO"
|
||||
resultType="com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO">
|
||||
<include refid="selectRoleMenuVo"/>
|
||||
<include refid="common_where"/>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getCustomAuthMenuByRoleOrUserId" parameterType="com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthRoleDO"
|
||||
resultType="com.mhd.user.domain.roleAggregate.repository.po.CustomAuthRoleOrUserPO">
|
||||
<include refid="selectRoleMenuVo"/>
|
||||
<include refid="common_where"/>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="deleteCustomAuthRoleByRoleId" parameterType="com.mhd.user.domain.roleAggregate.repository.todo.CustomAuthDO">
|
||||
DELETE
|
||||
FROM
|
||||
`custom_auth_role` a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"/>
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
|
||||
<if test="roleId !=null and roleId !='' ">
|
||||
and a.role_id = #{roleId}
|
||||
</if>
|
||||
<if test="menuId !=null and menuId !='' ">
|
||||
and a.menu_id = #{menuId}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user