From 0abeea2e7d2f2faec76e667b0b73ddecea85f561 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期五, 25 十二月 2020 09:19:26 +0800
Subject: [PATCH] 优化门禁设备显示问题
---
java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml b/java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml
index df012b2..21897e0 100644
--- a/java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/center/PrivilegeDAOImplMapper.xml
@@ -170,18 +170,22 @@
</update>
<select id="queryPrivilegeUsers" parameterType="map" resultType="map">
- select t.user_id userId from p_privilege_user t
+ select t.user_id userId
+ from p_privilege_user t
+ INNER JOIN p_privilege p on t.p_id = p.p_id and p.status_cd = '0'
where t.privilege_flag = '0'
and t.status_cd = '0'
- and t.p_id = #{pId}
+ and p.resource = #{resource}
and t.store_id = #{storeId}
union ALL
- select t.user_id userId from p_privilege_user t
+ select t.user_id userId
+ from p_privilege_user t
inner join p_privilege_group pg on t.p_id = pg.pg_id and pg.status_cd = '0' and pg.pg_id != '600201904002'
inner join p_privilege_rel pr on pg.pg_id = pr.pg_id and pr.status_cd ='0'
+ INNER JOIN p_privilege p on pr.p_id = p.p_id and p.status_cd = '0'
where t.status_cd = '0'
and t.privilege_flag = '1'
- and pr.p_id = #{pId}
+ and p.resource = #{resource}
and t.store_id = #{storeId}
</select>
--
Gitblit v1.8.0