From d5021daf7a82e9c2f1fd1b7657b2e4cd2bbf4ebe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=B8=E4=B8=8D=E6=9C=83?= <809896114@qq.com>
Date: Fri, 2 Jul 2021 09:31:04 +0000
Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E9=83=A8=E9=97=A8=E5=90=8D?=
 =?UTF-8?q?=E7=A7=B0=E5=94=AF=E4=B8=80=E6=97=B6=EF=BC=8C=E8=BF=87=E6=BB=A4?=
 =?UTF-8?q?=E6=8E=89=E5=B7=B2=E5=88=A0=E9=99=A4=E7=9A=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 67ce43471..edca305bc 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
 	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName} and parent_id = #{parentId} limit 1
+		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
 	</select>
     
     <insert id="insertDept" parameterType="SysDept">