From 743fce78290f0b359d3d99b79a6c9c0a2a5a0dee Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 04 八月 2020 11:07:37 +0800
Subject: [PATCH] 优化防重提交唯一标识

---
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index d78d7da..9da14d8 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -77,7 +77,7 @@
 	
 	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
 	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName} and parent_id = #{parentId}
+		where dept_name=#{deptName} and parent_id = #{parentId} limit 1
 	</select>
     
     <insert id="insertDept" parameterType="SysDept">

--
Gitblit v1.9.2