From 9feb0f92711c426ca024ec2000e3fac15eff120b Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 10 六月 2021 13:06:06 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml
old mode 100644
new mode 100755
index 70b540d..99ccbff
--- a/java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml
@@ -103,12 +103,20 @@
         t.belong_community_id ,t.belong_community_id belongCommunityId,
         t.allow_operation ,t.allow_operation allowOperation
         from u_org t,t_dict td,u_org uo
+        <if test="staffId != null and staffId !=''">
+            ,u_org_staff_rel uosr
+        </if>
         where 1 =1
         and t.org_level = td.status_cd
         and td.table_name='u_org'
         and td.table_columns = 'org_level'
         and t.parent_org_id = uo.org_id
         and uo.status_cd = '0'
+        <if test="staffId != null and staffId !=''">
+            and uosr.org_id = t.org_id
+            and uosr.staff_id = #{staffId}
+            and uosr.status_cd = '0'
+        </if>
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>
@@ -187,12 +195,20 @@
     <select id="queryOrgsCount" parameterType="Map" resultType="Map">
         select count(1) count
         from u_org t,t_dict td,u_org uo
+        <if test="staffId != null and staffId !=''">
+            ,u_org_staff_rel uosr
+        </if>
         where 1 =1
         and t.org_level = td.status_cd
         and td.table_name='u_org'
         and td.table_columns = 'org_level'
         and t.parent_org_id = uo.org_id
         and uo.status_cd = '0'
+        <if test="staffId != null and staffId !=''">
+            and uosr.org_id = t.org_id
+            and uosr.staff_id = #{staffId}
+            and uosr.status_cd = '0'
+        </if>
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>
@@ -223,6 +239,9 @@
         <if test="allowOperation !=null and allowOperation != ''">
             and t.allow_operation= #{allowOperation}
         </if>
+        <if test="orgId !=null and orgId != ''">
+            and t.org_id= #{orgId}
+        </if>
 
     </select>
     <!-- 鏌ヨ涓婄骇缁勭粐淇℃伅 -->

--
Gitblit v1.8.0