From 413f297b969e091170e02c82602a883ce08b57f5 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Thu, 11 Jul 2024 08:54:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=BC=96=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E6=80=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/manager/QuManager.java | 2 +- .../src/main/java/com/ruoyi/common/core/text/Convert.java | 4 ++-- .../src/main/java/com/ruoyi/common/utils/IpUtils.java | 2 +- .../main/java/com/ruoyi/common/utils/excel/ImportExcel.java | 2 -- .../src/main/java/com/ruoyi/common/utils/http/HttpUtils.java | 2 +- .../main/java/com/ruoyi/common/utils/security/Md5Utils.java | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java index df12ad3..9af78c7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java @@ -207,7 +207,7 @@ public class QuManager { //数据分组 for (QuExportDTO item : dtoList) { // 空白的ID - if (org.springframework.util.StringUtils.isEmpty(item.getNo())) { + if (StringUtils.isEmpty(item.getNo())) { continue; } Integer key; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java index a864872..a47139f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java @@ -894,7 +894,7 @@ public class Convert */ public static String toSBC(String input, Set notConvertSet) { - char c[] = input.toCharArray(); + char[] c = input.toCharArray(); for (int i = 0; i < c.length; i++) { if (null != notConvertSet && notConvertSet.contains(c[i])) @@ -936,7 +936,7 @@ public class Convert */ public static String toDBC(String text, Set notConvertSet) { - char c[] = text.toCharArray(); + char[] c = text.toCharArray(); for (int i = 0; i < c.length; i++) { if (null != notConvertSet && notConvertSet.contains(c[i])) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java index 8fde230..05fc85a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java @@ -292,7 +292,7 @@ public class IpUtils String[] s1 = ipWildCard.split("\\."); String[] s2 = ip.split("\\."); boolean isMatchedSeg = true; - for (int i = 0; i < s1.length && !s1[i].equals("*"); i++) + for (int i = 0; i < s1.length && !"*".equals(s1[i]); i++) { if (!s1[i].equals(s2[i])) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/excel/ImportExcel.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/excel/ImportExcel.java index 4822e0b..5fe9ff8 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/excel/ImportExcel.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/excel/ImportExcel.java @@ -6,7 +6,6 @@ package com.ruoyi.common.utils.excel; import com.ruoyi.common.annotation.ExcelField; import org.apache.commons.compress.utils.Lists; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.*; @@ -21,7 +20,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.math.BigDecimal; import java.text.DecimalFormat; -import java.text.NumberFormat; import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Comparator; 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 2ac2603..ae9e559 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 @@ -216,7 +216,7 @@ public class HttpUtils String ret = ""; while ((ret = br.readLine()) != null) { - if (ret != null && !ret.trim().equals("")) + if (StringUtils.isNotBlank(ret) && !ret.trim().isEmpty()) { result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); } 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 ff9937f..8a62d54 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 @@ -32,7 +32,7 @@ public class Md5Utils return null; } - private static final String toHex(byte hash[]) + private static final String toHex(byte[] hash) { if (hash == null) {