From 4f13f0c4e91465050a3f00abe36aeb9adcaf62c2 Mon Sep 17 00:00:00 2001
From: E1ED922C1E9526DD63272D7EC5C6CB77 <E1ED922C1E9526DD63272D7EC5C6CB77@i-search.com.cn>
Date: 星期一, 14 十二月 2020 16:53:58 +0800
Subject: [PATCH] 添加对字符串的隐藏操作

---
 .idea/inspectionProfiles/Project_Default.xml         |   10 +++++
 src/main/java/com/hx/util/FileUtils.java             |   46 +++++++++++++++++++++++
 .idea/libraries/Maven__joda_time_joda_time_2_9_9.xml |   13 ++++++
 .idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml |   13 ++++++
 hx-common.iml                                        |    2 +
 5 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..4c64f60
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,10 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
+      <Languages>
+        <language minSize="109" name="Java" />
+      </Languages>
+    </inspection_tool>
+  </profile>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml b/.idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml
new file mode 100644
index 0000000..dc754ef
--- /dev/null
+++ b/.idea/libraries/Maven__com_qcloud_cos_api_5_6_24.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.qcloud:cos_api:5.6.24">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/qcloud/cos_api/5.6.24/cos_api-5.6.24-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml b/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml
new file mode 100644
index 0000000..a468f58
--- /dev/null
+++ b/.idea/libraries/Maven__joda_time_joda_time_2_9_9.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: joda-time:joda-time:2.9.9">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/joda-time/joda-time/2.9.9/joda-time-2.9.9-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>
\ No newline at end of file
diff --git a/hx-common.iml b/hx-common.iml
index 1348670..77d6974 100644
--- a/hx-common.iml
+++ b/hx-common.iml
@@ -20,6 +20,8 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="library" name="Maven: com.qcloud:cos_api:5.6.32" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:5.6.24" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
     <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
     <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
diff --git a/src/main/java/com/hx/util/FileUtils.java b/src/main/java/com/hx/util/FileUtils.java
index 5089158..074f4d1 100644
--- a/src/main/java/com/hx/util/FileUtils.java
+++ b/src/main/java/com/hx/util/FileUtils.java
@@ -323,6 +323,52 @@
     }
 
     /**
+     * 闊抽涓婁紶
+     * @param platformIconFile
+     * @param unifiedFolder
+     * @param saveFolder
+     * @param autoDateFolder
+     * @return
+     */
+    public static String handleAudioUpload(MultipartFile platformIconFile,String unifiedFolder,String saveFolder
+            ,boolean autoDateFolder) {
+        String fileName = "";
+        try {
+            if(platformIconFile == null) {
+                throw new TipsException("璇蜂笂浼犻煶棰戯紒");
+            }
+
+            if(autoDateFolder){
+                if(saveFolder.endsWith("/")){
+                    saveFolder = saveFolder+dateFormat(new Date(),"yyyyMM")+"/";
+                }else{
+                    saveFolder = saveFolder+"/"+dateFormat(new Date(),"yyyyMM")+"/";
+                }
+            }
+
+            fileName = dateFormat(new Date(),"yyyyMMddHHmmssSSS");
+            if(unifiedFolder.endsWith("/")){
+                if(saveFolder.startsWith("/")){
+                    saveFolder = saveFolder.replaceFirst("/","");
+                    unifiedFolder  = unifiedFolder + saveFolder;
+                }else{
+                    unifiedFolder  = unifiedFolder+saveFolder;
+                }
+            }else{
+                if(saveFolder.startsWith("/")){
+                    unifiedFolder  = unifiedFolder + saveFolder;
+                }else{
+                    unifiedFolder  = unifiedFolder+"/"+saveFolder;
+                }
+            }
+            fileName = saveFolder+fileUp(platformIconFile,unifiedFolder,fileName);
+        } catch (RuntimeException e) {
+            e.printStackTrace();
+        }
+        return fileName;
+    }
+
+    /**
      * 2020-06-29 ChenJiaHe
 聽聽 聽 * @param file 聽聽 聽聽聽 聽聽聽 聽//鏂囦欢瀵硅薄
 聽聽 聽 * @param filePath聽聽 聽聽聽 聽//涓婁紶璺緞

--
Gitblit v1.8.0