Browse Source

符号替换

Gaokun Wang 3 weeks ago
parent
commit
88bc93362c

+ 4 - 6
eco-common/com-core/src/main/java/org/eco/vip/core/api/IDict.java

@@ -6,6 +6,8 @@
 package org.eco.vip.core.api;
 
 
+import org.eco.vip.core.utils.StrUtils;
+
 import java.util.Map;
 
 /**
@@ -15,10 +17,6 @@ import java.util.Map;
  * @date 2025/7/21 16:27
  */
 public interface IDict {
-    /**
-     * 分隔符
-     */
-    String SEPARATOR = ",";
 
     /**
      * 根据字典类型和字典值获取字典标签
@@ -28,7 +26,7 @@ public interface IDict {
      * @return 字典标签
      */
     default String getDictLabel(String dictType, String dictValue) {
-        return getDictLabel(dictType, dictValue, SEPARATOR);
+        return getDictLabel(dictType, dictValue, StrUtils.COMMA);
     }
 
     /**
@@ -39,7 +37,7 @@ public interface IDict {
      * @return 字典值
      */
     default String getDictValue(String dictType, String dictLabel) {
-        return getDictValue(dictType, dictLabel, SEPARATOR);
+        return getDictValue(dictType, dictLabel, StrUtils.COMMA);
     }
 
     /**

+ 1 - 2
eco-common/com-core/src/main/java/org/eco/vip/core/utils/DateUtils.java

@@ -24,10 +24,9 @@ public class DateUtils extends DateUtil {
      */
     public static String datePath() {
         Date now = new Date();
-        return DateUtil.format(now, "yyyy/MM/dd");
+        return DateUtil.format(now, "yyyy" + FileUtils.FILE_SEPARATOR + "MM" + FileUtils.FILE_SEPARATOR + "dd");
     }
     public static String dateTimeNow() {
         return DateUtil.format(new Date(), YYYYMMDDHHMMSS);
     }
-
 }

+ 0 - 1
eco-common/com-core/src/main/java/org/eco/vip/core/utils/StrUtils.java

@@ -16,5 +16,4 @@ import lombok.extern.slf4j.Slf4j;
  */
 @Slf4j
 public class StrUtils extends StrUtil {
-    public static final String SEPARATOR = ",";
 }

+ 1 - 1
eco-common/com-core/src/main/java/org/eco/vip/core/utils/StreamUtils.java

@@ -57,7 +57,7 @@ public class StreamUtils {
      * @return 拼接后的list
      */
     public static <E> String join(Collection<E> collection, Function<E, String> function) {
-        return join(collection, function, StrUtils.SEPARATOR);
+        return join(collection, function, StrUtils.COMMA);
     }
 
     /**

+ 1 - 1
eco-common/com-excel/src/main/java/org/eco/vip/excel/annotation/ExcelDictFormat.java

@@ -38,5 +38,5 @@ public @interface ExcelDictFormat {
     /**
      * 分隔符,读取字符串组内容
      */
-    String separator() default StrUtils.SEPARATOR;
+    String separator() default StrUtils.COMMA;
 }

+ 2 - 2
eco-common/com-excel/src/main/java/org/eco/vip/excel/utils/ExcelUtils.java

@@ -213,7 +213,7 @@ public class ExcelUtils {
      */
     public static String convertByExp(String propertyValue, String converterExp, String separator) {
         StringBuilder propertyString = new StringBuilder();
-        String[] convertSource = converterExp.split(StrUtils.SEPARATOR);
+        String[] convertSource = converterExp.split(StrUtils.COMMA);
         for (String item : convertSource) {
             String[] itemArray = item.split("=");
             if (StrUtils.containsAny(propertyValue, separator)) {
@@ -242,7 +242,7 @@ public class ExcelUtils {
      */
     public static String reverseByExp(String propertyValue, String converterExp, String separator) {
         StringBuilder propertyString = new StringBuilder();
-        String[] convertSource = converterExp.split(StrUtils.SEPARATOR);
+        String[] convertSource = converterExp.split(StrUtils.COMMA);
         for (String item : convertSource) {
             String[] itemArray = item.split("=");
             if (StrUtils.containsAny(propertyValue, separator)) {

+ 1 - 1
eco-nexus-core/nexus-core-biz/src/main/java/org/eco/vip/nexus/core/service/files/FilesService.java

@@ -171,7 +171,7 @@ public class FilesService extends BaseService<FilesMapper, Files> implements IFi
                 }
             }
         }
-        String downloadUrl = Constants.HTTP + getIpAddress() + ":" + port + FileUtils.FILE_SEPARATOR + Constants.LOCAL_FILE_BUCKET_KEY + FileUtils.FILE_SEPARATOR + path;
+        String downloadUrl = Constants.HTTP + getIpAddress() + StrUtils.COLON + port + FileUtils.FILE_SEPARATOR + Constants.LOCAL_FILE_BUCKET_KEY + FileUtils.FILE_SEPARATOR + path;
         filesInfo.setDownloadUrl(downloadUrl);
         filesInfo.setStorageUrl(storageUrl);
         this.save(filesInfo);