From 1af0d1665c0581ddacece8079203a2f41f3f81f9 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 28 八月 2020 15:45:54 +0800
Subject: [PATCH] 数据权限判断对象类型
---
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 191f1cc..36c2aa5 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -64,7 +64,7 @@
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
select count(1) from sys_dept
- where del_flag = '0' and parent_id = #{deptId}
+ where del_flag = '0' and parent_id = #{deptId} limit 1
</select>
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
@@ -77,8 +77,7 @@
<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} limit 1
</select>
<insert id="insertDept" parameterType="SysDept">
--
Gitblit v1.9.2