serv\web- 日志
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
|
||||
<resultMap id="PermissionVO" type="org.xyzh.common.vo.PermissionVO">
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="module_id" property="moduleID" jdbcType="VARCHAR"/>
|
||||
<result column="module_name" property="moduleName" jdbcType="VARCHAR"/>
|
||||
<result column="module_description" property="moduleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="permission_id" property="permissionID" jdbcType="VARCHAR"/>
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="code" property="code" jdbcType="VARCHAR"/>
|
||||
@@ -47,6 +50,26 @@
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 权限绑定菜单VO结果映射 -->
|
||||
<resultMap id="PermissionBindMenuVO" type="org.xyzh.common.vo.PermissionVO">
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="menu_id" property="menuID" jdbcType="VARCHAR"/>
|
||||
<result column="menu_name" property="menuName" jdbcType="VARCHAR"/>
|
||||
<result column="menu_url" property="menuUrl" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 权限绑定角色VO结果映射 -->
|
||||
<resultMap id="PermissionBindRoleVO" type="org.xyzh.common.vo.PermissionVO">
|
||||
<id column="id" property="id" jdbcType="VARCHAR"/>
|
||||
<result column="role_id" property="roleID" jdbcType="VARCHAR"/>
|
||||
<result column="role_name" property="roleName" jdbcType="VARCHAR"/>
|
||||
<result column="role_description" property="roleDescription" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR"/>
|
||||
<result column="updater" property="updater" jdbcType="VARCHAR"/>
|
||||
<result column="updater_name" property="updaterName" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, permission_id, name, code, description, module_id, creator, updater,
|
||||
@@ -226,13 +249,15 @@
|
||||
|
||||
<select id="selectPermissionList" resultMap="PermissionVO" >
|
||||
SELECT
|
||||
tsp.id, tsp.permission_id, tsp.name, tsp.code, tsp.description,
|
||||
tsp.id, tsp.module_id, tsp.permission_id, tsp.name, tsp.code, tsp.description,
|
||||
tsp.creator, tsp.updater,
|
||||
tsu.username as creator_name, tuu.username as updater_name,
|
||||
m.name as module_name, m.description as module_description,
|
||||
tsp.create_time, tsp.update_time, tsp.delete_time, tsp.deleted
|
||||
FROM tb_sys_permission tsp
|
||||
INNER JOIN tb_sys_user tsu ON tsp.creator = tsu.id
|
||||
LEFT JOIN tb_sys_user tuu ON tsp.updater = tuu.id
|
||||
LEFT JOIN tb_sys_module m ON tsp.module_id = m.module_id AND m.deleted = 0
|
||||
WHERE tsp.deleted = 0
|
||||
<if test="permission.name != null and permission.name != ''">
|
||||
AND tsp.name LIKE CONCAT('%', #{permission.name}, '%')
|
||||
@@ -247,13 +272,15 @@
|
||||
|
||||
<select id="selectPermissionVO" resultMap="PermissionVO" >
|
||||
SELECT
|
||||
tsp.id, tsp.permission_id, tsp.name, tsp.code, tsp.description,
|
||||
tsp.id, tsp.module_id, tsp.permission_id, tsp.name, tsp.code, tsp.description,
|
||||
tsp.creator, tsp.updater,
|
||||
tsu.username as creator_name, tuu.username as updater_name,
|
||||
m.name as module_name, m.description as module_description,
|
||||
tsp.create_time, tsp.update_time, tsp.delete_time, tsp.deleted
|
||||
FROM tb_sys_permission tsp
|
||||
INNER JOIN tb_sys_user tsu ON tsp.creator = tsu.id
|
||||
LEFT JOIN tb_sys_user tuu ON tsp.updater = tuu.id
|
||||
LEFT JOIN tb_sys_module m ON tsp.module_id = m.module_id AND m.deleted = 0
|
||||
WHERE tsp.deleted = 0
|
||||
<if test="permission.name != null and permission.name != ''">
|
||||
AND tsp.name LIKE CONCAT('%', #{permission.name}, '%')
|
||||
@@ -269,9 +296,12 @@
|
||||
|
||||
<!-- selectPermissionBindMenu -->
|
||||
|
||||
<select id="selectPermissionBindMenu" resultMap="PermissionBindMenu">
|
||||
<select id="selectPermissionBindMenu" resultMap="PermissionBindMenuVO">
|
||||
SELECT
|
||||
tsm.id, tsm.menu_id, tsm.name
|
||||
tsm.id,
|
||||
tsm.menu_id,
|
||||
tsm.name AS menu_name,
|
||||
tsm.url AS menu_url
|
||||
FROM tb_sys_menu tsm
|
||||
INNER JOIN tb_sys_menu_permission tsmp ON tsmp.menu_id = tsm.menu_id
|
||||
WHERE tsm.deleted = 0
|
||||
@@ -281,11 +311,20 @@
|
||||
</select>
|
||||
|
||||
<!-- selectPermissionBindRole -->
|
||||
<select id="selectPermissionBindRole" resultMap="PermissionBindRole">
|
||||
<select id="selectPermissionBindRole" resultMap="PermissionBindRoleVO">
|
||||
SELECT
|
||||
tsr.id, tsr.role_id, tsr.name, tsr.description
|
||||
tsr.id,
|
||||
tsr.role_id,
|
||||
tsr.name AS role_name,
|
||||
tsr.description AS role_description,
|
||||
tsr.creator,
|
||||
cu.username AS creator_name,
|
||||
tsr.updater,
|
||||
uu.username AS updater_name
|
||||
FROM tb_sys_role tsr
|
||||
INNER JOIN tb_sys_role_permission tsrp ON tsrp.role_id = tsr.role_id
|
||||
LEFT JOIN tb_sys_user cu ON tsr.creator = cu.id AND cu.deleted = 0
|
||||
LEFT JOIN tb_sys_user uu ON tsr.updater = uu.id AND uu.deleted = 0
|
||||
WHERE tsr.deleted = 0
|
||||
AND tsrp.deleted = 0
|
||||
AND tsrp.permission_id = #{permission.permissionID}
|
||||
|
||||
Reference in New Issue
Block a user