lyhzzz 1 bulan lalu
induk
melakukan
d3d355af4d
62 mengubah file dengan 501 tambahan dan 5786 penghapusan
  1. 0 3022
      doc/init/4dkankan_v4-init.sql
  2. 0 1036
      doc/init/fd_fusion_xj-init.sql
  3. 0 2
      doc/v1.8.0/update-1.8.0.sql
  4. 0 32
      doc/v1.9.0/fusion-1.9.0.sql
  5. 0 97
      doc/v1.9.0/fusion-media-1.9.0.sql
  6. 36 10
      pom.xml
  7. 2 2
      src/main/java/com/fdkankan/fusion/FusionApplication.java
  8. 3 0
      src/main/java/com/fdkankan/fusion/common/ResultCode.java
  9. 0 125
      src/main/java/com/fdkankan/fusion/common/util/LocalToOssUtil.java
  10. 0 140
      src/main/java/com/fdkankan/fusion/common/util/MD5Checksum.java
  11. 0 404
      src/main/java/com/fdkankan/fusion/common/util/UploadToOssUtil.java
  12. 37 0
      src/main/java/com/fdkankan/fusion/common/util/ZipFileReaderUtil.java
  13. 0 14
      src/main/java/com/fdkankan/fusion/config/LaserOssConfig.java
  14. 1 7
      src/main/java/com/fdkankan/fusion/config/SaTokenConfigure.java
  15. 2 2
      src/main/java/com/fdkankan/fusion/controller/CaseFilesController.java
  16. 1 1
      src/main/java/com/fdkankan/fusion/controller/CaseImgController.java
  17. 4 4
      src/main/java/com/fdkankan/fusion/controller/CaseSettingsResourceController.java
  18. 6 16
      src/main/java/com/fdkankan/fusion/controller/DictFileController.java
  19. 1 1
      src/main/java/com/fdkankan/fusion/controller/HotIconController.java
  20. 6 10
      src/main/java/com/fdkankan/fusion/controller/ModelController.java
  21. 36 10
      src/main/java/com/fdkankan/fusion/controller/SceneController.java
  22. 1 1
      src/main/java/com/fdkankan/fusion/controller/UploadController.java
  23. 8 21
      src/main/java/com/fdkankan/fusion/down/CaseDownService.java
  24. 7 19
      src/main/java/com/fdkankan/fusion/down/FusionDownService.java
  25. 4 3
      src/main/java/com/fdkankan/fusion/entity/CaseSettingsResource.java
  26. 86 8
      src/main/java/com/fdkankan/fusion/httpClient/FdService.java
  27. 9 10
      src/main/java/com/fdkankan/fusion/httpClient/SignInterceptor.java
  28. 3 0
      src/main/java/com/fdkankan/fusion/httpClient/client/FdKKClient.java
  29. 11 0
      src/main/java/com/fdkankan/fusion/httpClient/request/UploadSceneOrigParamVo.java
  30. 2 5
      src/main/java/com/fdkankan/fusion/mq/consumer/OsgbToB3dmConsumer.java
  31. 0 29
      src/main/java/com/fdkankan/fusion/response/FileInfoVo.java
  32. 20 0
      src/main/java/com/fdkankan/fusion/response/UploadSceneCheckVo.java
  33. 2 0
      src/main/java/com/fdkankan/fusion/service/IScenePlusExtService.java
  34. 2 3
      src/main/java/com/fdkankan/fusion/service/impl/CameraVersionAppServiceImpl.java
  35. 2 12
      src/main/java/com/fdkankan/fusion/service/impl/CameraVersionServiceImpl.java
  36. 0 8
      src/main/java/com/fdkankan/fusion/service/impl/CaseFilesServiceImpl.java
  37. 2 3
      src/main/java/com/fdkankan/fusion/service/impl/CaseImgServiceImpl.java
  38. 0 6
      src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java
  39. 12 4
      src/main/java/com/fdkankan/fusion/service/impl/CaseOverviewServiceImpl.java
  40. 8 10
      src/main/java/com/fdkankan/fusion/service/impl/CaseScriptServiceImpl.java
  41. 1 1
      src/main/java/com/fdkankan/fusion/service/impl/CaseSettingsResourceServiceImpl.java
  42. 17 7
      src/main/java/com/fdkankan/fusion/service/impl/CaseTabulationServiceImpl.java
  43. 1 6
      src/main/java/com/fdkankan/fusion/service/impl/CaseVideoFolderServiceImpl.java
  44. 12 16
      src/main/java/com/fdkankan/fusion/service/impl/CaseVideoServiceImpl.java
  45. 5 2
      src/main/java/com/fdkankan/fusion/service/impl/CaseViewServiceImpl.java
  46. 10 12
      src/main/java/com/fdkankan/fusion/service/impl/CommonUploadServiceImpl.java
  47. 7 17
      src/main/java/com/fdkankan/fusion/service/impl/CopyCaseService.java
  48. 13 13
      src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java
  49. 7 0
      src/main/java/com/fdkankan/fusion/service/impl/ScenePlusExtServiceImpl.java
  50. 11 11
      src/main/java/com/fdkankan/fusion/service/impl/ThreadService.java
  51. 27 35
      src/main/java/com/fdkankan/fusion/service/impl/UploadService.java
  52. 0 183
      src/main/java/com/fdkankan/fusion/task/TaskService.java
  53. 6 9
      src/main/java/com/fdkankan/fusion/task/TimeTaskService.java
  54. 0 54
      src/main/resources/application-dev.yaml
  55. 0 62
      src/main/resources/application-local.yaml
  56. 0 60
      src/main/resources/application-localprod.yaml
  57. 0 62
      src/main/resources/application-prod.yaml
  58. 0 63
      src/main/resources/application-test.yaml
  59. 0 81
      src/main/resources/application.yaml
  60. 31 0
      src/main/resources/bootstrap-dl.yml
  61. 12 0
      src/main/resources/bootstrap.yml
  62. 27 15
      src/main/resources/logback-spring.xml

File diff ditekan karena terlalu besar
+ 0 - 3022
doc/init/4dkankan_v4-init.sql


File diff ditekan karena terlalu besar
+ 0 - 1036
doc/init/fd_fusion_xj-init.sql


+ 0 - 2
doc/v1.8.0/update-1.8.0.sql

@@ -1,2 +0,0 @@
-ALTER TABLE `fd_fusion`.`t_scene_down_log`
-ADD COLUMN `is_obj` int(1) NULL AFTER `update_time`;

+ 0 - 32
doc/v1.9.0/fusion-1.9.0.sql

