From 474aabc5d2b4d6ccdd0d141ed06be87eb7559939 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Tue, 16 Jun 2026 10:22:51 +0800
Subject: [PATCH] feat(user): 添加用户注册时不设置密码的功能
---
drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml b/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml
index 12b7415..0a8129c 100644
--- a/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml
+++ b/drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml
@@ -46,16 +46,16 @@
and u.tenant_id = #{user.tenantId}
</if>
<if test="user.account!=null and user.account != ''">
- and u.account = #{user.account}
+ and u.account like CONCAT('%', #{user.account}, '%')
</if>
<if test="user.realName!=null and user.realName != ''">
- and u.real_name = #{user.realName}
+ and u.real_name like CONCAT('%', #{user.realName}, '%')
</if>
<if test="user.userType!=null and user.userType != ''">
and u.user_type = #{user.userType}
</if>
<if test="user.sysType!=null and user.sysType != ''">
- and r.sys_type = #{user.sysType}
+ and (u.sys_type = #{user.sysType} or u.sys_type = '0')
</if>
<if test="deptIdList!=null and deptIdList.size>0">
and u.id in (
@@ -71,7 +71,7 @@
)
</if>
GROUP BY u.id
- ORDER BY u.id
+ ORDER BY u.create_time DESC
</select>
<select id="getUser" resultMap="userResultMap">
@@ -97,4 +97,12 @@
</foreach>
</update>
+ <!-- 根据部门ID查询用户列表 -->
+ <select id="selectUsersByDeptId" resultMap="userResultMap">
+ SELECT *
+ FROM blade_user
+ WHERE dept_id = #{deptId}
+ AND is_deleted = 0
+ </select>
+
</mapper>
--
Gitblit v1.9.3