fix:修复Bug

This commit is contained in:
嘉多宝宝 2026-01-23 15:29:04 +08:00
parent cace0eb2f5
commit b386ef9106

View File

@ -140,6 +140,13 @@ public class AdminUserServiceImpl implements AdminUserService {
AssertUtils.notNull(adminUserEntity,ResultCodeEnum.USER_NOT_FOUND);
UserEntity userEntity = AdminUserConvert.INSTANCE.convertOne(params);
// 如果密码不为空则修改密码
if (params.getPassword() != null && !params.getPassword().isEmpty()) {
String password = CommonUtils.encryptPassword(params.getPassword());
userEntity.setPassword(password);
} else {
userEntity.setPassword(adminUserEntity.getPassword());
}
userEntity.setId(id);
userService.updateById(userEntity);
}