@@ -1,32 +0,0 @@
-CREATE TABLE `t_case_animation` (
-                                    `id` int NOT NULL AUTO_INCREMENT,
-                                    `case_id` int DEFAULT NULL,
-                                    `title` text COLLATE utf8mb4_general_ci,
-                                    `url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
-                                    `show_title` int DEFAULT NULL COMMENT '0否,1是',
-                                    `font_size` int DEFAULT NULL,
-                                    `global_visibility` int DEFAULT NULL COMMENT '0否,1是',
-                                    `visibility_range` int DEFAULT NULL,
-                                    `frames` text COLLATE utf8mb4_general_ci,
-                                    `actions` text COLLATE utf8mb4_general_ci,
-                                    `subtitles` text COLLATE utf8mb4_general_ci,
-                                    `paths` text COLLATE utf8mb4_general_ci,
-                                    `mat` text COLLATE utf8mb4_general_ci,
-                                    `tb_status` int DEFAULT '0',
-                                    `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
-                                    `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-                                    PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-
-CREATE TABLE `t_case_path` (
-                               `id` int NOT NULL AUTO_INCREMENT,
-                               `case_id` int DEFAULT NULL,
-                               `path` text COLLATE utf8mb4_general_ci,
-                               `tb_status` int DEFAULT '0',
-                               `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
-                               `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-                               PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-
-
-UPDATE t_case_tag set hot_icon_id = 18 WHERE hot_icon_id = 1;

+ 0 - 97
doc/v1.9.0/fusion-media-1.9.0.sql

@@ -1,115 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server         : v4-120.25.146.52-fusion-test
- Source Server Type    : MySQL
- Source Server Version : 50736
- Source Host           : 120.25.146.52:13306
- Source Schema         : fd_fusion
-
- Target Server Type    : MySQL
- Target Server Version : 50736
- File Encoding         : 65001
-
- Date: 29/04/2025 15:40:33
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
-DROP TABLE IF EXISTS `t_common_upload`;
-CREATE TABLE `t_common_upload`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `file_size` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `new_file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `file_type_str` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `file_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `result_file_format` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'A',
-  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
-  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `status` int(11) NULL DEFAULT 0,
-  `unzip_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `file_type` int(11) NULL DEFAULT NULL,
-  `wgs84` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `gcj02` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `use_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'ordinary',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-
-INSERT INTO `t_common_upload` VALUES (1, 'Man', 'https://4dkk.4dage.com/fusion/default/model/glb/man.glb', '3303348', 'Man', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (2, 'Hammer2', 'https://4dkk.4dage.com/fusion/default/model/glb/hammer2.glb', '284844', 'Hammer2', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (3, 'Gun', 'https://4dkk.4dage.com/fusion/default/model/glb/gun.glb', '248080', 'Gun', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (4, 'Kid', 'https://4dkk.4dage.com/fusion/default/model/glb/kid.glb', '2636492', 'Kid', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (5, 'Hammer1', 'https://4dkk.4dage.com/fusion/default/model/glb/hammer1.glb', '2113100', 'Hammer1', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (6, 'Knife', 'https://4dkk.4dage.com/fusion/default/model/glb/knife.glb', '1008742', 'Knife', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (7, 'Machinegun', 'https://4dkk.4dage.com/fusion/default/model/glb/machinegun.glb', '111104', 'Machinegun', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-INSERT INTO `t_common_upload` VALUES (8, 'Baseballbat', 'https://4dkk.4dage.com/fusion/default/model/glb/baseballbat.glb', '259276', 'Baseballbat', '模型', 'glb', 'glb', 'A', '2025-03-28 10:00:04', '2025-04-29 15:38:51', 1, NULL, 3, NULL, NULL, 'animation');
-
-DROP TABLE IF EXISTS `t_dict`;
-CREATE TABLE `t_dict`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `dict_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `sort` int(11) NULL DEFAULT 1,
-  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'A',
-  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
-  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `sys_user_id` int(11) NULL DEFAULT NULL,
-  `parent_id` int(11) NULL DEFAULT NULL,
-  `use_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'ordinary',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-
-INSERT INTO `t_dict` VALUES (1, '动画模型', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-03-28 10:00:04', 1, NULL, 'animation');
-
-DROP TABLE IF EXISTS `t_dict_file`;
-CREATE TABLE `t_dict_file`  (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `type_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
-  `dict_id` int(11) NULL DEFAULT NULL,
-  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'A',
-  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
-  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `sys_user_id` int(11) NULL DEFAULT NULL,
-  `upload_id` int(11) NULL DEFAULT NULL,
-  `use_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'ordinary',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-
-INSERT INTO `t_dict_file` VALUES (1, 'Man', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-03-28 10:00:04', 1, 1, 'animation');
-INSERT INTO `t_dict_file` VALUES (2, 'Hammer2', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:48', 1, 2, 'animation');
-INSERT INTO `t_dict_file` VALUES (3, 'Gun', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:48', 1, 3, 'animation');
-INSERT INTO `t_dict_file` VALUES (4, 'Kid', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:49', 1, 4, 'animation');
-INSERT INTO `t_dict_file` VALUES (5, 'Hammer1', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:50', 1, 5, 'animation');
-INSERT INTO `t_dict_file` VALUES (6, 'Knife', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:50', 1, 6, 'animation');
-INSERT INTO `t_dict_file` VALUES (7, 'Machinegun', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:51', 1, 7, 'animation');
-INSERT INTO `t_dict_file` VALUES (8, 'Baseballbat', 'media-library', 1, 'A', '2025-03-28 10:00:04', '2025-04-11 10:29:51', 1, 8, 'animation');
-
-SET FOREIGN_KEY_CHECKS = 1;
-
-
-ALTER TABLE `fd_fusion`.`t_dict_file`
-    ADD COLUMN `hash_url` varchar(255) NULL AFTER `use_type`,
-    ADD COLUMN `down_url` varchar(255) NULL AFTER `hash_url`;

+ 36 - 10
pom.xml

@@ -19,10 +19,17 @@
     <dependencies>
 
         <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-sign</artifactId>
-            <version>3.0.0-SNAPSHOT</version>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+            <version>2.2.7.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+            <version>2.2.7.RELEASE</version>
         </dependency>
+
         <dependency>
             <groupId>com.fdkankan</groupId>
             <artifactId>4dkankan-utils-redis</artifactId>
@@ -34,6 +41,7 @@
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
 
+
         <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
@@ -86,8 +94,28 @@
             <artifactId>spring-boot-starter-aop</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-rabbitmq</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-fyun-parent</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-fyun-s3</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-sign</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>fastjson</artifactId>
             <version>1.2.83</version>
@@ -127,12 +155,6 @@
         </dependency>
 
 
-        <dependency>
-            <groupId>com.aliyun.oss</groupId>
-            <artifactId>aliyun-sdk-oss</artifactId>
-            <version>3.6.0</version>
-        </dependency>
-
 
         <!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
         <dependency>
@@ -176,7 +198,11 @@
             <version>4.3.1</version>
         </dependency>
 
-
+        <dependency>
+            <groupId>net.lingala.zip4j</groupId>
+            <artifactId>zip4j</artifactId>
+            <version>2.11.5</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 2 - 2
src/main/java/com/fdkankan/fusion/FusionApplication.java

@@ -18,9 +18,9 @@ import org.springframework.web.socket.config.annotation.EnableWebSocket;
 @MapperScan("com.fdkankan.**.mapper")
 public class FusionApplication  implements CommandLineRunner {
 
-    @Value("${upload.type}")
+    @Value("${fyun.type}")
     private String uploadType;
-    @Value("${upload.query-path}")
+    @Value("${fyun.host}")
     private String queryPath;
     @Value("${spring.profiles.active}")
     private String environment;

+ 3 - 0
src/main/java/com/fdkankan/fusion/common/ResultCode.java

@@ -93,6 +93,9 @@ public enum ResultCode {
     SCENE_TYPE_ERROR(8041, "场景类型错误"),
     LASER_VIEW_ERROR(8042, "激光系统访问失败"),
 
+    UPLOAD_SCENE_ERROR(8043, "此场景属于-%s"),
+    UPLOAD_SCENE_ERROR2(8044, "场景已存在,请勿重复上传"),
+    UPLOAD_SCENE_ERROR3(8045, "相机不存在,请先添加相机"),
     ;
 
 

+ 0 - 125
src/main/java/com/fdkankan/fusion/common/util/LocalToOssUtil.java

@@ -1,125 +0,0 @@
-package com.fdkankan.fusion.common.util;
-
-import cn.hutool.core.io.FileUtil;
-import com.fdkankan.fusion.response.FileInfoVo;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.FileUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.io.File;
-import java.nio.charset.Charset;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-@Component
-@Slf4j
-public class LocalToOssUtil {
-
-    @Value("${oss.bucket:4dkankan}")
-    private String bucket;
-
-    @Value("${oss.basePath:/oss/}")
-    private String basePath;
-
-    private String getOssPath(String bucket, String filePath) {
-        return basePath.concat(bucket).concat(File.separator).concat(filePath);
-
-    }
-
-    public boolean existKey(String objectName) {
-        return FileUtil.exist(getOssPath(bucket, objectName));
-    }
-
-
-    public boolean downFormAli(String objectName, String localPath) {
-        try {
-            FileUtil.copy(getOssPath(bucket, objectName), localPath, true);
-        }catch (Exception e){
-            log.info("下载文件失败,remoteFilePath:{},localPath:{}", objectName, localPath);
-            log.info("下载文件失败", e);
-            return false;
-        }
-        return true;
-    }
-
-    public String uploadFile(String bucket, String filePath, String remoteFilePath, Map<String, String> headers) {
-        try {
-            if (!new File(filePath).exists()) {
-                log.warn("文件不存在:{}", filePath);
-                return null;
-            }
-            FileUtil.copy(filePath, getOssPath(bucket, remoteFilePath), true);
-            //FileUtils.contentEqualsIgnoreEOL(new File(filePath),new File(getOssPath(bucket, remoteFilePath)), "UTF-8");
-        }catch (Exception e){
-            log.error("上传文件失败,filePath:{},remoteFilePath:{}", filePath, remoteFilePath);
-            log.error("上传文件失败", e);
-        }
-
-        return null;
-    }
-    public void uploadOss(String filePath, String key1) {
-        uploadFile(bucket, filePath, key1, null);
-    }
-
-    public void delete(String objectName) {
-        FileUtil.del(getOssPath(bucket, objectName));
-
-    }
-
-    public void uploadFileOss(File file) {
-        if(file.isFile()){
-            String ossPath = file.getPath();
-            ossPath = ossPath.replace("/mnt/","");
-            ossPath =  ossPath.replace("\\","/");
-            this.uploadOss(file.getPath(),ossPath);
-        }else {
-            File[] files = file.listFiles();
-            for (File file1 : files) {
-                uploadFileOss(file1);
-            }
-        }
-
-    }
-
-    public List<String> listKeysFromAli(String sourcePath) {
-        return FileUtil.loopFiles(getOssPath(bucket, sourcePath)).stream()
-                .map(f -> f.getAbsolutePath().replace(basePath.concat(bucket).concat(File.separator), ""))
-                .collect(Collectors.toList());
-    }
-
-    public void copyFile(String sourcePath, String targetPath) {
-        try {
-            FileUtil.copyContent(new File(getOssPath(bucket, sourcePath)), new File(getOssPath(bucket, targetPath)), true);
-        }catch (Exception e){
-            log.error("复制文件失败,sourcePath:{},targetPath:{}",sourcePath,targetPath);
-            log.error("复制文件失败", e);
-        }
-    }
-
-    public FileInfoVo getFileInfo(String filePath) {
-        return MD5Checksum.getFileInfo(getOssPath(bucket, filePath));
-    }
-
-    public Long getSizeCount(String filePath) {
-        log.info("getSize:{}",filePath);
-        File file = new File(filePath);
-        if(file.isFile()){
-            return file.length();
-        }
-        File[] files = file.listFiles();
-        if(files == null){
-            return 0L;
-        }
-        Long size = 0L;
-        for (File file1 : files) {
-            size+= getSizeCount(file1.getPath());
-        }
-        return size;
-    }
-
-    public Long getSize(String filePath) {
-        return getSizeCount( getOssPath(bucket, filePath));
-    }
-}

+ 0 - 140
src/main/java/com/fdkankan/fusion/common/util/MD5Checksum.java

@@ -1,140 +0,0 @@
-package com.fdkankan.fusion.common.util;
-
-import cn.hutool.core.io.FileUtil;
-import com.aliyun.oss.OSSClient;
-import com.aliyun.oss.model.GetObjectRequest;
-import com.fdkankan.fusion.response.FileInfoVo;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.security.MessageDigest;
-import java.util.Date;
-
-public class MD5Checksum {
-    public static byte[] createChecksum(String filePath,String sign)  {
-        try {
-            InputStream fis = new FileInputStream(filePath);
-            byte[] buffer = new byte[1024];
-            MessageDigest complete = MessageDigest.getInstance(sign);
-            int numRead;
-
-            do {
-                numRead = fis.read(buffer);
-                if (numRead > 0) {
-                    complete.update(buffer, 0, numRead);
-                }
-            } while (numRead != -1);
-
-            fis.close();
-            return complete.digest();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    public static byte[] createChecksum(InputStream fis,String sign)  {
-        try {
-            byte[] buffer = new byte[1024];
-            MessageDigest complete = MessageDigest.getInstance(sign);
-            int numRead;
-
-            do {
-                numRead = fis.read(buffer);
-                if (numRead > 0) {
-                    complete.update(buffer, 0, numRead);
-                }
-            } while (numRead != -1);
-
-            return complete.digest();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-
-        return null;
-    }
-
-    public static String getMD5(String filePath)  {
-        byte[] b = createChecksum(filePath,"MD5");
-        if(b == null){
-            return null;
-        }
-        StringBuilder result = new StringBuilder();
-
-        for (byte element : b) {
-            result.append(Integer.toString((element & 0xff) + 0x100, 16).substring(1));
-        }
-
-        return result.toString();
-    }
-
-    public static String getMD5(InputStream filePath)  {
-        byte[] b = createChecksum(filePath,"MD5");
-        if(b == null){
-            return null;
-        }
-        StringBuilder result = new StringBuilder();
-
-        for (byte element : b) {
-            result.append(Integer.toString((element & 0xff) + 0x100, 16).substring(1));
-        }
-
-        return result.toString();
-    }
-
-    public static String getSHA1(String filePath)  {
-        byte[] b = createChecksum(filePath,"SHA1");
-        StringBuilder result = new StringBuilder();
-        if(b == null){
-            return null;
-        }
-        for (byte element : b) {
-            result.append(Integer.toString((element & 0xff) + 0x100, 16).substring(1));
-        }
-
-        return result.toString();
-    }
-    public static String getSHA1(InputStream filePath)  {
-        byte[] b = createChecksum(filePath,"SHA1");
-        StringBuilder result = new StringBuilder();
-        if(b == null){
-            return null;
-        }
-        for (byte element : b) {
-            result.append(Integer.toString((element & 0xff) + 0x100, 16).substring(1));
-        }
-
-        return result.toString();
-    }
-
-    public static Long getLastModifiedTime(String filePath)  {
-        File file = new File(filePath);
-        return file.lastModified();
-    }
-    public static Long getSize(String filePath)  {
-        File file = new File(filePath);
-        return file.length();
-    }
-
-
-    public static FileInfoVo getFileInfo(String filePath){
-        try {
-            return new FileInfoVo(
-                    getMD5(filePath).toUpperCase(),
-                    getSHA1(filePath).toUpperCase(),
-                    getLastModifiedTime(filePath),
-                    getSize(filePath));
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static void main(String[] args) {
-        FileInfoVo fileInfo = getFileInfo("D:\\abc\\1.txt");
-        FileUtil.writeString(fileInfo.toString(),new File("D:\\abc\\hash.txt"),"UTF-8");
-        System.out.println();
-    }
-}

+ 0 - 404
src/main/java/com/fdkankan/fusion/common/util/UploadToOssUtil.java

@@ -1,404 +0,0 @@
-package com.fdkankan.fusion.common.util;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.io.FileUtil;
-import com.aliyun.oss.OSSClient;
-import com.aliyun.oss.common.utils.BinaryUtil;
-import com.aliyun.oss.model.*;
-import com.fdkankan.fusion.response.FileInfoVo;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.springframework.util.ObjectUtils;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.commons.CommonsMultipartFile;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import java.util.stream.Collectors;
-
-@Slf4j
-@Component
-public class UploadToOssUtil {
-
-
-	@Value("${oss.point}")
-	private String point;
-
-	@Value("${oss.key}")
-	private String key;
-
-	@Value("${oss.secrey}")
-	private String secrey;
-
-	@Value("${oss.bucket:4dkankan}")
-	private String bucket;
-
-	@Value("${upload.type:oss}")
-	private String type;
-
-	@Value("${upload.query-path}")
-	private String queryPath;
-
-	@Autowired
-	LocalToOssUtil localToOssUtil;
-
-
-	/**
-	 * 获取文件内容-阿里云
-	 * @param objectName
-	 * @return
-	 */
-	public boolean existKey(String objectName){
-		//创建oss客户端
-		if("local".equals(type)){
-			return localToOssUtil.existKey(objectName);
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		// ossObject包含文件所在的存储空间名称、文件名称、文件元信息以及一个输入流。
-		try{
-			boolean exist = ossClient.doesObjectExist(bucket, objectName);
-			return exist;
-		}catch (Exception e){
-			log.error("s4判断是否存在key异常,key=" + objectName, e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * 从阿里云oss下载文件到本地
-	 * @param objectName 云端文件k地址
-	 * @param localPath 本地文件地址
-	 * @return
-	 */
-	public boolean downFormAli(String objectName, String localPath){
-		if("local".equals(type)){
-			return localToOssUtil.downFormAli(objectName,localPath);
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			com.aliyun.oss.model.GetObjectRequest request  = new com.aliyun.oss.model.GetObjectRequest(bucket,objectName);
-			File file = new File(localPath);
-			if(!file.getParentFile().exists()){
-				file.getParentFile().mkdirs();
-				file = new File(localPath);
-			}
-			ossClient.getObject(request, file);
-			return true;
-		}catch (Exception e){
-			log.error("阿里云oss文件下载失败,key=" + objectName, e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return false;
-	}
-
-
-	public  void uploadOss(String filePath, String key1){
-		if("local".equals(type)){
-			localToOssUtil.uploadOss(filePath,key1);
-			return ;
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			log.info("upload-to-oss:file-path:{},oss-path:{}",filePath,key1);
-			File file = new File(filePath);
-			if (!file.exists()) {
-				log.info("upload-to-oss:file-path:{},oss-path:{},filePath不存在!",filePath,key1);
-				return;
-			}
-			ObjectMetadata metadata = new ObjectMetadata();
-			ossClient.putObject(bucket, key1, new File(filePath), metadata);
-		} catch (Exception e) {
-			log.info("upload-to-oss:error:file-path:{},key:{}",filePath,key1);
-		} finally {
-			ossClient.shutdown();
-		}
-	}
-	public void delete(String objectName){
-		if(StringUtils.isBlank(objectName)){
-			return;
-		}
-		if(objectName.contains(queryPath)){
-			objectName = objectName.replace(queryPath,"");
-		}
-		if(!this.fileExist(objectName)){
-			return;
-		}
-
-		if("local".equals(type)){
-			localToOssUtil.delete(objectName);
-			return ;
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			ossClient.deleteObject(bucket, objectName);
-		} catch (Exception e) {
-			log.error("OSS删除文件失败,key=" + objectName);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-	}
-
-	/**
-	 * 获得文件列表-阿里云
-	 * @return
-	 */
-	public List<String> listKeysFromAli(String sourcePath) {
-
-		return listKeysFromAli(sourcePath,bucket);
-	}
-
-	public List<String> listKeysFromAli(String sourcePath,String bucket) {
-		if("local".equals(type)){
-			return localToOssUtil.listKeysFromAli(sourcePath);
-		}
-		List<String> keyList = new ArrayList<>();
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			boolean flag = true;
-			String nextMaker = null;
-			ListObjectsRequest listObjectsRequest = new ListObjectsRequest(bucket);
-			//指定下一级文件
-			listObjectsRequest.setPrefix(sourcePath);
-			//设置分页的页容量
-			listObjectsRequest.setMaxKeys(200);
-			do
-			{
-				//获取下一页的起始点,它的下一项
-				listObjectsRequest.setMarker(nextMaker);
-				ObjectListing objectListing = ossClient.listObjects(listObjectsRequest);
-				List<OSSObjectSummary> objectSummaries = objectListing.getObjectSummaries();
-				List<String> collect = objectSummaries.stream().map(summary -> {
-					return summary.getKey();
-				}).collect(Collectors.toList());
-				if(CollUtil.isNotEmpty(collect)){
-					keyList.addAll(collect);
-				}
-				nextMaker = objectListing.getNextMarker();
-				//全部执行完后,为false
-				flag = objectListing.isTruncated();
-			} while (flag);
-		}catch (Exception e){
-			log.error("获取文件列表失败,path="+sourcePath, e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-
-
-		ossClient.shutdown();
-
-		return keyList;
-	}
-
-	/**
-	 * 获取文件内容-阿里云
-	 * @param objectName
-	 * @return
-	 */
-	public String getObjectContent(String objectName){
-		//创建oss客户端
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		InputStream objectContent = null;
-		StringBuilder contentJson = new StringBuilder();
-		try {
-			// ossObject包含文件所在的存储空间名称、文件名称、文件元信息以及一个输入流。
-			OSSObject ossObject = ossClient.getObject(bucket, objectName);
-			objectContent = ossObject.getObjectContent();
-			try(BufferedReader reader = new BufferedReader(new InputStreamReader(objectContent))){
-				while (true) {
-					String line = reader.readLine();
-					if (line == null) break;
-					contentJson.append(line);
-				}
-			} catch (IOException e) {
-				log.error("读取scene.json文件流失败", e);
-			}
-		}catch (Exception e){
-			log.error("s3获取文件内容失败,key="+objectName, e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-
-		return contentJson.toString();
-	}
-
-	public  void uploadFileOss(File file) {
-		if("local".equals(type)){
-			localToOssUtil.uploadFileOss(file);
-			return ;
-		}
-		if(file.isFile()){
-			String ossPath = file.getPath();
-			ossPath = ossPath.replace("/mnt/","");
-			ossPath =  ossPath.replace("\\","/");
-			this.uploadOss(file.getPath(),ossPath);
-		}else {
-			File[] files = file.listFiles();
-			for (File file1 : files) {
-				uploadFileOss(file1);
-			}
-		}
-	}
-
-	public void copyFile( String sourcePath, String targetPath) {
-		if("local".equals(type)){
-			 localToOssUtil.copyFile(sourcePath,targetPath);
-			return;
-		}
-
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-
-		try {
-			List<String> files = listKeysFromAli( sourcePath);
-			if (ObjectUtils.isEmpty(files)) {
-				return;
-			}
-			files.stream().forEach(file -> {
-				log.info("oss-copy-file---sourcePath:{},targetPath:{}",sourcePath,targetPath);
-				ossClient.copyObject(this.bucket, file, this.bucket, file.replace(sourcePath, targetPath));
-			});
-		} catch (Exception e) {
-			log.error("列举文件目录失败,key:" + sourcePath, e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-	}
-
-	private String getMd5(String filePath){
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		String md5 = null;
-		try {
-			InputStream inputStream = ossClient.getObject(bucket, filePath).getObjectContent();
-			md5 = MD5Checksum.getMD5(inputStream);
-			log.info("Calculated MD5 for " + filePath + " is " + md5);
-			inputStream.close();
-		}catch (Exception e){
-			log.info("oss-getMd5-error:{}",e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return md5;
-	}
-
-	private String getSHA1(String filePath){
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		String md5 = null;
-		try {
-			InputStream inputStream = ossClient.getObject(bucket, filePath).getObjectContent();
-			md5 = MD5Checksum.getSHA1(inputStream);
-			log.info("Calculated MD5 for " + filePath + " is " + md5);
-			inputStream.close();
-		}catch (Exception e){
-			log.info("oss-getMd5-error:{}",e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return md5;
-	}
-	private Long getLastModified(String filePath){
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			GetObjectRequest getObjectMetadataRequest = new GetObjectRequest(bucket, filePath);
-			Date  LastMo = ossClient.getObjectMetadata(getObjectMetadataRequest).getLastModified();
-			return LastMo.getTime();
-		}catch (Exception e){
-			log.info("oss-getMd5-error:{}",e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return null;
-	}
-
-	public FileInfoVo getFileInfo(String filePath,String bucket){
-		if("local".equals(type)){
-			return localToOssUtil.getFileInfo(filePath);
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		try {
-			GetObjectRequest getObjectMetadataRequest = new GetObjectRequest(bucket, filePath);
-			Date LastMo = ossClient.getObjectMetadata(getObjectMetadataRequest).getLastModified();
-			String md5 = ossClient.getObjectMetadata(getObjectMetadataRequest).getETag();
-			Long size = ossClient.getObjectMetadata(getObjectMetadataRequest).getContentLength();
-
-			InputStream inputStream = ossClient.getObject(bucket, filePath).getObjectContent();
-			String sha1 = MD5Checksum.getSHA1(inputStream);
-			return new FileInfoVo(md5,sha1.toUpperCase(),LastMo.getTime(),size);
-		}catch (Exception e){
-			log.info("oss-getFileInfo-error:{}",filePath,e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return null;
-	}
-
-	public FileInfoVo getFileInfo(String filePath){
-		return getFileInfo(filePath,bucket);
-	}
-
-	public Long getSize(String filePath,String bucket){
-		if("local".equals(type)){
-			return localToOssUtil.getSize(filePath);
-		}
-		OSSClient ossClient = new OSSClient(point, key, secrey);
-		Long total = 0L;
-		try {
-			List<String> files = listKeysFromAli( filePath,bucket);
-			if (ObjectUtils.isEmpty(files)) {
-				return 0L;
-			}
-			for (String file : files) {
-				GetObjectRequest getObjectMetadataRequest = new GetObjectRequest(bucket, file);
-				Long size = ossClient.getObjectMetadata(getObjectMetadataRequest).getContentLength();
-				total += size;
-			}
-
-		}catch (Exception e){
-			log.info("oss-getFileInfo-error:{}",e);
-		}finally {
-			if(ossClient != null){
-				ossClient.shutdown();
-			}
-		}
-		return total;
-	}
-
-	public Long getSize(String filePath){
-		return getSize(filePath,bucket);
-	}
-
-
-	public String getOssPath(String path) {
-		return path.replace(queryPath,"");
-	}
-
-	public boolean fileExist(String objKey) {
-		return this.existKey(objKey);
-	}
-}

+ 37 - 0
src/main/java/com/fdkankan/fusion/common/util/ZipFileReaderUtil.java

@@ -0,0 +1,37 @@
+package com.fdkankan.fusion.common.util;
+
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.io.IoUtil;
+import net.lingala.zip4j.*;
+import net.lingala.zip4j.model.FileHeader;
+
+import java.io.InputStream;
+import java.util.List;
+
+public class ZipFileReaderUtil {
+
+    public static final String zipPassword = "a3ad34136de359536af553f9e7f3cefd";
+
+    public static String readUtf8(String zipPath, String fileName) throws Exception {
+        ZipFile zipFile = new ZipFile(zipPath);
+        zipFile.setPassword(zipPassword.toCharArray());
+        // 读取所有条目(文件头)
+        for (FileHeader header : (List<FileHeader>)zipFile.getFileHeaders()) {
+            // 文件名(不含目录)
+            String filePath = header.getFileName();
+            String headerFileName = FileUtil.getName(filePath);
+            if (filePath.contains("backup") || !fileName.equals(headerFileName)) {
+                continue;
+            }
+            try (InputStream is = zipFile.getInputStream(header)) {
+                return IoUtil.readUtf8(is);
+            }
+        }
+        return null;
+    }
+    public static void main(String[] args) throws Exception{
+        String content = readUtf8("D:\\panoxv20001.osc_202506161105346420.zip", "data.fdage");
+        System.out.println(content);
+    }
+
+}

+ 0 - 14
src/main/java/com/fdkankan/fusion/config/LaserOssConfig.java

@@ -1,14 +0,0 @@
-package com.fdkankan.fusion.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class LaserOssConfig {
-
-    @Value("${laser.bucket:laser-data}")
-    public String laserBucket;
-
-    @Value("${laser.base-path:testdata}")
-    public String laserBasePath;
-}

+ 1 - 7
src/main/java/com/fdkankan/fusion/config/SaTokenConfigure.java

@@ -11,17 +11,13 @@ import cn.dev33.satoken.stp.StpLogic;
 import cn.dev33.satoken.stp.StpUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.aliyun.oss.HttpMethod;
+import com.alibaba.nacos.common.utils.HttpMethod;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
-import com.fdkankan.fusion.common.util.MD5Checksum;
 import com.fdkankan.fusion.common.util.RedisKeyUtil;
-import com.fdkankan.fusion.controller.LoginController;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.httpClient.FdService;
 import com.fdkankan.fusion.httpClient.response.FdkkLoginVo;
-import com.fdkankan.fusion.service.ITmPermissionService;
-import com.fdkankan.fusion.service.ITmUserService;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -31,8 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
-import java.util.HashMap;
-
 @Configuration
 @Slf4j
 public class SaTokenConfigure {

+ 2 - 2
src/main/java/com/fdkankan/fusion/controller/CaseFilesController.java

@@ -80,7 +80,7 @@ public class CaseFilesController extends BaseController{
         caseFilesService.save(caseFiles);
         String url = null;
         try {
-            url = uploadService.uploadFile(file, true, String.format(FilePath.File_OSS_PATH,environment,caseFiles.getFilesId() + "/"));
+            url = uploadService.uploadFile(file,true);
         }catch (Exception e){
             caseFilesService.removeById(caseFiles.getFilesId());
             throw e;
@@ -194,7 +194,7 @@ public class CaseFilesController extends BaseController{
         caseFiles.setImgType(imgType);
         caseFiles.setContent(content);
         caseFilesService.saveOrUpdate(caseFiles);
-        String url = uploadService.uploadFile(file, true, String.format(FilePath.File_OSS_PATH,environment,caseFiles.getFilesId() + "/"));
+        String url = uploadService.uploadFile(file, true);
         caseFiles.setFilesUrl(url);
         caseFilesService.saveOrUpdate(caseFiles);
         return ResultData.ok(caseFiles);

+ 1 - 1
src/main/java/com/fdkankan/fusion/controller/CaseImgController.java

@@ -93,7 +93,7 @@ public class CaseImgController {
             if (fileName != null && fileName.contains(".")) {
                 fileName = fileName.substring(0,fileName.lastIndexOf("."));
             }
-            String url = uploadService.uploadFile(file, true, String.format(FilePath.IMAGES_OSS_PATH, environment, caseId));
+            String url = uploadService.uploadFile(file, true);
             CaseImg caseImg = new CaseImg();
             caseImg.setCaseId(caseId);
             caseImg.setImgUrl(url);

+ 4 - 4
src/main/java/com/fdkankan/fusion/controller/CaseSettingsResourceController.java

@@ -29,17 +29,17 @@ public class CaseSettingsResourceController {
 
 
     @GetMapping("/info")
-    public ResultData info(@RequestParam(required = false) Integer caseId){
-        if(caseId == null){
+    public ResultData info(@RequestParam(required = false) Integer fusionId){
+        if(fusionId == null){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        return ResultData.ok(caseSettingsResourceService.getByCaseId(caseId));
+        return ResultData.ok(caseSettingsResourceService.getByCaseId(fusionId));
     }
 
 
     @PostMapping("/saveOrUpdate")
     public ResultData saveOrUpdate(@RequestBody CaseSettingsResource settingsResource){
-        if(settingsResource.getCaseId() == null){
+        if(settingsResource.getFusionId() == null){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         caseSettingsResourceService.saveOrUpdate(settingsResource);

+ 6 - 16
src/main/java/com/fdkankan/fusion/controller/DictFileController.java

@@ -3,34 +3,26 @@ package com.fdkankan.fusion.controller;
 
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.io.FileUtil;
-import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.OssPath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
 import com.fdkankan.fusion.common.util.ShellUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CommonUpload;
-import com.fdkankan.fusion.entity.Dict;
 import com.fdkankan.fusion.entity.DictFile;
-import com.fdkankan.fusion.entity.Model;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.request.DictFileParam;
-import com.fdkankan.fusion.response.FileInfoVo;
 import com.fdkankan.fusion.service.ICommonUploadService;
 import com.fdkankan.fusion.service.IDictFileService;
 import com.fdkankan.fusion.service.IDictService;
-import org.apache.commons.io.FileUtils;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.fyun.util.FileInfoVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
 
 /**
  * <p>
@@ -49,9 +41,7 @@ public class DictFileController extends BaseController{
     @Autowired
     ICommonUploadService commonUploadService;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
-    @Value("${upload.query-path}")
-    private String queryPath;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @Autowired
     IDictService dictService;
 
@@ -119,11 +109,11 @@ public class DictFileController extends BaseController{
         if(StringUtils.isBlank(commonUpload.getFileUrl())){
             throw new BusinessException(ResultCode.FILE_NOT_EXIST);
         }
-        String sceneObjPath = commonUpload.getFileUrl().replace(queryPath,"");
+        String sceneObjPath = commonUpload.getFileUrl().replace(CacheUtil.queryPath,"");
         if("las".equals(commonUpload.getFileFormat()) || "laz".equals(commonUpload.getFileFormat()) || "ply".equals(commonUpload.getFileFormat())){
             sceneObjPath = sceneObjPath+"/cloud.js";
         }
-        FileInfoVo fileInfo = uploadToOssUtil.getFileInfo(sceneObjPath);
+        FileInfoVo fileInfo = fYunFileServiceInterface.getFileInfo(sceneObjPath);
         if(fileInfo == null){
             throw new BusinessException(ResultCode.FILE_NOT_EXIST);
         }
@@ -139,7 +129,7 @@ public class DictFileController extends BaseController{
 
         FileUtil.del(file);
 
-        String downUrl = queryPath + ossPath;
+        String downUrl = CacheUtil.queryPath + ossPath;
         dictFileService.setDownUrl(dictFileId,downUrl,1);
 
         return ResultData.ok(downUrl);

+ 1 - 1
src/main/java/com/fdkankan/fusion/controller/HotIconController.java

@@ -70,7 +70,7 @@ public class HotIconController extends BaseController{
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
 
-        String iconUrl = uploadService.uploadFile(file, true, String.format(FilePath.ICON_OSS_PATH,environment,""));
+        String iconUrl = uploadService.uploadFile(file, true);
 
         HotIcon hotIcon = new HotIcon();
         hotIcon.setIconTitle(iconTitle);

+ 6 - 10
src/main/java/com/fdkankan/fusion/controller/ModelController.java

@@ -7,18 +7,16 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
-import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.FileWriterUtil;
-import com.fdkankan.fusion.common.util.MD5Checksum;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CommonUpload;
 import com.fdkankan.fusion.entity.Model;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.request.AddByMediaLibraryParam;
 import com.fdkankan.fusion.request.ModelPram;
-import com.fdkankan.fusion.request.ScenePram;
-import com.fdkankan.fusion.response.FileInfoVo;
 import com.fdkankan.fusion.service.*;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.fyun.util.FileInfoVo;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -152,9 +150,7 @@ public class ModelController extends BaseController{
     @Value("${spring.profiles.active}")
     private String environment;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
-    @Value("${upload.query-path}")
-    private String queryPath;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @GetMapping("/downMD5")
     public void downMD5(@RequestParam(required = false) Integer modelId,
                         HttpServletResponse res, HttpServletRequest req) throws IOException {
@@ -167,9 +163,9 @@ public class ModelController extends BaseController{
             if(StringUtils.isBlank(model.getFileNewName())){
                 throw new BusinessException(ResultCode.FILE_NOT_EXIST);
             }
-            String sceneObjPath = model.getFileNewName().replace(queryPath,"");
+            String sceneObjPath = model.getFileNewName().replace(CacheUtil.queryPath,"");
 
-            FileInfoVo fileInfo = uploadToOssUtil.getFileInfo(sceneObjPath);
+            FileInfoVo fileInfo = fYunFileServiceInterface.getFileInfo(sceneObjPath);
             if(fileInfo == null){
                 throw new BusinessException(ResultCode.FILE_NOT_EXIST);
             }

+ 36 - 10
src/main/java/com/fdkankan/fusion/controller/SceneController.java

@@ -4,20 +4,22 @@ import cn.hutool.core.io.FileUtil;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
-import com.fdkankan.fusion.common.util.CameraUtil;
 import com.fdkankan.fusion.common.util.NumTypeUtils;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.exception.BusinessException;
+import com.fdkankan.fusion.httpClient.FdService;
 import com.fdkankan.fusion.httpClient.request.LaserSceneParam;
+import com.fdkankan.fusion.httpClient.request.UploadSceneOrigParamVo;
 import com.fdkankan.fusion.request.ScenePram;
-import com.fdkankan.fusion.response.FileInfoVo;
 import com.fdkankan.fusion.service.ISceneService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.fyun.util.FileInfoVo;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -71,7 +73,7 @@ public class SceneController extends BaseController{
     }
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Value("${spring.profiles.active}")
     private String environment;
@@ -99,19 +101,19 @@ public class SceneController extends BaseController{
                     sceneObjPath = String.format(FilePath.LASER_OSS_PATH_TEST, num,num)+"/cloud.js" ;
                     scenePath = String.format(FilePath.LASER_OSS_PATH_TEST, num,num);
                 }
-                fileInfo = uploadToOssUtil.getFileInfo(sceneObjPath,"laser-data");
-                size = uploadToOssUtil.getSize(scenePath,"laser-data");
+                fileInfo = fYunFileServiceInterface.getFileInfo("laser-data",sceneObjPath);
+                size = fYunFileServiceInterface.getSpace("laser-data",scenePath);
             }else {
                 sceneObjPath = String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles/tileset.json";
-                if(!uploadToOssUtil.existKey(sceneObjPath)){
+                if(!fYunFileServiceInterface.fileExist(sceneObjPath)){
                     sceneObjPath = String.format(FilePath.OBJ_OSS_PATH,num) + "/data/mesh/mesh.json";
                 }
-                if(!uploadToOssUtil.existKey(sceneObjPath)){
+                if(!fYunFileServiceInterface.fileExist(sceneObjPath)){
                     sceneObjPath = String.format(FilePath.OBJ_OSS_PATH,num) + "/data/mesh/mesh.obj";
                 }
-                fileInfo = uploadToOssUtil.getFileInfo(sceneObjPath);
+                fileInfo = fYunFileServiceInterface.getFileInfo(sceneObjPath);
                 String scenePath = String.format(FilePath.OBJ_OSS_PATH, num);
-                size = uploadToOssUtil.getSize(scenePath);
+                size = fYunFileServiceInterface.getSpace("4dkankan",scenePath);
             }
             if(fileInfo == null){
                 throw new BusinessException(ResultCode.FILE_NOT_EXIST);
@@ -132,4 +134,28 @@ public class SceneController extends BaseController{
         }
     }
 
+    @Autowired
+    FdService fdkkService;
+
+
+    @PostMapping("/uploadSceneFile")
+    public ResultData uploadSceneFile(@RequestParam(value = "file") MultipartFile file,
+                                       @RequestParam(value = "sourceType") String sourceType){
+        if(StringUtils.isBlank(sourceType)){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        if("orig".equals(sourceType)){
+            return ResultData.ok(fdkkService.uploadSceneFile(file));
+        }
+        throw new BusinessException(ResultCode.UPLOAD_FILE_OBJ_ERROR);
+    }
+
+    @PostMapping("/uploadScene")
+    public ResultData uploadSceneOrig(@RequestBody UploadSceneOrigParamVo paramVo){
+        if(StringUtils.isBlank(paramVo.getFilePath()) || !paramVo.getFilePath().contains(".zip") || StringUtils.isBlank(paramVo.getSourceType())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        fdkkService.uploadSceneOrig(paramVo);
+        return ResultData.ok();
+    }
 }

+ 1 - 1
src/main/java/com/fdkankan/fusion/controller/UploadController.java

@@ -31,7 +31,7 @@ public class UploadController {
     @PostMapping("/file")
     public ResultData file(@RequestParam(required = false) MultipartFile file) throws Exception {
 
-        return ResultData.ok( uploadService.uploadFile(file,true,String.format(FilePath.File_OSS_PATH,environment,"")));
+        return ResultData.ok( uploadService.uploadFile(file,true));
     }
 
 

+ 8 - 21
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -4,15 +4,12 @@ import cn.hutool.core.io.FileUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.deepoove.poi.XWPFTemplate;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
 import com.fdkankan.fusion.common.util.DateUtils;
 import com.fdkankan.fusion.common.util.ShellUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.config.CacheUtil;
-import com.fdkankan.fusion.config.ThreadPoolConfig;
 import com.fdkankan.fusion.entity.*;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.httpClient.LaserService;
@@ -21,21 +18,17 @@ import com.fdkankan.fusion.request.CaseParam;
 import com.fdkankan.fusion.response.*;
 import com.fdkankan.fusion.service.*;
 import com.fdkankan.fusion.service.impl.DownService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
 import java.io.File;
-import java.io.FileOutputStream;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.concurrent.Executor;
@@ -145,7 +138,7 @@ public class CaseDownService {
             String ossUrl = zipName.replace("/mnt/fusion", "fusion/"+CacheUtil.environment);
             ShellUtil.yunUpload(zipName,ossUrl);
 
-            ossUrl = queryPath + ossUrl;
+            ossUrl = CacheUtil.queryPath + ossUrl;
             setRedisProcess(caseId,100,ossUrl);
         }catch (Exception e){
             setRedisProcess(caseId,0,null,1003);
@@ -276,7 +269,7 @@ public class CaseDownService {
         }
 
         String jsonString = JSON.toJSONString(jsonObject);
-        jsonString = jsonString.replaceAll(queryPath,"");
+        jsonString = jsonString.replaceAll(CacheUtil.queryPath,"");
         FileUtil.writeString(jsonString, casePath+"/package/"+jsonDataName,"UTF-8");
 
     }
@@ -320,8 +313,6 @@ public class CaseDownService {
 
    @Autowired
     DownService downService;
-   @Autowired
-    UploadToOssUtil uploadToOssUtil;
 
     private void downFusion(String casePath,Integer fusionId) {
         String path = casePath +"/fusion_offline/"+fusionId;
@@ -372,22 +363,18 @@ public class CaseDownService {
        }
 
    }
-    @Value("${upload.query-path}")
-    private String queryPath;
-    @Value("${upload.query-path-ss}")
-    private String ssQueryPath;
    public void downZip(Integer type ,String uri,String kkzipPath,String kknumPath,String sszipPath,String ssNumPath){
        try {
            if(type != 2 && type != 5){ //深时点云
                if(uri.contains("?")){
                    uri = uri.split("[?]")[0];
                }
-               ShellUtil.yunDownload(uri.replace(queryPath, ""), kkzipPath);
+               ShellUtil.yunDownload(uri.replace(CacheUtil.queryPath, ""), kkzipPath);
                ShellUtil.unZip(kkzipPath,kknumPath);
                FileUtil.del(kkzipPath);
 
            }else {
-               ShellUtil.yunDownloadSs(uri.replace(ssQueryPath, ""), sszipPath);
+               ShellUtil.yunDownloadSs(uri.replace(CacheUtil.queryPath, ""), sszipPath);
                ShellUtil.unZip(sszipPath,ssNumPath);
                FileUtil.del(sszipPath);
 
@@ -404,7 +391,7 @@ public class CaseDownService {
         for (Object object : jsonArray) {
             String res = (String) object;
             log.info("下载模型:{}",res);
-            res = res.replace(queryPath, "");
+            res = res.replace(CacheUtil.queryPath, "");
             if(res.contains(".json") ){
                 res = new File(res).getParentFile().getPath();
             }
@@ -427,7 +414,7 @@ public class CaseDownService {
         if(StringUtils.isBlank(url) ){
             return;
         }
-        url = url.replace(queryPath, "");
+        url = url.replace(CacheUtil.queryPath, "");
         String desPath = path + "/" + url;
         log.info("downResource:{}",url);
         if(!desPath.contains(".")){
@@ -441,7 +428,7 @@ public class CaseDownService {
         if(StringUtils.isBlank(caseFiles.getFilesUrl()) ){
             return;
         }
-        String url = caseFiles.getFilesUrl().replace(queryPath, "");
+        String url = caseFiles.getFilesUrl().replace(CacheUtil.queryPath, "");
         String desPath = path + "/" + url;
         log.info("downResource:{}",url);
         if(!desPath.contains(".")){

+ 7 - 19
src/main/java/com/fdkankan/fusion/down/FusionDownService.java

@@ -155,7 +155,7 @@ public class FusionDownService {
                ShellUtil.zip(zipName,caseOffPath);
                String ossUrl = zipName.replace("/mnt/fusion", "fusion/"+CacheUtil.environment);
                ShellUtil.yunUpload(zipName,ossUrl);
-               ossUrl = queryPath + ossUrl;
+               ossUrl = CacheUtil.queryPath + ossUrl;
                setRedisProcess(fusionId,100,ossUrl);
             }
         }catch (Exception e){
@@ -340,7 +340,7 @@ public class FusionDownService {
                 jsonString = jsonString.replace(key,repMap.get(key));
             }
         }
-        jsonString = jsonString.replaceAll(queryPath,"");
+        jsonString = jsonString.replaceAll(CacheUtil.queryPath,"");
 
         FileUtil.writeString(jsonString, caseOffPath+"/package/"+jsonDataName,"UTF-8");
 
@@ -370,8 +370,6 @@ public class FusionDownService {
 
    @Autowired
     DownService downService;
-   @Autowired
-    UploadToOssUtil uploadToOssUtil;
 
    public void downSwkk(String path,String num,Integer type){
 
@@ -410,22 +408,18 @@ public class FusionDownService {
        }
 
    }
-    @Value("${upload.query-path}")
-    private String queryPath;
-    @Value("${upload.query-path-ss}")
-    private String ssQueryPath;
    public void downZip(Integer type ,String uri,String kkzipPath,String kknumPath,String sszipPath,String ssNumPath){
        try {
            if(type != 2 && type != 5){ //深时点云
                if(uri.contains("?")){
                    uri = uri.split("[?]")[0];
                }
-               ShellUtil.yunDownload(uri.replace(queryPath, ""), kkzipPath);
+               ShellUtil.yunDownload(uri.replace(CacheUtil.queryPath, ""), kkzipPath);
 
                ShellUtil.unZip(kkzipPath,kknumPath);
                ShellUtil.delFile(kkzipPath);
            }else {
-               ShellUtil.yunDownloadSs(uri.replace(ssQueryPath, ""), sszipPath);
+               ShellUtil.yunDownloadSs(uri.replace(CacheUtil.queryPath, ""), sszipPath);
                ShellUtil.unZip(sszipPath,ssNumPath);
                ShellUtil.delFile(sszipPath);
            }
@@ -441,7 +435,7 @@ public class FusionDownService {
             String res = (String) object;
             setRepMap(fusionFilePath,res,repMap);
             log.info("下载模型:{}",res);
-            res = res.replace(queryPath, "");
+            res = res.replace(CacheUtil.queryPath, "");
             if(res.contains(".json") || res.contains(".obj")){
                 res = new File(res).getParentFile().getPath();
             }
@@ -450,7 +444,7 @@ public class FusionDownService {
     }
     public void downModelObj( String modelGlbUrl,String path) {
         log.info("下载模型:{}",modelGlbUrl);
-        modelGlbUrl = modelGlbUrl.replace(queryPath, "");
+        modelGlbUrl = modelGlbUrl.replace(CacheUtil.queryPath, "");
         if(modelGlbUrl.contains(".json") || modelGlbUrl.contains(".obj")){
             modelGlbUrl = new File(modelGlbUrl).getParentFile().getPath();
         }
@@ -470,15 +464,9 @@ public class FusionDownService {
         if(StringUtils.isBlank(url) ){
             return;
         }
-        url = url.replace(queryPath, "");
-        if( !uploadToOssUtil.existKey(url)){
-            log.info("downResource文件不存在:{},{}",url,path);
-            return;
-        }
+        url = url.replace(CacheUtil.queryPath, "");
         ShellUtil.yunDownload(url,path+"/"+url);
     }
 
 
-
-
 }

+ 4 - 3
src/main/java/com/fdkankan/fusion/entity/CaseSettingsResource.java

@@ -28,8 +28,8 @@ public class CaseSettingsResource implements Serializable {
     @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
 
-    @TableField("case_id")
-    private Integer caseId;
+    @TableField("fusion_id")
+    private Integer fusionId;
 
     /**
      * 名称
@@ -60,6 +60,7 @@ public class CaseSettingsResource implements Serializable {
 
     @TableField("scale")
     private Double scale;
-
+    @TableField("scale")
+    private Double rotate;
 
 }

+ 86 - 8
src/main/java/com/fdkankan/fusion/httpClient/FdService.java

@@ -3,32 +3,43 @@ package com.fdkankan.fusion.httpClient;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.date.DateUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.common.util.JwtUtil;
+import com.fdkankan.fusion.common.OssPath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
 import com.fdkankan.fusion.common.util.DateUtils;
 import com.fdkankan.fusion.common.util.RedisKeyUtil;
+import com.fdkankan.fusion.common.util.ZipFileReaderUtil;
+import com.fdkankan.fusion.config.CacheUtil;
+import com.fdkankan.fusion.entity.ScenePlus;
+import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.fdkankan.fusion.entity.TmCamera;
+import com.fdkankan.fusion.entity.User;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.httpClient.client.FdKKClient;
 import com.fdkankan.fusion.httpClient.client.LaserClient;
 import com.fdkankan.fusion.httpClient.client.TakeLookClient;
-import com.fdkankan.fusion.httpClient.request.FdRoomAddParam;
-import com.fdkankan.fusion.httpClient.request.FdkkCameraParam;
-import com.fdkankan.fusion.httpClient.request.FdkkDelNumParam;
-import com.fdkankan.fusion.httpClient.request.LaserSceneParam;
+import com.fdkankan.fusion.httpClient.request.*;
 import com.fdkankan.fusion.httpClient.response.FdRoomVo;
 import com.fdkankan.fusion.httpClient.response.FdkkLoginVo;
 import com.fdkankan.fusion.httpClient.response.FdkkResponse;
 import com.fdkankan.fusion.response.CameraVo;
+import com.fdkankan.fusion.response.UploadSceneCheckVo;
+import com.fdkankan.fusion.service.*;
+import com.fdkankan.fusion.service.impl.UploadService;
 import com.fdkankan.redis.util.RedisUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
 import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
+@Slf4j
 public class FdService {
 
     @Autowired
@@ -39,6 +50,16 @@ public class FdService {
     LaserClient laserClient;
     @Autowired
     TakeLookClient takeLookClient;
+    @Autowired
+    IUserService userService;
+    @Autowired
+    IScenePlusService scenePlusService;
+    @Autowired
+    IScenePlusExtService scenePlusExtService;
+    @Autowired
+    ITmCameraService tmCameraService;
+    @Autowired
+    UploadService uploadService;
 
     public String getFdToken(String fusionToken){
         String jsObj = redisUtil.get(String.format(RedisKeyUtil.fusionLoginToken, fusionToken));
@@ -57,10 +78,6 @@ public class FdService {
         return vo.getFdToken();
     }
 
-    public String getFdTokenByUserName(String userName) {
-        return null;
-    }
-
 
     public FdkkResponse fdkkUnbind(List<TmCamera> cameras) {
         List<Long> cameraIds = cameras.stream().map(TmCamera::getFdCameraId).collect(Collectors.toList());
@@ -153,4 +170,65 @@ public class FdService {
             throw new BusinessException(code,message);
         }
     }
+
+    public void uploadSceneOrig(UploadSceneOrigParamVo paramVo){
+        try {
+            paramVo.setFilePath(paramVo.getFilePath().replace(CacheUtil.queryPath,""));
+            User user = userService.getByUserName(JwtUtil.getUsername(StpUtil.getTokenValue()));
+            paramVo.setUserId(user.getId());
+            ResultData resultData = fdKKClient.uploadSceneOrig(paramVo,getFdToken());
+            if(resultData.getCode() != 0){
+                throw new BusinessException(resultData.getCode(),resultData.getMessage());
+            }
+        }catch (BusinessException e){
+            throw e;
+        }catch (Exception e){
+            log.info("uploadSceneOrig:{}",e);
+            throw new BusinessException(ResultCode.UPLOAD_ERROR);
+        }
+    }
+
+    public UploadSceneCheckVo uploadSceneFile(MultipartFile file) {
+        String ossUrl = uploadService.uploadFile(file, false);
+        String zipPath = null;
+        try {
+            User loginUser = userService.getByUserName(JwtUtil.getUsername(StpUtil.getTokenValue()));
+            zipPath = ossUrl.replace(CacheUtil.queryPath, OssPath.localPath);
+
+            String content = ZipFileReaderUtil.readUtf8(zipPath, "data.fdage");
+            JSONObject jsonObject = JSONObject.parseObject(content);
+            String uuidtime = jsonObject.getString("uuidtime");
+            JSONObject cam = jsonObject.getJSONObject("cam");
+            String sn = cam.getString("uuid");
+            TmCamera bySnCode = tmCameraService.getBySnCode(sn);
+            if(bySnCode == null){
+                throw new BusinessException(ResultCode.UPLOAD_SCENE_ERROR3);
+            }
+            List<ScenePlusExt> exts = scenePlusExtService.getLikeDataSource(uuidtime);
+            if(exts == null || exts.isEmpty()){
+                return new UploadSceneCheckVo(0,"",ossUrl);
+            }
+            for (ScenePlusExt ext : exts) {
+                ScenePlus scenePlus = scenePlusService.getById(ext.getPlusId());
+                if(scenePlus != null && scenePlus.getUserId() != null){
+                    User jyUser = userService.getByUserName(JwtUtil.getUsername(StpUtil.getTokenValue()));
+
+                    if(jyUser != null && !jyUser.getId().equals(loginUser.getId())){
+                        return new UploadSceneCheckVo(ResultCode.UPLOAD_SCENE_ERROR.code,jyUser.getNickName(),ossUrl);
+                    }
+                    if(jyUser != null){
+                        return new UploadSceneCheckVo(ResultCode.UPLOAD_SCENE_ERROR2.code,ResultCode.UPLOAD_SCENE_ERROR2.msg,ossUrl);
+                    }
+                }
+            }
+
+        }catch (Exception e){
+            log.info("upload-scene-error:{}",e);
+        }finally {
+            if(zipPath != null && StringUtils.isNotBlank(zipPath) && new File(zipPath).exists()){
+                new File(zipPath).delete();
+            }
+        }
+        throw new BusinessException(ResultCode.UPLOAD_FILE_OBJ_ERROR);
+    }
 }

+ 9 - 10
src/main/java/com/fdkankan/fusion/httpClient/SignInterceptor.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.dtflys.forest.http.ForestRequest;
 import com.dtflys.forest.interceptor.Interceptor;
 import com.dtflys.forest.reflection.ForestMethod;
-import com.fdkankan.sign.RsaUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -17,17 +16,17 @@ import java.util.Date;
 @Slf4j
 public class SignInterceptor implements Interceptor<JSONObject> {
 
-    @Value("${fusion.sign.publicKey}")
-    public String publicKey;
-    @Value("${fusion.sign.appid}")
-    public String appId;
+//    @Value("${fusion.sign.publicKey}")
+//    public String publicKey;
+//    @Value("${fusion.sign.appid}")
+//    public String appId;
     @Override
     public void onInvokeMethod(ForestRequest request, ForestMethod method, Object[] args) {
-        JSONObject playload = new JSONObject();
-        playload.put("appId", appId);
-        playload.put("timestamp", new Date().getTime());
-        request.addHeader("appId", appId);
-        request.addHeader("sign", RsaUtils.encipher(playload.toJSONString(), publicKey));
+//        JSONObject playload = new JSONObject();
+//        playload.put("appId", appId);
+//        playload.put("timestamp", new Date().getTime());
+//        request.addHeader("appId", appId);
+//        request.addHeader("sign", RsaUtils.encipher(playload.toJSONString(), publicKey));
 
     }
 }

+ 3 - 0
src/main/java/com/fdkankan/fusion/httpClient/client/FdKKClient.java

@@ -111,4 +111,7 @@ public interface FdKKClient {
 
     @Post(value = "/openDevice/realtimedata/getByMacAndModelName",interceptor = SignInterceptor.class)
     ResultData<List<FdModelDeviceLocationVo>> getByMacAndModelName(@JSONBody FdModelParam param);
+
+    @Post(value = "/api/scene/file/jmga/uploadScene",readTimeout = 10* 60* 1000,connectTimeout = 10* 60* 1000)
+    ResultData uploadSceneOrig(@JSONBody UploadSceneOrigParamVo param, @Header("token") String token);
 }

+ 11 - 0
src/main/java/com/fdkankan/fusion/httpClient/request/UploadSceneOrigParamVo.java

@@ -0,0 +1,11 @@
+package com.fdkankan.fusion.httpClient.request;
+
+import lombok.Data;
+
+@Data
+public class UploadSceneOrigParamVo {
+    private String filePath;
+    private Long userId;
+    //资源包类型 orig-原始数据  offline 离线包
+    private String sourceType;
+}

+ 2 - 5
src/main/java/com/fdkankan/fusion/mq/consumer/OsgbToB3dmConsumer.java

@@ -11,6 +11,7 @@ import com.fdkankan.fusion.config.ThreadPoolConfig;
 import com.fdkankan.fusion.entity.CommonUpload;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.service.ICommonUploadService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,10 +34,6 @@ public class OsgbToB3dmConsumer {
 
     @Autowired
     ICommonUploadService commonUploadService;
-    @Value("${upload.query-path}")
-    private String ossUrlPrefix;
-    @Autowired
-    UploadToOssUtil uploadToOssUtil;
     @Autowired
     @Qualifier("taskExecutor")
     private Executor taskExecutor;
@@ -72,7 +69,7 @@ public class OsgbToB3dmConsumer {
                 }
 
                 ShellUtil.yunUpload(sourcePath,dir);
-                String url = ossUrlPrefix + dir + File.separator +jsonFile.getName();
+                String url = CacheUtil.queryPath + dir + File.separator +jsonFile.getName();
                 HashMap<String,String> resultMap = ReadXmlUtil.getLatMap(file);
                 if(resultMap != null && !resultMap.isEmpty()){
                     commonUploadService.updateByPath(uploadId,url,resultMap.get("wgs84"),resultMap.get("gcj02"),resultMap.get("type"));

+ 0 - 29
src/main/java/com/fdkankan/fusion/response/FileInfoVo.java

@@ -1,29 +0,0 @@
-package com.fdkankan.fusion.response;
-
-
-import cn.hutool.core.date.DateUtil;
-import com.fdkankan.fusion.common.util.DateUtils;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-@AllArgsConstructor
-public class FileInfoVo {
-
-    private String MD5;
-    private String SHA1;
-    private Long lastModified;
-    private Long size;
-
-    @Override
-    public String toString() {
-        return
-                "MD5:" + MD5 + '\n' +
-                "SHA1:" + SHA1 + '\n' +
-                "修改时间:" + DateUtil.format(new Date(lastModified),"yyyy-MM-dd HH:mm:ss") +'\n' +
-                "大小:" + size +"字节"
-                ;
-    }
-}

+ 20 - 0
src/main/java/com/fdkankan/fusion/response/UploadSceneCheckVo.java

@@ -0,0 +1,20 @@
+package com.fdkankan.fusion.response;
+
+import com.fdkankan.fusion.common.ResultCode;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class UploadSceneCheckVo {
+    private Integer code;
+    private String data;
+    private String url;
+
+    public UploadSceneCheckVo(ResultCode resultCode) {
+        this.code = resultCode.code;
+        this.data = resultCode.msg;
+    }
+}

+ 2 - 0
src/main/java/com/fdkankan/fusion/service/IScenePlusExtService.java

@@ -19,4 +19,6 @@ public interface IScenePlusExtService extends IService<ScenePlusExt> {
     List<ScenePlusExt> getByPlusIds(List<Long> plusIds);
 
     ScenePlusExt getByPlusId(Long id);
+
+    List<ScenePlusExt> getLikeDataSource(String uuidtime);
 }

+ 2 - 3
src/main/java/com/fdkankan/fusion/service/impl/CameraVersionAppServiceImpl.java

@@ -12,6 +12,7 @@ import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.DateUtils;
 import com.fdkankan.fusion.common.util.FileMd5Util;
 import com.fdkankan.fusion.common.util.ShellUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CameraVersionApp;
 import com.fdkankan.fusion.entity.TmUser;
 import com.fdkankan.fusion.entity.User;
@@ -50,8 +51,6 @@ public class CameraVersionAppServiceImpl extends ServiceImpl<ICameraVersionAppMa
 
     public static String DIR_NAME = "camera_version_app/";
 
-    @Value("${upload.query-path}")
-    private String ossUrlPrefix;
     @Autowired
     IUserService userService;
     @Autowired
@@ -98,7 +97,7 @@ public class CameraVersionAppServiceImpl extends ServiceImpl<ICameraVersionAppMa
             // 上传到阿里云sso
             ShellUtil.yunUpload(filePath,DIR_NAME + fileName);
             log.info("upload success");
-            String url = ossUrlPrefix + DIR_NAME + fileName;
+            String url = CacheUtil.queryPath + DIR_NAME + fileName;
             log.info("upload url: {}" + url);
             User user = userService.getByUserName(userName);
             CameraVersionApp versionEntity = new CameraVersionApp();

+ 2 - 12
src/main/java/com/fdkankan/fusion/service/impl/CameraVersionServiceImpl.java

@@ -1,40 +1,32 @@
 package com.fdkankan.fusion.service.impl;
 
-import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.io.FileUtil;
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fdkankan.fusion.common.FilePath;
-import com.fdkankan.fusion.common.PageInfo;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.DateUtils;
 import com.fdkankan.fusion.common.util.FileMd5Util;
 import com.fdkankan.fusion.common.util.ShellUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CameraVersion;
-import com.fdkankan.fusion.entity.TmUser;
 import com.fdkankan.fusion.entity.User;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.ICameraVersionMapper;
 import com.fdkankan.fusion.request.CameraVersionParam;
-import com.fdkankan.fusion.response.CameraVersionVo;
 import com.fdkankan.fusion.service.ICameraVersionService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fdkankan.fusion.service.ITmUserService;
 import com.fdkankan.fusion.service.IUserService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -52,8 +44,6 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
 
     public static String DIR_NAME = "camera_version/";
 
-    @Value("${upload.query-path}")
-    private String ossUrlPrefix;
     @Autowired
     IUserService userService;
 
@@ -97,7 +87,7 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
             // 上传到阿里云sso
             ShellUtil.yunUpload(filePath,DIR_NAME + fileName);
             log.info("upload success");
-            String url = ossUrlPrefix + DIR_NAME + fileName;
+            String url = CacheUtil.queryPath + DIR_NAME + fileName;
             log.info("upload url: {}" + url);
 
             User user = userService.getByUserName(userName);

+ 0 - 8
src/main/java/com/fdkankan/fusion/service/impl/CaseFilesServiceImpl.java

@@ -2,21 +2,17 @@ package com.fdkankan.fusion.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.fusion.common.ResultCode;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.exception.BusinessException;
-import com.fdkankan.fusion.common.ResultData;
 import com.fdkankan.fusion.entity.CaseFiles;
 import com.fdkankan.fusion.mapper.ICaseFilesMapper;
 import com.fdkankan.fusion.service.ICaseExtractDetailService;
 import com.fdkankan.fusion.service.ICaseFilesService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.fusion.service.ICaseInquestService;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -31,10 +27,6 @@ import java.util.List;
 public class CaseFilesServiceImpl extends ServiceImpl<ICaseFilesMapper, CaseFiles> implements ICaseFilesService {
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
-    @Value("${upload.query-path}")
-    private String queryPath;
-    @Autowired
     ICaseInquestService caseInquestService;
     @Autowired
     ICaseExtractDetailService caseExtractDetailService;

+ 2 - 3
src/main/java/com/fdkankan/fusion/service/impl/CaseImgServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.ShellUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CaseImg;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.ICaseImgMapper;
@@ -76,8 +77,6 @@ public class CaseImgServiceImpl extends ServiceImpl<ICaseImgMapper, CaseImg> imp
         }
     }
 
-    @Value("${upload.query-path}")
-    private String queryPath;
     @Override
     public CaseImg ffmpegImage(MultipartFile[] files, Integer caseId,Integer parentId,List<Integer> imgIds) {
         if(files.length <=0 || caseId == null ){
@@ -127,7 +126,7 @@ public class CaseImgServiceImpl extends ServiceImpl<ICaseImgMapper, CaseImg> imp
                 caseImg = new CaseImg();
             }
             caseImg.setCaseId(caseId);
-            caseImg.setImgUrl(queryPath + outLocalPath.replace("/mnt/",""));
+            caseImg.setImgUrl(CacheUtil.queryPath + outLocalPath.replace("/mnt/",""));
             caseImg.setImgInfo("照片卷");
             caseImg.setType(1);
             this.saveOrUpdate(caseImg);

+ 0 - 6
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -44,12 +44,6 @@ import java.util.stream.Collectors;
 public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntity> implements ICaseNumService {
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
-    @Value("${upload.query-path}")
-    private String queryPath;
-    @Value("${spring.profiles.active}")
-    private String environment;
-    @Autowired
     IModelService modelService;
     @Autowired
     IFusionNumService fusionNumService;

+ 12 - 4
src/main/java/com/fdkankan/fusion/service/impl/CaseOverviewServiceImpl.java

@@ -3,7 +3,6 @@ package com.fdkankan.fusion.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.ResultCode;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.entity.CaseOverview;
 import com.fdkankan.fusion.entity.CaseTabulation;
 import com.fdkankan.fusion.exception.BusinessException;
@@ -11,6 +10,7 @@ import com.fdkankan.fusion.mapper.ICaseOverviewMapper;
 import com.fdkankan.fusion.service.ICaseOverviewService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.fusion.service.ICaseTabulationService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -32,7 +32,7 @@ public class CaseOverviewServiceImpl extends ServiceImpl<ICaseOverviewMapper, Ca
     @Autowired
     ICaseTabulationService caseTabulationService;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Override
     public List<CaseOverview> getByCaseId(Integer caseId) {
@@ -64,12 +64,20 @@ public class CaseOverviewServiceImpl extends ServiceImpl<ICaseOverviewMapper, Ca
     private void delFile(CaseOverview caseOverview) {
         List<CaseOverview> list = this.getByCover(caseOverview.getListCover());
         if(list.isEmpty()){
-            uploadToOssUtil.delete(caseOverview.getListCover());
+            try {
+                fYunFileServiceInterface.deleteFile(caseOverview.getListCover());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
 
         List<CaseOverview> list2 = this.getByCover(caseOverview.getKankanCover());
         if(list2.isEmpty()){
-            uploadToOssUtil.delete(caseOverview.getKankanCover());
+            try {
+                fYunFileServiceInterface.deleteFile(caseOverview.getKankanCover());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
     }
 

+ 8 - 10
src/main/java/com/fdkankan/fusion/service/impl/CaseScriptServiceImpl.java

@@ -5,15 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.ShellUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.common.util.VideoUtil;
-import com.fdkankan.fusion.entity.CaseExtractDetail;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CaseScript;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.ICaseScriptMapper;
-import com.fdkankan.fusion.response.FileInfoVo;
 import com.fdkankan.fusion.service.ICaseScriptService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.fyun.util.FileInfoVo;
 import com.fdkankan.redis.util.RedisUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -54,10 +54,8 @@ public class CaseScriptServiceImpl extends ServiceImpl<ICaseScriptMapper, CaseSc
     }
 
 
-    @Value("${upload.query-path}")
-    private String queryPath;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @Autowired
     RedisUtil redisUtil;
     @Override
@@ -65,10 +63,10 @@ public class CaseScriptServiceImpl extends ServiceImpl<ICaseScriptMapper, CaseSc
         if(StringUtils.isBlank(videoPath) || !videoPath.contains(".")){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        if(!uploadToOssUtil.existKey(videoPath.replace(queryPath,""))){
+        if(!fYunFileServiceInterface.fileExist(videoPath.replace(CacheUtil.queryPath,""))){
             throw new BusinessException(ResultCode.FILE_NOT_EXIST);
         }
-        FileInfoVo fileInfo = uploadToOssUtil.getFileInfo(videoPath.replace(queryPath, ""));
+        FileInfoVo fileInfo = fYunFileServiceInterface.getFileInfo(videoPath.replace(CacheUtil.queryPath, ""));
         String md5 = fileInfo.getMD5();
         String redisKey = "fusion:file:"+md5;
         if(redisUtil.hasKey(redisKey)){
@@ -77,7 +75,7 @@ public class CaseScriptServiceImpl extends ServiceImpl<ICaseScriptMapper, CaseSc
 
         String[] split = videoPath.split("\\.");
         String localPath = FilePath.FFMPEG_IMG_PATH  + File.separator + "."+split[split.length -1];
-        ShellUtil.yunDownload(videoPath.replace(queryPath,""),localPath);
+        ShellUtil.yunDownload(videoPath.replace(CacheUtil.queryPath,""),localPath);
 
         String name = UUID.randomUUID().toString().replace("-","")+".jpg";
         String path = FilePath.FFMPEG_IMG_PATH  + File.separator + name;
@@ -86,7 +84,7 @@ public class CaseScriptServiceImpl extends ServiceImpl<ICaseScriptMapper, CaseSc
 
         FileUtil.del(localPath);
         FileUtil.del(path);
-        String url = queryPath + path.replace("/mnt/","");
+        String url = CacheUtil.queryPath + path.replace("/mnt/","");
         redisUtil.set(redisKey,url);
         return url;
     }

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/impl/CaseSettingsResourceServiceImpl.java

@@ -24,7 +24,7 @@ public class CaseSettingsResourceServiceImpl extends ServiceImpl<ICaseSettingsRe
     @Override
     public List<CaseSettingsResource> getByCaseId(Integer caseId) {
         LambdaQueryWrapper<CaseSettingsResource> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(CaseSettingsResource::getCaseId,caseId);
+        wrapper.eq(CaseSettingsResource::getFusionId,caseId);
         return this.list(wrapper);
     }
 }

+ 17 - 7
src/main/java/com/fdkankan/fusion/service/impl/CaseTabulationServiceImpl.java

@@ -2,17 +2,15 @@ package com.fdkankan.fusion.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.fdkankan.fusion.common.ResultCode;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.entity.CaseFiles;
 import com.fdkankan.fusion.entity.CaseOverview;
 import com.fdkankan.fusion.entity.CaseTabulation;
-import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.ICaseTabulationMapper;
 import com.fdkankan.fusion.service.ICaseFilesService;
 import com.fdkankan.fusion.service.ICaseOverviewService;
 import com.fdkankan.fusion.service.ICaseTabulationService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -36,7 +34,7 @@ public class CaseTabulationServiceImpl extends ServiceImpl<ICaseTabulationMapper
     @Autowired
     ICaseOverviewService caseOverviewService;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Override
     public List<CaseTabulation> getByCaseId(Integer caseId) {
@@ -76,15 +74,27 @@ public class CaseTabulationServiceImpl extends ServiceImpl<ICaseTabulationMapper
     private void delFile(CaseTabulation caseTabulation) {
         List<CaseTabulation> list = this.getByCover(caseTabulation.getListCover());
         if(list.isEmpty()){
-            uploadToOssUtil.delete(caseTabulation.getListCover());
+            try {
+                fYunFileServiceInterface.deleteFile(caseTabulation.getListCover());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
         List<CaseTabulation> list2 = this.getByCover(caseTabulation.getMapUrl());
         if(list2.isEmpty()){
-            uploadToOssUtil.delete(caseTabulation.getMapUrl());
+            try {
+                fYunFileServiceInterface.deleteFile(caseTabulation.getMapUrl());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
         List<CaseTabulation> list3 = this.getByCover(caseTabulation.getCover());
         if(list3.isEmpty()){
-            uploadToOssUtil.delete(caseTabulation.getCover());
+            try {
+                fYunFileServiceInterface.deleteFile(caseTabulation.getCover());
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
     }
 

+ 1 - 6
src/main/java/com/fdkankan/fusion/service/impl/CaseVideoFolderServiceImpl.java

@@ -1,13 +1,12 @@
 package com.fdkankan.fusion.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
-import com.fdkankan.fusion.entity.CaseVideo;
 import com.fdkankan.fusion.entity.CaseVideoFolder;
 import com.fdkankan.fusion.mapper.ICaseVideoFolderMapper;
 import com.fdkankan.fusion.service.ICaseVideoFolderService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.fusion.service.ICaseVideoService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -28,12 +27,8 @@ public class CaseVideoFolderServiceImpl extends ServiceImpl<ICaseVideoFolderMapp
     @Autowired
     ICaseVideoService videoService;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
-    @Autowired
     UploadService uploadService;
 
-    @Value("${upload.query-path}")
-    private String queryPath;
 
     @Override
     public List<CaseVideoFolder> getAllList(Integer caseId) {

+ 12 - 16
src/main/java/com/fdkankan/fusion/service/impl/CaseVideoServiceImpl.java

@@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.util.RedisKeyUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.common.util.VideoUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.CaseEntity;
 import com.fdkankan.fusion.entity.CaseVideoFolder;
 import com.fdkankan.fusion.exception.BusinessException;
@@ -18,21 +18,19 @@ import com.fdkankan.fusion.service.ICaseService;
 import com.fdkankan.fusion.service.ICaseVideoFolderService;
 import com.fdkankan.fusion.service.ICaseVideoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.LinkedHashSet;
 import java.util.List;
-import java.util.concurrent.ThreadPoolExecutor;
 
 /**
  * <p>
@@ -48,15 +46,13 @@ public class CaseVideoServiceImpl extends ServiceImpl<ICaseVideoMapper, CaseVide
 
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @Autowired
     ICaseVideoFolderService videoFolderService;
     @Autowired
     ICaseService caseService;
     @Autowired
     UploadService uploadService;
-    @Value("${upload.query-path}")
-    private String queryPath;
     @Value("${spring.profiles.active}")
     private String environment;
     @Autowired
@@ -122,8 +118,8 @@ public class CaseVideoServiceImpl extends ServiceImpl<ICaseVideoMapper, CaseVide
                 try {
                     String mergeVideoUrl = null;
                     if (StringUtils.isNotBlank(videoFolder.getVideoMergeUrl())) {
-                        mergeVideoUrl = videoFolder.getVideoMergeUrl().replace(queryPath, "/home/");
-                        uploadToOssUtil.downFormAli(videoFolder.getVideoMergeUrl().replace(queryPath, ""), mergeVideoUrl);
+                        mergeVideoUrl = videoFolder.getVideoMergeUrl().replace(CacheUtil.queryPath, "/home/");
+                        fYunFileServiceInterface.downloadFile(videoFolder.getVideoMergeUrl().replace(CacheUtil.queryPath, ""), mergeVideoUrl);
                         ossDelList.add(videoFolder.getVideoMergeUrl());
                     }
                     caseVideoService.deleteByFolderId(videoFolder.getVideoFolderId());
@@ -135,7 +131,7 @@ public class CaseVideoServiceImpl extends ServiceImpl<ICaseVideoMapper, CaseVide
                     }
                     filePathSetAll.addAll(filePathSet);
                     Boolean newCover = true;
-                    if(StringUtils.isNotBlank(videoFolder.getVideoFolderCover()) &&  uploadToOssUtil.existKey(videoFolder.getVideoFolderCover().replace(queryPath,""))){
+                    if(StringUtils.isNotBlank(videoFolder.getVideoFolderCover()) &&  fYunFileServiceInterface.fileExist(videoFolder.getVideoFolderCover().replace(CacheUtil.queryPath,""))){
                         newCover = false;
                     }
                     String mergeLocalName = VideoUtil.mergeVideo(filePathSetAll, String.format(FilePath.VIDEO_LOCAL_PATH,environment),newCover);
@@ -147,8 +143,8 @@ public class CaseVideoServiceImpl extends ServiceImpl<ICaseVideoMapper, CaseVide
                     }
                     mergeLocalPath = String.format(FilePath.VIDEO_LOCAL_PATH,environment) + "/" + mergeLocalName;
                     String ossKey = String.format(FilePath.VIDEO_OSS_PATH,environment, videoFolder.getVideoFolderId()) + "/" + mergeLocalName;
-                    uploadToOssUtil.uploadOss(mergeLocalPath, ossKey);
-                    if (!uploadToOssUtil.existKey(ossKey)) {
+                    fYunFileServiceInterface.uploadFile(mergeLocalPath, ossKey);
+                    if (!fYunFileServiceInterface.fileExist(ossKey)) {
                         updateCaseVideoStatus(videoFolder.getVideoFolderId(), -1);
                         redisUtil.set(RedisKeyUtil.mergerVideoKey + videoFolder.getVideoFolderId(), "-1");
                         return;
@@ -156,18 +152,18 @@ public class CaseVideoServiceImpl extends ServiceImpl<ICaseVideoMapper, CaseVide
                     if(newCover){
                         mergeLocalPathImg = String.format(FilePath.VIDEO_LOCAL_PATH,environment) + "/" + mergeLocalName.replace(".mp4", ".jpg");
                         String ossKeyImg = String.format(FilePath.VIDEO_OSS_PATH, environment,videoFolder.getVideoFolderId()) + "/" + mergeLocalName.replace(".mp4", ".jpg");
-                        uploadToOssUtil.uploadOss(mergeLocalPathImg, ossKeyImg);
-                        if (!uploadToOssUtil.existKey(ossKeyImg)) {
+                        fYunFileServiceInterface.uploadFile(mergeLocalPathImg, ossKeyImg);
+                        if (!fYunFileServiceInterface.fileExist(ossKeyImg)) {
                             updateCaseVideoStatus(videoFolder.getVideoFolderId(), -1);
                             redisUtil.set(RedisKeyUtil.mergerVideoKey + videoFolder.getVideoFolderId(), "-1");
                             return;
                         }
-                        videoFolder.setVideoFolderCover(queryPath + ossKeyImg);
+                        videoFolder.setVideoFolderCover(CacheUtil.queryPath + ossKeyImg);
                     }
 
                     redisUtil.set(RedisKeyUtil.mergerVideoKey + videoFolder.getVideoFolderId(), "70");
 
-                    videoFolder.setVideoMergeUrl(queryPath + ossKey);
+                    videoFolder.setVideoMergeUrl(CacheUtil.queryPath + ossKey);
                     videoFolderService.updateById(videoFolder);
                     updateCaseVideoStatus(videoFolder.getVideoFolderId(), 1);
 

+ 5 - 2
src/main/java/com/fdkankan/fusion/service/impl/CaseViewServiceImpl.java

@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
 @Service
 public class CaseViewServiceImpl extends ServiceImpl<ICaseViewMapper, CaseView> implements ICaseViewService {
 
-   @Value("${oss.small}")
+   @Value("${oss.small: }")
    private String small;
 
     @Override
@@ -65,7 +65,10 @@ public class CaseViewServiceImpl extends ServiceImpl<ICaseViewMapper, CaseView>
             || StringUtils.isEmpty(caseView.getViewPoint())) {
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        String ImageSmall = caseView.getViewImg() +small;
+        String ImageSmall = caseView.getViewImg();
+        if(StringUtils.isNotBlank(small)){
+            ImageSmall =  caseView.getViewImg() +small;
+        }
         caseView.setViewImgSmall(ImageSmall);
         this.save(caseView);
         return caseView;

+ 10 - 12
src/main/java/com/fdkankan/fusion/service/impl/CommonUploadServiceImpl.java

@@ -20,6 +20,7 @@ import com.fdkankan.fusion.service.ICommonUploadService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.fusion.service.IDictFileService;
 import com.fdkankan.fusion.service.IDictService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,10 +53,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
     IDictFileService dictFileService;
 
     @Autowired
-    private UploadToOssUtil uploadToOssUtil;
-
-    @Value("${upload.query-path}")
-    private String ossUrlPrefix;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Autowired
     IDictService dictService;
@@ -94,7 +92,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
             }
             ShellUtil.yunUpload(tempFile.getPath(),ossPath);
 
-            String url = this.ossUrlPrefix + ossPath;
+            String url = CacheUtil.queryPath+ ossPath;
 
             FileTypeEnum fileTypeEnum = FileTypeEnum.getByType(extName.replace(".", ""));
             if(fileTypeEnum == null){
@@ -184,8 +182,8 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
             if("osgb".equals(modelFileFormat)){
                 status =0;
             }
-            url = StringUtils.isNotBlank(url) ?ossUrlPrefix + url:null;
-            sourcePath = StringUtils.isNotBlank(sourcePath) ?ossUrlPrefix + sourcePath:null;
+            url = StringUtils.isNotBlank(url) ?CacheUtil.queryPath + url:null;
+            sourcePath = StringUtils.isNotBlank(sourcePath) ?CacheUtil.queryPath + sourcePath:null;
             CommonUpload commonUpload = commonUploadService.add(oldName,url, String.valueOf(fileSize),
                     null, fileTypeEnum, modelFileFormat,resultFormat,status,unZipFile.getPath(),dictId,sourcePath);
             if("osgb".equals(modelFileFormat)){
@@ -211,7 +209,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
         OBJToGLBUtil.objToGlb2(modelFile.getPath(),localGlbPath);
         String ossPath = unzipPath.replace(OssPath.localPath,"");
         ShellUtil.yunUpload(unzipPath,ossPath);
-        if(!uploadToOssUtil.fileExist(localGlbPath.replace(OssPath.localPath,""))){
+        if(!fYunFileServiceInterface.fileExist(localGlbPath.replace(OssPath.localPath,""))){
             throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
         }
         return    localGlbPath.replace(OssPath.localPath,"");
@@ -224,7 +222,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
         }
         String ossPath = b3dmJsonPath.replace(OssPath.localPath, "");
         uploadOss(unzipPath,modelFile);
-        if(!uploadToOssUtil.fileExist(ossPath)){
+        if(!fYunFileServiceInterface.fileExist(ossPath)){
             throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
         }
         return   ossPath;
@@ -241,7 +239,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
         String ossPath = unzipPath.replace(OssPath.localPath,"");
         String modelOssPath = modelFile.getPath().replace(OssPath.localPath, "");
         ShellUtil.yunUpload(unzipPath,ossPath);
-        if(!uploadToOssUtil.fileExist(modelOssPath)){
+        if(!fYunFileServiceInterface.fileExist(modelOssPath)){
             throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
         }
         return   ossPath;
@@ -251,7 +249,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
         String ossPath = unzipPath.replace(OssPath.localPath,"");
         String modelOssPath = modelFile.getPath().replace(OssPath.localPath, "");
         ShellUtil.yunUpload(unzipPath,ossPath);
-        if(!uploadToOssUtil.existKey(modelOssPath)){
+        if(!fYunFileServiceInterface.fileExist(modelOssPath)){
             throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
         }
         return   modelOssPath;
@@ -261,7 +259,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
         File mntFile = OBJToGLBUtil.lasOrPlyToBin(modelFile);
         String ossPath = mntFile.getPath().replace(OssPath.localPath,"");
         ShellUtil.yunUpload(mntFile.getPath(),ossPath);
-        if(!uploadToOssUtil.existKey(ossPath+"/webcloud/cloud.js")){
+        if(!fYunFileServiceInterface.fileExist(ossPath+"/webcloud/cloud.js")){
             throw new BusinessException(-1,"缺少cloud.js文件");
         }
         return   ossPath + "/webcloud";

+ 7 - 17
src/main/java/com/fdkankan/fusion/service/impl/CopyCaseService.java

@@ -1,22 +1,18 @@
 package com.fdkankan.fusion.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.enums.IdPreEnum;
 import com.fdkankan.fusion.common.util.IdUtils;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.entity.*;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.service.*;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.math3.ode.ODEIntegrator;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 
 @Service
@@ -78,9 +74,8 @@ public class CopyCaseService {
     @Autowired
     ICaseFusionRelationService caseFusionRelationService;
 
-
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
 
     public void copyCase(Integer oldCaseId){
@@ -92,7 +87,6 @@ public class CopyCaseService {
         this.cpCaseInquest(oldCaseId,newCaseId);
         this.cpCaseNum(oldCaseId,newCaseId);
         this.cpCaseSettings(oldCaseId,newCaseId);
-        this.cpCaseSettingsResource(oldCaseId,newCaseId);
         this.cpCaseVideo(oldCaseId,newCaseId);
         this.cpCaseViewByCaseId(oldCaseId,newCaseId);
         this.cpFusionGuide(oldCaseId,newCaseId);
@@ -329,7 +323,7 @@ public class CopyCaseService {
         }
         for (CaseSettingsResource entity : listByCaseId) {
             entity.setId(null);
-            entity.setCaseId(newCaseId);
+            entity.setFusionId(newCaseId);
             caseSettingsResourceService.save(entity);
         }
     }
@@ -390,21 +384,17 @@ public class CopyCaseService {
 
             Integer newFolderId = entity.getVideoFolderId();
             if(StringUtils.isNotBlank(entity.getVideoFolderCover())){
-                String oldVideoFolderCoverOssPath = uploadToOssUtil.getOssPath(entity.getVideoFolderCover());
                 String newVideoFolderCover= entity.getVideoFolderCover().replace(oldFolderId+"",newFolderId+"");
-                String newVideoFolderCoverOssPath = uploadToOssUtil.getOssPath(newVideoFolderCover);
-                uploadToOssUtil.copyFile(oldVideoFolderCoverOssPath,newVideoFolderCoverOssPath);
-                if(uploadToOssUtil.existKey(newVideoFolderCoverOssPath)){
+                fYunFileServiceInterface.copyFileInBucket(entity.getVideoFolderCover(),newVideoFolderCover);
+                if(fYunFileServiceInterface.fileExist(newVideoFolderCover)){
                     entity.setVideoFolderCover(newVideoFolderCover);
                 }
             }
 
             if(StringUtils.isNotBlank(entity.getVideoMergeUrl())){
                 String newVideoMergeUrl = entity.getVideoMergeUrl().replace(oldFolderId+"",newFolderId+"");
-                String oldVideoMergeUrlOssPath = uploadToOssUtil.getOssPath(entity.getVideoMergeUrl());
-                String newVideoMergeUrlOssPath = uploadToOssUtil.getOssPath(newVideoMergeUrl);
-                uploadToOssUtil.copyFile(oldVideoMergeUrlOssPath,newVideoMergeUrlOssPath);
-                if(uploadToOssUtil.existKey(newVideoMergeUrlOssPath)){
+                fYunFileServiceInterface.copyFileInBucket(entity.getVideoMergeUrl(),newVideoMergeUrl);
+                if(fYunFileServiceInterface.fileExist(newVideoMergeUrl)){
                     entity.setVideoMergeUrl(newVideoMergeUrl);
                 }
             }

+ 13 - 13
src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java

@@ -17,6 +17,7 @@ import com.fdkankan.fusion.common.PageInfo;
 import com.fdkankan.fusion.common.util.*;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.*;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.IModelMapper;
@@ -24,6 +25,7 @@ import com.fdkankan.fusion.request.ModelPram;
 import com.fdkankan.fusion.response.SceneVo;
 import com.fdkankan.fusion.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -49,7 +51,7 @@ import org.springframework.web.multipart.MultipartFile;
 public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implements IModelService {
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @Autowired
     UploadService uploadService;
     @Autowired
@@ -69,8 +71,6 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
     @Autowired
     ThreadService threadService;
 
-    @Value("${upload.query-path}")
-    private String queryPath;
     @Value("${spring.profiles.active}")
     private String environment;
 
@@ -263,11 +263,11 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
         if(isObj == 1){           //看看,看见
             String mesh3DtilesPath  = String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles/tileset.json";
             String sizePath = String.format(FilePath.OBJ_OSS_PATH,num) + "/images/3dtiles";
-            if(uploadToOssUtil.existKey(mesh3DtilesPath)){
+            if(fYunFileServiceInterface.fileExist(mesh3DtilesPath)){
                 model.setModelDateType("b3dm");
                 model.setModelType("b3dm");
-                model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(queryPath +mesh3DtilesPath)));
-                model.setModelSize(FileWriterUtil.setFileSize(uploadToOssUtil.getSize( sizePath)));
+                model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath +mesh3DtilesPath)));
+                model.setModelSize(FileWriterUtil.setFileSize(fYunFileServiceInterface.getSpace("4dkankan", sizePath)));
             }else {
                 model.setModelObjUrl(String.format(FilePath.OBJ_LOCAL_PATH,environment ,num) +"/mesh.obj");
                 model.setModelGlbUrl(getGlbUrl(type,num,model));
@@ -365,9 +365,9 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
         JSONArray jsonArray = JSONArray.parseArray(modelGlbUrl);
         for (Object object : jsonArray) {
             String ossUrl = (String) object;
-            String oldOssPath = ossUrl.replaceAll(queryPath,"");
+            String oldOssPath = ossUrl.replaceAll(CacheUtil.queryPath,"");
             String newOssPath = oldOssPath.replaceAll(oldModelId+"",newModelId+"");
-            uploadToOssUtil.copyFile(oldOssPath,newOssPath);
+            fYunFileServiceInterface.copyFileInBucket(oldOssPath,newOssPath);
         }
     }
 
@@ -390,16 +390,16 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
             if(localGlbPaths.size() >0){
                 for (String localGlbPath : localGlbPaths) {
                     String ossGlbPath = localGlbPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/");
-                    uploadToOssUtil.uploadOss(localGlbPath,ossGlbPath);
+                    fYunFileServiceInterface.uploadFile(localGlbPath,ossGlbPath);
                     if(ossGlbPath.contains("lod_")){
                         if(ossGlbPath.contains("lod_0")){
-                            ossGlbPaths.add(queryPath  +ossGlbPath);
-                            modelSize +=  uploadToOssUtil.getSize(ossGlbPath);
+                            ossGlbPaths.add(CacheUtil.queryPath  +ossGlbPath);
+                            modelSize +=  fYunFileServiceInterface.getSpace("4dkankan",ossGlbPath);
                         }
                         continue;
                     }
-                    modelSize +=  uploadToOssUtil.getSize(ossGlbPath);
-                    ossGlbPaths.add(queryPath +ossGlbPath);
+                    modelSize +=  fYunFileServiceInterface.getSpace("4dkankan",ossGlbPath);
+                    ossGlbPaths.add(CacheUtil.queryPath +ossGlbPath);
                 }
                 model.setModelSize(FileWriterUtil.setFileSize(modelSize));
 

+ 7 - 0
src/main/java/com/fdkankan/fusion/service/impl/ScenePlusExtServiceImpl.java

@@ -44,4 +44,11 @@ public class ScenePlusExtServiceImpl extends ServiceImpl<IScenePlusExtMapper, Sc
         }
         return list.get(0);
     }
+
+    @Override
+    public List<ScenePlusExt> getLikeDataSource(String uuidtime) {
+        LambdaQueryWrapper<ScenePlusExt> wrapper = new LambdaQueryWrapper<>();
+        wrapper.like(ScenePlusExt::getDataSource,uuidtime);
+        return this.list(wrapper);
+    }
 }

+ 11 - 11
src/main/java/com/fdkankan/fusion/service/impl/ThreadService.java

@@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.util.*;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.Model;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.service.IModelService;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.redis.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.FileUtils;
@@ -31,12 +33,10 @@ public class ThreadService {
     @Autowired
     IModelService modelService;
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
 
     @Value("${spring.profiles.active}")
     private String environment;
-    @Value("${upload.query-path}")
-    private String queryPath;
 
 
     @Async
@@ -110,7 +110,7 @@ public class ThreadService {
                 model.setModelType("obj");
                 redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
                 ShellUtil.yunUpload(objPathFile.getPath(),ossPath);
-                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath +  file1.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
+                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath +  file1.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
 
             }
             if(name.contains(".ply")){
@@ -128,8 +128,8 @@ public class ThreadService {
                 redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"65");
                 ShellUtil.yunUpload(mntFile.getPath(),ossPath);
 
-                model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(queryPath  +ossPath +"/webcloud")));
-                if(!uploadToOssUtil.existKey(ossPath+"/webcloud/cloud.js")){
+                model.setModelGlbUrl(JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath  +ossPath +"/webcloud")));
+                if(!fYunFileServiceInterface.fileExist(ossPath+"/webcloud/cloud.js")){
                     throw new BusinessException(-1,"缺少cloud.js文件");
                 }
             }
@@ -152,7 +152,7 @@ public class ThreadService {
                 File file2 = new File(replace);
                 ShellUtil.yunUpload(localPath,file2.getParent());
                 ShellUtil.yunUpload(objPathFile.getPath(),objPathFile.getPath().replace("/mnt/",""));
-                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath +  replace))));
+                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath +  replace))));
             }
 
             if(name.contains(".b3dm") && b3dmJsonPath != null){
@@ -160,16 +160,16 @@ public class ThreadService {
                 model.setModelType("b3dm");
                 redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"60");
                 ShellUtil.yunUpload(objPathFile.getPath(),b3dmPath);
-                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath +  b3dmJsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
+                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath +  b3dmJsonPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/")))));
             }
             if(name.contains(".laz")){
                 model.setModelDateType("laz");
                 model.setModelType("laz");
                 redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"65");
                 ShellUtil.yunUpload(objPathFile.getPath(),objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/"));
-                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(queryPath +  objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/") ))));
+                model.setModelGlbUrl((JSONArray.toJSONString(Arrays.asList(CacheUtil.queryPath +  objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/") ))));
             }
-            model.setFileNewName(queryPath + objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/") +"/" + fileName);
+            model.setFileNewName(CacheUtil.queryPath + objPathFile.getPath().replace(FilePath.LOCAL_BASE_PATH,"fusion/") +"/" + fileName);
             setCreateStatus(model,1);
             modelService.saveOrUpdate(model);
             redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"100");
@@ -224,7 +224,7 @@ public class ThreadService {
             for (String localGlbPath : localGlbPaths) {
                 String ossPath = localGlbPath.replace("/mnt/","");
                 ShellUtil.yunUpload(localGlbPath,ossPath);
-                ossGlbPaths.add(queryPath +ossPath+"/tileset.json");
+                ossGlbPaths.add(CacheUtil.queryPath +ossPath+"/tileset.json");
             }
             log.info("转换完成修改数据库:{}:{}:{}",ossGlbPaths,num,type);
             String ossGlbPath =  JSONArray.toJSONString(ossGlbPaths);

+ 27 - 35
src/main/java/com/fdkankan/fusion/service/impl/UploadService.java

@@ -1,33 +1,31 @@
 package com.fdkankan.fusion.service.impl;
 
 import com.fdkankan.fusion.common.FilePath;
+import com.fdkankan.fusion.common.OssPath;
 import com.fdkankan.fusion.common.ResultCode;
-import com.fdkankan.fusion.common.util.ShellUtil;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
-import com.fdkankan.fusion.common.util.VideoUtil;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.exception.BusinessException;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
-import sun.rmi.runtime.Log;
 
 import javax.annotation.Resource;
 import java.io.File;
-import java.io.IOException;
 import java.net.URLEncoder;
-import java.util.LinkedHashSet;
 import java.util.UUID;
 
 @Service
 @Slf4j
 public class UploadService {
 
-    @Resource
-    private UploadToOssUtil uploadToOssUtil;
+    @Autowired
+    FYunFileServiceInterface fYunFileServiceInterface;
 
-    @Value("${upload.query-path}")
+    @Value("${fyun.host}")
     private String queryPath;
     @Value("${spring.profiles.active}")
     private String environment;
@@ -67,7 +65,7 @@ public class UploadService {
         }
         return null;
     }
-    public String uploadFile(MultipartFile file, boolean newName, String filePathAdd) {
+    public String uploadFile(MultipartFile file, Boolean isDelete) {
         if(file.isEmpty()){
             throw new BusinessException(ResultCode.UPLOAD_FILE_NO_EXIST);
         }
@@ -79,43 +77,37 @@ public class UploadService {
         if(StringUtils.isEmpty(fileName)){
             throw new BusinessException(ResultCode.UPLOAD_FILE_NO_EXIST);
         }
-        File localFile = null;
+        File  tempFile = null;
         try {
-            //获取文件后缀名
-            String suffixName = fileName.substring(fileName.lastIndexOf("."));
-            //重新生成文件名
-            if(newName){
-                fileName = UUID.randomUUID().toString().replace("-","") ;
-            }else {
-                fileName= fileName.substring(0,fileName.lastIndexOf("."));
-            }
-            if(fileName.length() >50){
-                fileName =  fileName.substring(0,50);
-            }
-            localFile = File.createTempFile(fileName + suffixName,suffixName);
-            file.transferTo(localFile);
-            String path = localFile.getPath();
-            uploadToOssUtil.uploadOss(path,filePathAdd+ fileName + suffixName);
-            if(!uploadToOssUtil.existKey(filePathAdd + fileName + suffixName)){
-                throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
-            }
+            String uuid = UUID.randomUUID().toString();
+            String originalFilename = file.getOriginalFilename();
+
+            String extName = originalFilename.substring(originalFilename.lastIndexOf("."));
+            String ossPath = String.format(OssPath.MANAGE_FILE_PATH, uuid + extName);
 
-            return queryPath +filePathAdd+ URLEncoder.encode(fileName,"utf-8").replace("+", "%20") + suffixName;
+            tempFile = new File(OssPath.localPath + ossPath);
+            if(!tempFile.getParentFile().exists()){
+                tempFile.mkdirs();
+            }
+            file.transferTo(tempFile);
+            fYunFileServiceInterface.uploadFile(tempFile.getPath(), ossPath);
+            return CacheUtil.queryPath + ossPath;
         }catch (Exception e){
-            log.info("upload-error:{}",e);
-            throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
+            log.info("upload-file-error:{}",e);
+            throw new BusinessException(ResultCode.UPLOAD_ERROR);
         }finally {
-            if(localFile!=null){
-                localFile.delete();
+            if(isDelete && tempFile != null){
+                tempFile.delete();
             }
         }
 
+
     }
 
     public void deleteOssUrl(String path) {
         try {
             String replace = path.replace(queryPath, "");
-            uploadToOssUtil.delete(replace);
+            fYunFileServiceInterface.deleteFile(replace);
         }catch (Exception e){
             e.printStackTrace();
         }

+ 0 - 183
src/main/java/com/fdkankan/fusion/task/TaskService.java

@@ -70,189 +70,6 @@ public class TaskService {
             }
         }
 
-        updateFusion();
-        updateCaseSetting();
-        updateHotIcon();
-        updateCaseTag();
-        updateGuide();
-        updatePath();
-        updateAnimation();
-        updateImg();
-        updateImgTag();
-    }
-
-    private void updateImg() {
-        LambdaQueryWrapper<CaseImg> wrapper = new LambdaQueryWrapper<>();
-        wrapper.isNull(CaseImg::getParentId);
-        wrapper.eq(CaseImg::getType,0);
-        List<CaseImg> list = caseImgService.list();
-        if(list.isEmpty()){
-            return;
-        }
-        for (CaseImg caseImg : list) {
-            List<CaseImg> caseImgList = caseImgService.getByCaseId(caseImg.getCaseId(), 1);
-            if(caseImgList.isEmpty()){
-                continue;
-            }
-            CaseImg parent = caseImgList.get(0);
-            caseImg.setParentId(parent.getId());
-            caseImgService.updateById(caseImg);
-        }
-
-    }
-
-    private void updateImgTag() {
-
-        LambdaQueryWrapper<CaseImgTag> wrapper = new LambdaQueryWrapper<>();
-        wrapper.isNull(CaseImgTag::getImgId);
-        List<CaseImgTag> list2 = caseImgTagService.list(wrapper);
-        if(list2.isEmpty()){
-            return;
-        }
-        for (CaseImgTag caseImgTag : list2) {
-            List<CaseImg> caseImgList = caseImgService.getByCaseId(caseImgTag.getCaseId(), 1);
-            if(caseImgList.isEmpty()){
-                continue;
-            }
-            CaseImg caseImg = caseImgList.get(0);
-            caseImgTag.setImgId(caseImg.getId());
-            caseImgTagService.updateById(caseImgTag);
-        }
-    }
-
-    private void updateFusion(){
-        List<CaseFusion> list = caseFusionService.list();
-        List<CaseFusion> collect = list.stream().filter(e -> e.getSysUserId() == null).collect(Collectors.toList());
-        for (CaseFusion caseFusion : collect) {
-            CaseEntity caseEntity = caseService.getById(caseFusion.getCaseId());
-            if(caseEntity != null){
-                caseFusion.setFusionTitle(caseEntity.getCaseTitle());
-                caseFusion.setLatAndLong(caseEntity.getLatAndLong());
-                TmUser tmUser = tmUserService.getByUserName(caseEntity.getUserName());
-                if(tmUser != null){
-                    caseFusion.setSysUserId(tmUser.getId());
-                }
-                caseFusionService.updateById(caseFusion);
-            }
-        }
-        List<CaseFusion> collect1 = list.stream().filter(e -> e.getCaseId() != null).collect(Collectors.toList());
-        for (CaseFusion caseFusion : collect1) {
-            List<CaseFusionRelation> caseFusionRelations = caseFusionRelationService.getByCaseId(caseFusion.getCaseId());
-            if(caseFusionRelations == null || caseFusionRelations.isEmpty()){
-                CaseFusionRelation caseFusionRelation = new CaseFusionRelation();
-                caseFusionRelation.setCaseId(caseFusion.getCaseId());
-                caseFusionRelation.setFusionId(caseFusion.getFusionId());
-                caseFusionRelationService.save(caseFusionRelation);
-            }
-            LambdaUpdateWrapper<CaseFusion> wrapper = new LambdaUpdateWrapper<>();
-            wrapper.eq(CaseFusion::getFusionId,caseFusion.getFusionId());
-            wrapper.set(CaseFusion::getCaseId,null);
-            caseFusionService.update(wrapper);
-        }
-    }
-
-    @Autowired
-    ICaseFilesTypeService caseFilesTypeService;
-    @Autowired
-    IHotIconService hotIconService;
-    @Autowired
-    IDictService dictService;
-    @Autowired
-    ICommonUploadService commonUploadService;
-    @Autowired
-    IDictFileService dictFileService;
-
-
-    private void updateCaseSetting() {
-        List<CaseSettings> list = caseSettingsService.list();
-        List<CaseSettings> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (CaseSettings caseSettings : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(caseSettings.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<CaseSettings> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(CaseSettings::getSettingsId,caseSettings.getSettingsId());
-                wrapper.set(CaseSettings::getFusionId,listByCaseId.get(0).getFusionId());
-                caseSettingsService.update(wrapper);
-            }
-        }
-    }
-
-    private void updateHotIcon() {
-        List<HotIcon> list = hotIconService.list();
-        List<HotIcon> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (HotIcon entity : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(entity.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<HotIcon> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(HotIcon::getIconId,entity.getIconId());
-                wrapper.set(HotIcon::getFusionId,listByCaseId.get(0).getFusionId());
-                hotIconService.update(wrapper);
-            }
-        }
-    }
-    @Autowired
-    ICaseTagService caseTagService;
-    private void updateCaseTag() {
-        List<CaseTag> list = caseTagService.list();
-        List<CaseTag> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (CaseTag entity : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(entity.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<CaseTag> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(CaseTag::getTagId,entity.getTagId());
-                wrapper.set(CaseTag::getFusionId,listByCaseId.get(0).getFusionId());
-                caseTagService.update(wrapper);
-            }
-        }
-    }
-
-    @Autowired
-    IFusionGuideService fusionGuideService;
-    private void updateGuide() {
-        List<FusionGuide> list = fusionGuideService.list();
-        List<FusionGuide> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (FusionGuide entity : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(entity.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<FusionGuide> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(FusionGuide::getFusionGuideId,entity.getFusionGuideId());
-                wrapper.set(FusionGuide::getFusionId,listByCaseId.get(0).getFusionId());
-                fusionGuideService.update(wrapper);
-            }
-        }
-    }
-
-
-    @Autowired
-    ICasePathService casePathService;
-    private void updatePath() {
-        List<CasePath> list = casePathService.list();
-        List<CasePath> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (CasePath entity : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(entity.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<CasePath> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(CasePath::getId,entity.getId());
-                wrapper.set(CasePath::getFusionId,listByCaseId.get(0).getFusionId());
-                casePathService.update(wrapper);
-            }
-        }
-    }
-
-    @Autowired
-    ICaseAnimationService caseAnimationService;
-    private void updateAnimation() {
-        List<CaseAnimation> list = caseAnimationService.list();
-        List<CaseAnimation> collect = list.stream().filter(e -> e.getFusionId() == null).collect(Collectors.toList());
-        for (CaseAnimation entity : collect) {
-            List<CaseFusion> listByCaseId = caseFusionService.getListByCaseId(entity.getCaseId());
-            if(!listByCaseId.isEmpty()){
-                LambdaUpdateWrapper<CaseAnimation> wrapper = new LambdaUpdateWrapper<>();
-                wrapper.eq(CaseAnimation::getId,entity.getId());
-                wrapper.set(CaseAnimation::getFusionId,listByCaseId.get(0).getFusionId());
-                caseAnimationService.update(wrapper);
-            }
-        }
     }
 
 }

+ 6 - 9
src/main/java/com/fdkankan/fusion/task/TimeTaskService.java

@@ -2,17 +2,14 @@ package com.fdkankan.fusion.task;
 
 import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.date.DateUtil;
-import com.fdkankan.fusion.common.util.DateUtils;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
-import com.fdkankan.fusion.config.CacheUtil;
-import com.fdkankan.fusion.response.FileInfoVo;
+import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.fyun.util.FileInfoVo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.PostConstruct;
 import java.util.Date;
 import java.util.List;
 
@@ -21,7 +18,7 @@ import java.util.List;
 public class TimeTaskService {
 
     @Autowired
-    UploadToOssUtil uploadToOssUtil;
+    FYunFileServiceInterface fYunFileServiceInterface;
     @Value("${spring.profiles.active}")
     private String environment;
 
@@ -37,14 +34,14 @@ public class TimeTaskService {
         String path = "fusion/" +environment+ "/offline";
         log.info("开始执行清除离线包:{}",path);
         try {
-            List<String> list = uploadToOssUtil.listKeysFromAli(path);
+            List<String> list = fYunFileServiceInterface.listRemoteFiles(path);
             for (String key : list) {
-                FileInfoVo fileInfo = uploadToOssUtil.getFileInfo(key);
+                FileInfoVo fileInfo = fYunFileServiceInterface.getFileInfo(key);
                 Long lastModified = fileInfo.getLastModified();
                 long between = DateUtil.between(new Date(lastModified), new Date(), DateUnit.DAY);
                 if(between >7){
                     log.info("删除文件->{},info:{}",key,lastModified);
-                    uploadToOssUtil.delete(key);
+                    fYunFileServiceInterface.deleteFile(key);
                 }
             }
         }catch (Exception e){

+ 0 - 54
src/main/resources/application-dev.yaml

@@ -1,54 +0,0 @@
-spring:
-  datasource:
-    type: com.zaxxer.hikari.HikariDataSource          # 数据源类型:HikariCP
-    driver-class-name: com.mysql.jdbc.Driver          # mysql驱动
-    url: jdbc:mysql://127.0.0.1:13306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-    username: root
-    password: 4dkk2020cuikuan%
-    hikari:
-      connection-timeout: 30000         # 等待连接池分配连接的最大时长(毫秒),超过这个时长还没可用的连接则发生SQLException, 默认:30秒
-      minimum-idle: 5                   # 最小连接数
-      maximum-pool-size: 20             # 最大连接数
-      auto-commit: true                 # 事务自动提交
-      idle-timeout: 600000              # 连接超时的最大时长(毫秒),超时则被释放(retired),默认:10分钟
-      pool-name: DateSourceHikariCP     # 连接池名字
-      max-lifetime: 1800000             # 连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认:30分钟 1800000ms
-      connection-test-query: SELECT 1   # 连接测试语句
-  redis:
-    host: 120.25.146.52
-    port: 6379
-    timeout: 6000ms
-    password:
-    jedis:
-      pool:
-        max-active: 10  #连接池最大连接数(使用负值表示没有限制)
-        max-idle: 10 # 连接池中的最大空闲连接
-        min-idle: 5 # 连接池中的最小空闲连接
-        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
-    lettuce:
-      shutdown-timeout: 0ms
-
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: http://uat-laser.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: http://test.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: http://v4-test.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: http://test.4dkankan.com/qjkankan
-    port: 80
-  takeLookService:
-    basePath: https://v4-test.4dkankan.com
-    port: 80

+ 0 - 62
src/main/resources/application-local.yaml

@@ -1,62 +0,0 @@
-spring:
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    #120.25.146.52
-    dynamic:
-      primary: db1
-      strict: false
-      datasource:
-        db1:
-          driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://120.25.146.52:13306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: JK123456%JIK
-        db2:
-          driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://120.24.144.164:3306/4dkankan_v4?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: 4Dage@4Dage#@168
-
-  redis:
-    host: 120.24.144.164
-    port: 6379
-    timeout: 6000ms
-    password: bgh0cae240
-    jedis:
-      pool:
-        max-active: 10  #连接池最大连接数(使用负值表示没有限制)
-        max-idle: 10 # 连接池中的最大空闲连接
-        min-idle: 5 # 连接池中的最小空闲连接
-        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
-    lettuce:
-      shutdown-timeout: 0ms
-
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: http://uat-laser.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: http://test.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: http://v4-test.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: http://test.4dkankan.com/qjkankan
-  takeLookService:
-    basePath: https://v4-test.4dkankan.com
-    port: 80
-
-
-fusion:
-  sign:
-    appid: 051de32597041e41f73b97d61c67a13b
-    publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9/sgajow5p92r8pubsD0GS8Mcp3m999zWd3Ozlut2lZn6WixukwKHLquGbtW5ZKPdUoHC5czO9508neOgex7f4tacXUDs2Yh+c5GmxN4IRCLN7QC5U/LszJcQimS0Eo0ZBySU6+Rrt7DujIrn6cnMIjhLBFxjBUUI5yqlQDC38wIDAQAB

+ 0 - 60
src/main/resources/application-localprod.yaml

@@ -1,60 +0,0 @@
-spring:
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    #120.25.146.52
-    dynamic:
-      primary: db1
-      strict: false
-      datasource:
-        db1:
-          driver-class-name: com.mysql.jdbc.Driver
-          #url: jdbc:mysql://172.20.0.5:3306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          url: jdbc:mysql://120.79.248.148:3306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: fusion
-          password: 3oo19bgh0cae2406
-        db2:
-          driver-class-name: com.mysql.jdbc.Driver
-          #url: jdbc:mysql://rm-wz90w10465iiwwv09.mysql.rds.aliyuncs.com:3306/4dkankan_v4_prod?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          url: jdbc:mysql://rm-wz90w10465iiwwv098o.mysql.rds.aliyuncs.com:3306/4dkankan_v4_prod?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: D2719bd0cae1a005
-  redis:
-    #host: r-wz9owsphxqwi4ztqlf.redis.rds.aliyuncs.com   #官网正式环境
-    host: r-wz9owsphxqwi4ztqlfpd.redis.rds.aliyuncs.com   #官网正式环境
-    port: 6379
-    timeout: 6000ms
-    password: 3oo19bgh0cae2406&
-    jedis:
-      pool:
-        max-active: 10  #连接池最大连接数(使用负值表示没有限制)
-        max-idle: 10 # 连接池中的最大空闲连接
-        min-idle: 5 # 连接池中的最小空闲连接
-        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
-    lettuce:
-      shutdown-timeout: 0ms
-
-
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: https://laser.4dkankan.com/backend
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: https://www.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: https://www.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: https://test.4dkankan.com/qjkankan
-    port: 80
-  takeLookService:
-    basePath: https://www.4dkankan.com
-    port: 80

+ 0 - 62
src/main/resources/application-prod.yaml

@@ -1,62 +0,0 @@
-spring:
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    #120.25.146.52
-    dynamic:
-      primary: db1
-      strict: false
-      datasource:
-        db1:
-          driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://172.20.0.5:3306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: fusion
-          password: 3oo19bgh0cae2406
-        db2:
-          driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://rm-wz90w10465iiwwv09.mysql.rds.aliyuncs.com:3306/4dkankan_v4_prod?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: D2719bd0cae1a005
-  redis:
-    host: r-wz9owsphxqwi4ztqlf.redis.rds.aliyuncs.com   #官网正式环境
-    port: 6379
-    timeout: 6000ms
-    password: 3oo19bgh0cae2406&
-    jedis:
-      pool:
-        max-active: 10  #连接池最大连接数(使用负值表示没有限制)
-        max-idle: 10 # 连接池中的最大空闲连接
-        min-idle: 5 # 连接池中的最小空闲连接
-        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
-    lettuce:
-      shutdown-timeout: 0ms
-
-
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: https://laser.4dkankan.com/backend
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: https://www.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: https://www.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: https://test.4dkankan.com/qjkankan
-    port: 80
-  takeLookService:
-    basePath: https://www.4dkankan.com
-    port: 80
-
-fusion:
-  sign:
-    appid: 051de32597041e41f73b97d61c67a13b
-    publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUXIPwcWay3Rct4xfD/JEZoOExhO+5HIGgKbdgjNFvx3gAPD79gfPPZxM8vuZNc+dCDj2SiY93bMxYjI4PjavqgwSUcbtr4wNjt3tXHrJWOqYrQg4nVFJK0AmF7ARwHztId2v5URLZ6pdpHFOl1BOxUQ2lFD9br1csB+mo9YZIAwIDAQAB

+ 0 - 63
src/main/resources/application-test.yaml

@@ -1,63 +0,0 @@
-spring:
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    #120.25.146.52
-    dynamic:
-      primary: db1
-      strict: false
-      datasource:
-        db1:
-          driver-class-name: com.mysql.jdbc.Driver
-          #url: jdbc:mysql://120.25.146.52:13306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          url: jdbc:mysql://127.0.0.1:13306/fd_fusion?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: JK123456%JIK
-        db2:
-          driver-class-name: com.mysql.jdbc.Driver
-          url: jdbc:mysql://172.18.156.39:3306/4dkankan_v4?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-          username: root
-          password: 4Dage@4Dage#@168
-
-  redis:
-    host: 172.18.156.39
-    port: 6379
-    timeout: 6000ms
-    password: bgh0cae240
-    jedis:
-      pool:
-        max-active: 10  #连接池最大连接数(使用负值表示没有限制)
-        max-idle: 10 # 连接池中的最大空闲连接
-        min-idle: 5 # 连接池中的最小空闲连接
-        max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
-    lettuce:
-      shutdown-timeout: 0ms
-
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: https://uat-laser.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: https://test.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: https://v4-test.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: https://test.4dkankan.com/qjkankan
-  takeLookService:
-    basePath: https://v4-test.4dkankan.com
-    port: 80
-
-
-fusion:
-  sign:
-    appid: 051de32597041e41f73b97d61c67a13b
-    publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9/sgajow5p92r8pubsD0GS8Mcp3m999zWd3Ozlut2lZn6WixukwKHLquGbtW5ZKPdUoHC5czO9508neOgex7f4tacXUDs2Yh+c5GmxN4IRCLN7QC5U/LszJcQimS0Eo0ZBySU6+Rrt7DujIrn6cnMIjhLBFxjBUUI5yqlQDC38wIDAQAB

+ 0 - 81
src/main/resources/application.yaml

@@ -1,81 +0,0 @@
-spring:
-  profiles:
-    active: ${activeProfile:local}
-  servlet:
-    multipart:
-      max-file-size: -1
-      maxRequestSize: -1
-
-server:
-  port: 8808
-  servlet:
-    context-path: /fusion
-  tomcat:
-    max-http-form-post-size: -1
-
-
-
-logging:
-  config: classpath:logback-spring.xml
-  path: /home/backend/4dkankan_v4
-
-mybatis-plus:
-  configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
-
-
-
-forest:
-  ## 日志总开关,打开/关闭Forest请求/响应日志(默认为 true)
-  log-enabled: true
-  ## 打开/关闭Forest请求日志(默认为 true)
-  log-request: true
-  ## 打开/关闭Forest响应状态日志(默认为 true)
-  log-response-status: true
-  ## 打开/关闭Forest响应内容日志(默认为 false)
-  log-response-content: true
-  ## 请求超时时间,单位为毫秒, 默认值为3000
-  timeout: 10000
-  ## 连接超时时间,单位为毫秒, 默认值为2000
-  connect-timeout: 10000
-
-upload:
-  type: oss
-  query-path: https://4dkk.4dage.com/
-  query-path-ss: https://laser-oss.4dkankan.com/
-oss:
-  #point: http://oss-cn-shenzhen-internal.aliyuncs.com
-  point: http://oss-cn-shenzhen-internal.aliyuncs.com
-  key: LTAI5tJwboCj3r4vUNkSmbyX
-  secrey: meDy7VYAWbg8kZCKsoUZcIYQxigWOy
-  bucket: 4dkankan
-  small: ?x-oss-process=image/resize,m_fill,h_%s,w_%s
-
-
-# Sa-Token配置
-sa-token:
-  # token名称 (同时也是cookie名称)
-  token-name: token
-  # token有效期,单位s 默认30天, -1代表永不过期
-  timeout: -1
-  # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
-  activity-timeout: -1
-  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
-  is-concurrent: true
-  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
-  is-share: false
-  # token风格
-  token-style: uuid
-  jwt-secret-key: XX#$%()(#*!()!KL<><MQLMNQNQJQK&sdfkjsdrow32234545fdf>?N<:{LWPW
-  # 是否输出操作日志
-  is-log: false
-
-fdkk:
-  register:
-    validCode: 2a22bac40f44af4d3b5fdc20ea706fc5
-
-
-geoquery:
-  dataFilePath: /mnt/geoFile/GeoJSON.json
-  saveWkbsFilePath: /mnt/geoFile/GeoJSON.wkbs
-

+ 31 - 0
src/main/resources/bootstrap-dl.yml

@@ -0,0 +1,31 @@
+spring:
+  application:
+    name: 4dkankan-fusion
+  cloud:
+    nacos:
+      config:
+        server-addr: 127.0.0.1:8848
+        file-extension: yaml
+        namespace: test
+        extension-configs:
+          - data-id: 4dkankan-fusion.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+          - data-id: common-rabbitmq-config.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+          - data-id: forest-config.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+          - data-id: common-redis-config.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+          - data-id: common-fyun-config.yaml
+            group: DEFAULT_GROUP
+            refresh: true
+      discovery:
+        server-addr: ${spring.cloud.nacos.config.server-addr}
+        namespace: ${spring.cloud.nacos.config.namespace}
+
+
+

+ 12 - 0
src/main/resources/bootstrap.yml

@@ -0,0 +1,12 @@
+spring:
+  profiles:
+    active: dl
+logging:
+  config: classpath:logback-spring.xml
+mybatis-plus:
+  configuration:
+    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl #开启sql日志
+
+geoquery:
+  dataFilePath: /mnt/geoFile/GeoJSON.json
+  saveWkbsFilePath:  /mnt/geoFile/GeoJSON.wkbs

+ 27 - 15
src/main/resources/logback-spring.xml

@@ -201,27 +201,39 @@
 	</logger>
 
 
-	<!--  连接时长  -->
-	<appender name="timeLogger" class="ch.qos.logback.core.rolling.RollingFileAppender">
-		<file>${log.path}/timeLogger.log</file>
-		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-			<level>DEBUG</level>
-		</filter>
+
+	<appender name="SQL_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<!-- 正在记录的日志文件的路径及文件名 -->
+		<file>${log.path}/log_sql.log</file>
+		<!--日志文件输出格式 -->
+		<encoder>
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+			<charset>UTF-8</charset>
+		</encoder>
+		<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
 		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-			<fileNamePattern>${log.path}/timeLogger/timeLogger-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+			<!-- 每天日志归档路径以及格式 -->
+			<fileNamePattern>${log.path}/sql/log-sql-%d{yyyy-MM-dd}.%i.log
+			</fileNamePattern>
 			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
 				<maxFileSize>100MB</maxFileSize>
 			</timeBasedFileNamingAndTriggeringPolicy>
-			<!--日志文件保留天数-->
-			<maxHistory>10</maxHistory>
+			<!--日志文件保留天数 -->
+			<maxHistory>15</maxHistory>
 		</rollingPolicy>
-		<encoder>
-			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
-			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
-		</encoder>
+		<!-- 此日志文件只记录info级别的 -->
+		<filter class="ch.qos.logback.classic.filter.LevelFilter">
+			<level>DEBUG</level>
+			<onMatch>ACCEPT</onMatch>
+			<onMismatch>DENY</onMismatch>
+		</filter>
 	</appender>
-	<logger name="timeLogger" additivity="false" level="DEBUG">
-		<appender-ref ref="timeLogger"/>
+
+	<logger name="com.baomidou.mybatisplus" level="DEBUG" additivity="true">
+		<appender-ref ref="SQL_FILE"/>
+	</logger>
+	<logger name="com.fdkankan.fusion.mapper" level="DEBUG" additivity="true">
+		<appender-ref ref="SQL_FILE"/>
 	</logger>
 
 	<!-- <logger>用来设置某一个包或者具体的某一个类的日志打印级别、 以及指定<appender>。<logger>仅有一个name属性, 一个可选的level和一个可选的addtivity属性。 name:用来指定受此logger约束的某一个包或者具体的某一个类。 level:用来设置打印级别,大小写无关:TRACE,