From 0086cc9f534c0ba4733dee74adf44f72118ccf55 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 12 Feb 2022 21:23:07 +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 --- .../main/resources/static/ruoyi/js/ry-ui.js | 2 +- .../com/ruoyi/common/utils/AddressUtils.java | 3 +-- .../java/com/ruoyi/common/utils/DictUtils.java | 7 +++---- .../com/ruoyi/common/utils/ExceptionUtil.java | 3 +-- .../com/ruoyi/common/utils/ServletUtils.java | 10 +++------- .../common/utils/file/FileUploadUtils.java | 18 +++++++----------- .../ruoyi/common/utils/file/ImageUtils.java | 2 +- .../com/ruoyi/common/utils/http/HttpUtils.java | 10 +++++----- .../com/ruoyi/common/utils/poi/ExcelUtil.java | 4 ++-- .../ruoyi/common/utils/security/Md5Utils.java | 3 ++- .../com/ruoyi/common/utils/sql/SqlUtil.java | 4 ++-- .../com/ruoyi/generator/util/GenUtils.java | 8 +++----- .../ruoyi/generator/util/VelocityUtils.java | 13 ++++++------- .../com/ruoyi/system/mapper/SysUserMapper.java | 2 +- .../system/service/ISysConfigService.java | 1 - .../system/service/ISysDictDataService.java | 1 - .../system/service/ISysDictTypeService.java | 2 -- .../system/service/ISysLogininforService.java | 2 +- .../ruoyi/system/service/ISysPostService.java | 3 +-- .../service/impl/SysConfigServiceImpl.java | 1 - .../service/impl/SysDictDataServiceImpl.java | 1 - .../service/impl/SysDictTypeServiceImpl.java | 1 - .../service/impl/SysLogininforServiceImpl.java | 2 +- .../service/impl/SysMenuServiceImpl.java | 2 +- .../service/impl/SysPostServiceImpl.java | 2 +- .../service/impl/SysRoleServiceImpl.java | 2 +- 26 files changed, 44 insertions(+), 65 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 50ce20d6f..a9660b7c2 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -1313,7 +1313,7 @@ var table = { }, // 校验封装处理 validate: { - // 判断返回标识是否唯一 false 不存在 true 存在 + // 判断返回标识是否唯一 false 为存在 true 为不存在 unique: function (value) { if (value == "0") { return true; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/AddressUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/AddressUtils.java index 913ebb176..a259975ba 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/AddressUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/AddressUtils.java @@ -24,7 +24,6 @@ public class AddressUtils public static String getRealAddressByIP(String ip) { - String address = UNKNOWN; // 内网不查询 if (IpUtils.internalIp(ip)) { @@ -50,6 +49,6 @@ public class AddressUtils log.error("获取地理位置异常 {}", e); } } - return address; + return UNKNOWN; } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java index 4ba08dc15..ffe018f25 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java @@ -40,8 +40,7 @@ public class DictUtils Object cacheObj = CacheUtils.get(getCacheName(), getCacheKey(key)); if (StringUtils.isNotNull(cacheObj)) { - List DictDatas = StringUtils.cast(cacheObj); - return DictDatas; + return StringUtils.cast(cacheObj); } return null; } @@ -91,7 +90,7 @@ public class DictUtils { if (value.equals(dict.getDictValue())) { - propertyString.append(dict.getDictLabel() + separator); + propertyString.append(dict.getDictLabel()).append(separator); break; } } @@ -131,7 +130,7 @@ public class DictUtils { if (label.equals(dict.getDictLabel())) { - propertyString.append(dict.getDictValue() + separator); + propertyString.append(dict.getDictValue()).append(separator); break; } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java index f35aa0468..50b10fe89 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java @@ -18,8 +18,7 @@ public class ExceptionUtil { StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw, true)); - String str = sw.toString(); - return str; + return sw.toString(); } public static String getRootErrorMessage(Exception e) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java index b122fe93e..cc246e3f8 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java @@ -129,13 +129,13 @@ public class ServletUtils public static boolean isAjaxRequest(HttpServletRequest request) { String accept = request.getHeader("accept"); - if (accept != null && accept.indexOf("application/json") != -1) + if (accept != null && accept.contains("application/json")) { return true; } String xRequestedWith = request.getHeader("X-Requested-With"); - if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) + if (xRequestedWith != null && xRequestedWith.contains("XMLHttpRequest")) { return true; } @@ -147,11 +147,7 @@ public class ServletUtils } String ajax = request.getParameter("__ajax"); - if (StringUtils.inStringIgnoreCase(ajax, "json", "xml")) - { - return true; - } - return false; + return StringUtils.inStringIgnoreCase(ajax, "json", "xml"); } /** 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 41111ebfb..837905d1c 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 @@ -2,6 +2,7 @@ package com.ruoyi.common.utils.file; import java.io.File; import java.io.IOException; +import java.util.Objects; import org.apache.commons.io.FilenameUtils; import org.springframework.web.multipart.MultipartFile; import com.ruoyi.common.config.RuoYiConfig; @@ -100,7 +101,7 @@ public class FileUploadUtils throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, InvalidExtensionException { - int fileNamelength = file.getOriginalFilename().length(); + int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length(); if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); @@ -112,8 +113,7 @@ public class FileUploadUtils File desc = getAbsoluteFile(baseDir, fileName); file.transferTo(desc); - String pathFileName = getPathFileName(baseDir, fileName); - return pathFileName; + return getPathFileName(baseDir, fileName); } /** @@ -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 @@ -145,8 +142,7 @@ public class FileUploadUtils { int dirLastIndex = RuoYiConfig.getProfile().length() + 1; String currentDir = StringUtils.substring(uploadDir, dirLastIndex); - String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; - return pathFileName; + return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; } /** @@ -161,7 +157,7 @@ public class FileUploadUtils throws FileSizeLimitExceededException, InvalidExtensionException { long size = file.getSize(); - if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) + if (size > DEFAULT_MAX_SIZE) { throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); } @@ -227,7 +223,7 @@ public class FileUploadUtils String extension = FilenameUtils.getExtension(file.getOriginalFilename()); if (StringUtils.isEmpty(extension)) { - extension = MimeTypeUtils.getExtension(file.getContentType()); + extension = MimeTypeUtils.getExtension(Objects.requireNonNull(file.getContentType())); } return extension; } 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 3dfc9bbce..485cdd25e 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 @@ -59,7 +59,7 @@ public class ImageUtils /** * 读取文件为字节数据 * - * @param key 地址 + * @param url 地址 * @return 字节数据 */ public static byte[] readFile(String url) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java index 9cc166c3a..1fdb68c67 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java @@ -9,6 +9,7 @@ import java.net.ConnectException; import java.net.SocketTimeoutException; import java.net.URL; import java.net.URLConnection; +import java.nio.charset.StandardCharsets; import java.security.cert.X509Certificate; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; @@ -130,9 +131,8 @@ public class HttpUtils StringBuilder result = new StringBuilder(); try { - String urlNameString = url; - log.info("sendPost - {}", urlNameString); - URL realUrl = new URL(urlNameString); + log.info("sendPost - {}", url); + URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); @@ -144,7 +144,7 @@ public class HttpUtils out = new PrintWriter(conn.getOutputStream()); out.print(param); out.flush(); - in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); + in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); String line; while ((line = in.readLine()) != null) { @@ -218,7 +218,7 @@ public class HttpUtils { if (ret != null && !ret.trim().equals("")) { - result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); + result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); } } log.info("recv - {}", result); diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 8c4428fd6..6cca32312 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -1119,7 +1119,7 @@ public class ExcelUtil if (StringUtils.isNotEmpty(excel.targetAttr())) { String target = excel.targetAttr(); - if (target.indexOf(".") > -1) + if (target.contains(".")) { String[] targets = target.split("[.]"); for (String name : targets) @@ -1214,7 +1214,7 @@ public class ExcelUtil for (Object[] os : this.fields) { Excel excel = (Excel) os[1]; - maxHeight = maxHeight > excel.height() ? maxHeight : excel.height(); + maxHeight = Math.max(maxHeight, excel.height()); } return (short) (maxHeight * 20); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/security/Md5Utils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/security/Md5Utils.java index 40e80304a..502eb0fd9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/security/Md5Utils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/security/Md5Utils.java @@ -1,5 +1,6 @@ package com.ruoyi.common.utils.security; +import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +56,7 @@ public class Md5Utils { try { - return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); + return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8); } catch (Exception e) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java index 1591c46d3..246a9cfc8 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java @@ -50,9 +50,9 @@ public class SqlUtil return; } String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|"); - for (int i = 0; i < sqlKeywords.length; i++) + for (String sqlKeyword : sqlKeywords) { - if (StringUtils.indexOfIgnoreCase(value, sqlKeywords[i]) > -1) + if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1) { throw new UtilException("参数存在SQL注入风险"); } diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java index 10774ec8a..6e242fe99 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java @@ -146,8 +146,7 @@ public class GenUtils { int lastIndex = packageName.lastIndexOf("."); int nameLength = packageName.length(); - String moduleName = StringUtils.substring(packageName, lastIndex + 1, nameLength); - return moduleName; + return StringUtils.substring(packageName, lastIndex + 1, nameLength); } /** @@ -160,8 +159,7 @@ public class GenUtils { int lastIndex = tableName.lastIndexOf("_"); int nameLength = tableName.length(); - String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength); - return businessName; + return StringUtils.substring(tableName, lastIndex + 1, nameLength); } /** @@ -250,4 +248,4 @@ public class GenUtils return 0; } } -} \ No newline at end of file +} diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java index 55a31f275..2698e0b9f 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java @@ -249,8 +249,7 @@ public class VelocityUtils public static String getPackagePrefix(String packageName) { int lastIndex = packageName.lastIndexOf("."); - String basePackage = StringUtils.substring(packageName, 0, lastIndex); - return basePackage; + return StringUtils.substring(packageName, 0, lastIndex); } /** @@ -298,7 +297,7 @@ public class VelocityUtils /** * 获取上级菜单ID字段 * - * @param options 生成其他选项 + * @param paramsObj 生成其他选项 * @return 上级菜单ID字段 */ public static String getParentMenuId(JSONObject paramsObj) @@ -314,7 +313,7 @@ public class VelocityUtils /** * 获取树编码 * - * @param options 生成其他选项 + * @param paramsObj 生成其他选项 * @return 树编码 */ public static String getTreecode(JSONObject paramsObj) @@ -329,7 +328,7 @@ public class VelocityUtils /** * 获取树父编码 * - * @param options 生成其他选项 + * @param paramsObj 生成其他选项 * @return 树父编码 */ public static String getTreeParentCode(JSONObject paramsObj) @@ -344,7 +343,7 @@ public class VelocityUtils /** * 获取树名称 * - * @param options 生成其他选项 + * @param paramsObj 生成其他选项 * @return 树名称 */ public static String getTreeName(JSONObject paramsObj) @@ -382,4 +381,4 @@ public class VelocityUtils } return num; } -} \ No newline at end of file +} 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 177d04263..fe103d0e2 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 @@ -19,7 +19,7 @@ public interface SysUserMapper public List selectUserList(SysUser sysUser); /** - * 根据条件分页查询未已配用户角色列表 + * 根据条件分页查询已配用户角色列表 * * @param user 用户信息 * @return 用户信息集合信息 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java index 625e976a2..14ca2da59 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java @@ -54,7 +54,6 @@ public interface ISysConfigService * 批量删除参数配置信息 * * @param ids 需要删除的数据ID - * @return 结果 */ public void deleteConfigByIds(String ids); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java index 38941c26c..b2575a0c8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java @@ -39,7 +39,6 @@ public interface ISysDictDataService * 批量删除字典数据 * * @param ids 需要删除的数据 - * @return 结果 */ public void deleteDictDataByIds(String ids); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java index 8915973de..3541da2ba 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java @@ -55,8 +55,6 @@ public interface ISysDictTypeService * 批量删除字典类型 * * @param ids 需要删除的数据 - * @return 结果 - * @throws Exception 异常 */ public void deleteDictTypeByIds(String ids); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java index 8e292c25b..501551573 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java @@ -29,7 +29,7 @@ public interface ISysLogininforService * 批量删除系统登录日志 * * @param ids 需要删除的数据 - * @return + * @return 结果 */ public int deleteLogininforByIds(String ids); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java index bbf7b784f..91b71aca2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java @@ -46,9 +46,8 @@ public interface ISysPostService * * @param ids 需要删除的数据ID * @return 结果 - * @throws Exception 异常 */ - public int deletePostByIds(String ids) throws Exception; + public int deletePostByIds(String ids); /** * 新增保存岗位信息 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java index 5a0df39d4..3a77b333f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java @@ -123,7 +123,6 @@ public class SysConfigServiceImpl implements ISysConfigService * 批量删除参数配置对象 * * @param ids 需要删除的数据ID - * @return 结果 */ @Override public void deleteConfigByIds(String ids) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java index 9239be405..9c3325fb7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java @@ -61,7 +61,6 @@ public class SysDictDataServiceImpl implements ISysDictDataService * 批量删除字典数据 * * @param ids 需要删除的数据 - * @return 结果 */ @Override public void deleteDictDataByIds(String ids) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java index a764c7917..3f29d0b55 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java @@ -118,7 +118,6 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService * 批量删除字典类型 * * @param ids 需要删除的数据 - * @return 结果 */ @Override public void deleteDictTypeByIds(String ids) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java index 3f183d62c..2ffb61355 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java @@ -47,7 +47,7 @@ public class SysLogininforServiceImpl implements ISysLogininforService * 批量删除系统登录日志 * * @param ids 需要删除的数据 - * @return + * @return 结果 */ @Override public int deleteLogininforByIds(String ids) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 37d643868..4e82b3bd1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -384,6 +384,6 @@ public class SysMenuServiceImpl implements ISysMenuService */ private boolean hasChild(List list, SysMenu t) { - return getChildList(list, t).size() > 0 ? true : false; + return getChildList(list, t).size() > 0; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java index a68e9ce4c..1639510ac 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java @@ -90,7 +90,7 @@ public class SysPostServiceImpl implements ISysPostService * 批量删除岗位信息 * * @param ids 需要删除的数据ID - * @throws Exception + * @return 结果 */ @Override public int deletePostByIds(String ids) 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 6ca973b83..5bf8c3174 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 @@ -394,7 +394,7 @@ public class SysRoleServiceImpl implements ISysRoleService * 批量选择授权用户角色 * * @param roleId 角色ID - * @param userIds 需要删除的用户数据ID + * @param userIds 需要授权的用户数据ID * @return 结果 */ @Override