Jelajahi Sumber

修改消费端fastjson

wuweihao 3 tahun lalu
induk
melakukan
d34965430b

+ 2 - 56
720yun_fd_consumer/pom.xml

@@ -24,7 +24,7 @@
         <spring.boot.version>2.1.0.RELEASE</spring.boot.version>
         <spring.boot.version>2.1.0.RELEASE</spring.boot.version>
         <gis.version>1.0.0</gis.version>
-        <fastjson.version>1.2.75</fastjson.version>
+        <fastjson.version>1.2.83</fastjson.version>
         <druid.version>1.1.14</druid.version>
         <hutool.version>5.3.3</hutool.version>
         <lombok.version>1.18.2</lombok.version>
@@ -45,23 +45,8 @@
 
 
 
-    <!--<dependencyManagement>-->
         <dependencies>
-            <!-- spring-cloud-->
-            <!--<dependency>-->
-                <!--<groupId>org.springframework.cloud</groupId>-->
-                <!--<artifactId>spring-cloud-dependencies</artifactId>-->
-                <!--<version>Greenwich.SR2</version>-->
-                <!--<type>pom</type>-->
-                <!--<scope>import</scope>-->
-            <!--</dependency>-->
-            <!--<dependency>-->
-                <!--<groupId>org.springframework.cloud</groupId>-->
-                <!--<artifactId>spring-cloud-alibaba-dependencies</artifactId>-->
-                <!--<version>0.9.0.RELEASE</version>-->
-                <!--<type>pom</type>-->
-                <!--<scope>import</scope>-->
-            <!--</dependency>-->
+
 
 
             <!-- springboot -->
@@ -91,13 +76,6 @@
                 <version>${spring.boot.version}</version>
             </dependency>
 
-            <!-- rocketmq -->
-            <!--<dependency>-->
-            <!--<groupId>org.apache.rocketmq</groupId>-->
-            <!--<artifactId>rocketmq-spring-boot-starter</artifactId>-->
-            <!--<version>2.1.1</version>-->
-            <!--</dependency>-->
-
 
             <!--rabbit MQ-->
             <dependency>
@@ -106,37 +84,6 @@
                 <version>${spring.boot.version}</version>
             </dependency>
 
-            <!-- nacos 注册中心依赖 -->
-            <!--<dependency>-->
-                <!--<groupId>org.springframework.cloud</groupId>-->
-                <!--<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
-                <!--<version>0.9.0.RELEASE</version>-->
-                <!--&lt;!&ndash;<version>2.1.0.RELEASE</version>&ndash;&gt;-->
-            <!--</dependency>-->
-
-
-
-            <!-- openfeign -->
-            <!--<dependency>-->
-                <!--<groupId>org.springframework.cloud</groupId>-->
-                <!--<artifactId>spring-cloud-starter-openfeign</artifactId>-->
-                <!--<version>2.1.0.RELEASE</version>-->
-            <!--</dependency>-->
-
-            <!-- openfeign 调用需要加这个依赖 -->
-            <!--<dependency>-->
-                <!--<groupId>com.netflix.archaius</groupId>-->
-                <!--<artifactId>archaius-core</artifactId>-->
-                <!--<version>0.7.6</version>-->
-                <!--<exclusions>-->
-                    <!--<exclusion>-->
-                        <!--<groupId>com.google.guava</groupId>-->
-                        <!--<artifactId>guava</artifactId>-->
-                    <!--</exclusion>-->
-                <!--</exclusions>-->
-            <!--</dependency>-->
-
-
 
             <!-- lombok -->
             <dependency>
@@ -258,7 +205,6 @@
 
 
         </dependencies>
-    <!--</dependencyManagement>-->
 
 
     <build>

+ 15 - 21
720yun_fd_manage/gis_common/src/main/java/com/gis/common/util/FileUtils.java

@@ -780,33 +780,15 @@ public class FileUtils {
 
 
     /**
-     * 真删除文件
+     * 真删除文件-异步删除
      * @param path 参数是相对地址
      */
-//    public void del(String path){
-//        if (StrUtil.isNotBlank(path)){
-//            String delPath = configConstant.serverBasePath + path;
-//            // 异步执行
-//            String traceId = MDC.get("TRACE_ID");
-//            ThreadUtil.execAsync(() -> {
-//                MDC.put("TRACE_ID", traceId);
-//                FileUtil.del(delPath);
-//                log.info("异步删除完成: {}", delPath);
-//            });
-//            log.info("真删除文件: {}", delPath);
-//        }
-//    }
-
-    /**
-     * 真删除文件
-     * @param path 参数是相对地址
-     */
-    public void del(String path){
+    public void delAsync(String path){
         if (StrUtil.isNotBlank(path)){
             String delPath = configConstant.serverBasePath + path;
             // 异步执行
             String traceId = MDC.get("TRACE_ID");
-            ThreadUtil.execute(() -> {
+            ThreadUtil.execAsync(() -> {
                 MDC.put("TRACE_ID", traceId);
                 FileUtil.del(delPath);
                 log.info("异步删除完成: {}", delPath);
@@ -815,4 +797,16 @@ public class FileUtils {
         }
     }
 
+    /**
+     * 真删除文件
+     * @param path 参数是相对地址
+     */
+    public void del(String path){
+        if (StrUtil.isNotBlank(path)){
+            String delPath = configConstant.serverBasePath + path;
+            FileUtil.del(delPath);
+            log.info("真删除文件: {}", delPath);
+        }
+    }
+
 }

+ 1 - 1
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -314,7 +314,7 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
         }
 
         // 2022-06-09 删除服务器文件, 目前只有全景图
-        fileUtils.del(entity.getSceneCode());
+        fileUtils.delAsync(entity.getSceneCode());
         entity.setIsDelete(1);
         entity.setUpdateTime(new Date());
         this.update(entity);