From 948c2fda5f6fcd84da03ff7110c24e594434a1ac Mon Sep 17 00:00:00 2001 From: zhouz <> Date: Mon, 19 Aug 2024 17:52:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=A8=E6=88=B7=E7=9B=B8=E5=85=B3BUG?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/nl/common/constants/GeneralDefinition.java | 2 +- .../nl/system/service/user/dao/mapper/SysUserMapper.xml | 9 +++------ .../nl/system/service/user/impl/ISysUserServiceImpl.java | 4 +++- lms/nladmin-ui/src/views/system/user/index.vue | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lms/nladmin-system/src/main/java/org/nl/common/constants/GeneralDefinition.java b/lms/nladmin-system/src/main/java/org/nl/common/constants/GeneralDefinition.java index 15d0f3bab..23034a43f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/common/constants/GeneralDefinition.java +++ b/lms/nladmin-system/src/main/java/org/nl/common/constants/GeneralDefinition.java @@ -9,7 +9,7 @@ public class GeneralDefinition { /** * 默认密码 */ - public static final String DEFAULT_PASSWORD = "123456"; + public static final String DEFAULT_PASSWORD = "HL123456"; /** * 盐值加密 */ diff --git a/lms/nladmin-system/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml b/lms/nladmin-system/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml index d9a382ff0..413442aef 100644 --- a/lms/nladmin-system/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml +++ b/lms/nladmin-system/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml @@ -2,10 +2,7 @@ - sys_user - . - user_id - as userId, + sys_user.user_id as userId, sys_user.username as username, sys_user.person_name as personName, sys_user.gender, @@ -86,13 +83,13 @@ and sys_user.is_used = #{query.is_used} - and and sys_user.create_time >= #{query.startTime} + and sys_user.create_time >= #{query.startTime} and #{query.end_time} >= sys_user.create_time - and (email like #{query.blurry} or username like #{query.blurry} or person_name like #{query.blurry}) + and (email like #{query.blurry} or username like concat('%',#{query.blurry},'%') or person_name like concat('%',#{query.blurry},'%')) diff --git a/lms/nladmin-system/src/main/java/org/nl/system/service/user/impl/ISysUserServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/system/service/user/impl/ISysUserServiceImpl.java index 56467942e..42229287e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/system/service/user/impl/ISysUserServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/system/service/user/impl/ISysUserServiceImpl.java @@ -125,7 +125,9 @@ public class ISysUserServiceImpl extends ServiceImpl imp } catch (Exception ex) { throw new RuntimeException(); } - sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), GeneralDefinition.SALT)); + if (ObjectUtil.isNotEmpty(sysUser.getPassword())) { + sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), GeneralDefinition.SALT)); + } sysUser.setUpdate_time(new Date()); sysUser.setUpdate_id(SecurityUtils.getCurrentUserId()); this.updateById(sysUser); diff --git a/lms/nladmin-ui/src/views/system/user/index.vue b/lms/nladmin-ui/src/views/system/user/index.vue index 0fde38f96..aa6e718d2 100644 --- a/lms/nladmin-ui/src/views/system/user/index.vue +++ b/lms/nladmin-ui/src/views/system/user/index.vue @@ -91,7 +91,7 @@ />
- + @@ -372,8 +372,8 @@ export default { del: ['admin', 'user:del'] }, enabledTypeOptions: [ - { key: true, display_name: '激活' }, - { key: false, display_name: '锁定' } + { key: '1', display_name: '激活' }, + { key: '0', display_name: '锁定' } ], rules: { username: [