From 61db25e82f9f6d635883cf55dbbe2dd39d692ff0 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 05 Aug 2021 14:16:56 +0800
Subject: [PATCH] 考试题目新增接口修改

---
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index 68defdc..e007344 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -172,10 +172,14 @@
         FROM
         blade_dept
         WHERE
-        parent_id = dept.id and is_deleted = 0
+        parent_id = dept.id and dept.is_deleted = 0
         ) AS "has_children"
         FROM
         blade_dept dept
+        left join
+        blade_user bu
+        on
+        bu.dept_id = dept.id
         WHERE
         dept.is_deleted = 0
         <if test="type==1">
@@ -185,6 +189,11 @@
         <if test="type==2 or type==3">
             and dept_category=2
             AND dept.parent_id = "1123598813738675201"
+        </if>
+        <if test="type==4 and jurisdiction!=null and jurisdiction!=''">
+            and dept_category=1
+            AND dept.parent_id = "1413470343230877697"
+            and bu.jurisdiction = #{jurisdiction}
         </if>
         )
 
@@ -209,6 +218,10 @@
         <if test="type==2 or type==3">
             and dept_category=2
         </if>
+        <if test="type==4 and jurisdiction!=null and jurisdiction!=''">
+            and dept_category=1
+            and bu.jurisdiction = #{jurisdiction}
+        </if>
         )
         )c
     </select>

--
Gitblit v1.9.3