From 53c90cfc99c30654fe857262100720d2ef719a08 Mon Sep 17 00:00:00 2001
From: xlt <xialuotang@xialuotang.com>
Date: 星期日, 27 三月 2022 21:57:44 +0800
Subject: [PATCH] update 在全局异常处理器中引入DuplicateKeyException的主键冲突异常,来处理解决主键或UNIQUE索引的数据重复异常。

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

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 3117788..d4fd23f 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -121,6 +121,11 @@
         where u.del_flag = '0' and u.user_name = #{userName}
     </select>
 
+    <select id="selectUserByPhonenumber" parameterType="String" resultMap="SysUserResult">
+        <include refid="selectUserVo"/>
+        where u.del_flag = '0' and u.phonenumber = #{phonenumber}
+    </select>
+
     <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
         <include refid="selectUserVo"/>
         where u.del_flag = '0' and u.user_id = #{userId}

--
Gitblit v1.9.3