From 21780d81067e48a1e13cd52520392290e025a95b Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 13 Feb 2022 21:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/utils/file/FileUploadUtils.java | 5 +---- .../main/java/com/ruoyi/common/utils/file/ImageUtils.java | 3 --- .../main/java/com/ruoyi/system/mapper/SysUserMapper.java | 2 +- .../com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 2 +- .../src/main/resources/mapper/system/SysMenuMapper.xml | 8 ++++---- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index eba9b1af..1a89dd9c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -121,10 +121,7 @@ public class FileUploadUtils */ public static final String extractFilename(MultipartFile file) { - String fileName = file.getOriginalFilename(); - String extension = getExtension(file); - fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension; - return fileName; + return DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + getExtension(file); } public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java index 485cdd25..9687bf3b 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java @@ -1,7 +1,6 @@ package com.ruoyi.common.utils.file; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.InputStream; import java.net.URL; @@ -65,7 +64,6 @@ public class ImageUtils public static byte[] readFile(String url) { InputStream in = null; - ByteArrayOutputStream baos = null; try { if (url.startsWith("http")) @@ -95,7 +93,6 @@ public class ImageUtils finally { IOUtils.closeQuietly(in); - IOUtils.closeQuietly(baos); } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java index 9190c9e3..28713f6e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java @@ -20,7 +20,7 @@ public interface SysUserMapper public List selectUserList(SysUser sysUser); /** - * 根据条件分页查询未已配用户角色列表 + * 根据条件分页查询已配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index 68dd15dd..6ade2680 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -404,7 +404,7 @@ public class SysRoleServiceImpl implements ISysRoleService * 批量选择授权用户角色 * * @param roleId 角色ID - * @param userIds 需要删除的用户数据ID + * @param userIds 需要授权的用户数据ID * @return 结果 */ @Override diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 144adb1b..fd5f6a31 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -28,7 +28,7 @@ - select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time + select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time from sys_menu @@ -49,13 +49,13 @@