dengsixing 1 éve
szülő
commit
22a2a7bb76
23 módosított fájl, 435 hozzáadás és 1170 törlés
  1. 69 27
      pom.xml
  2. 3 4
      src/main/java/com/fdkankan/scene/SceneApplication.java
  3. 0 150
      src/main/java/com/fdkankan/scene/controller/SceneMarkShapeController.java
  4. 0 33
      src/main/java/com/fdkankan/scene/controller/TestController.java
  5. 0 98
      src/main/java/com/fdkankan/scene/generate/AutoGenerate.java
  6. 0 98
      src/main/java/com/fdkankan/scene/listener/RabbitMqListener.java
  7. 148 150
      src/main/java/com/fdkankan/scene/schedule/ScheduleJob.java
  8. 5 7
      src/main/java/com/fdkankan/scene/service/impl/DownloadTourVideoServiceImpl.java
  9. 6 12
      src/main/java/com/fdkankan/scene/service/impl/SceneCleanOrigServiceImpl.java
  10. 16 65
      src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java
  11. 14 39
      src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java
  12. 6 6
      src/main/java/com/fdkankan/scene/service/impl/SceneMarkShapeServiceImpl.java
  13. 12 12
      src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java
  14. 98 98
      src/main/java/com/fdkankan/scene/util/OssBodySegmentUtil.java
  15. 0 97
      src/main/java/com/fdkankan/scene/util/test.java
  16. 57 0
      src/main/resources/application-test.yml
  17. 1 1
      src/main/resources/bootstrap.yml
  18. 0 72
      src/main/resources/bootstrap-dev-eur.yml
  19. 0 35
      src/main/resources/bootstrap-dev.yml
  20. 0 36
      src/main/resources/bootstrap-prod-eur.yml
  21. 0 43
      src/main/resources/bootstrap-prod.yml
  22. 0 43
      src/main/resources/bootstrap-test-eur.yml
  23. 0 44
      src/main/resources/bootstrap-test.yml

+ 69 - 27
pom.xml

@@ -59,6 +59,14 @@
                     <groupId>org.springframework</groupId>
                     <artifactId>spring-web</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>com.alibaba.cloud</groupId>
+                    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.alibaba.cloud</groupId>
+                    <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
 
@@ -74,23 +82,23 @@
             <version>3.0.0-SNAPSHOT</version>
         </dependency>
 
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-db</artifactId>
-            <version>3.0.0-SNAPSHOT</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.fdkankan</groupId>-->
+<!--            <artifactId>4dkankan-utils-db</artifactId>-->
+<!--            <version>3.0.0-SNAPSHOT</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-fyun-oss</artifactId>
+            <artifactId>4dkankan-utils-fyun-local</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-fyun-s3</artifactId>-->
+<!--            <version>3.0.0-SNAPSHOT</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>com.fdkankan</groupId>
@@ -98,11 +106,11 @@
             <version>3.0.0-SNAPSHOT</version>
         </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-rabbitmq</artifactId>-->
+<!--            <version>3.0.0-SNAPSHOT</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>com.fdkankan</groupId>
@@ -121,11 +129,11 @@
             <artifactId>lombok</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>com.alibaba.csp</groupId>
-            <artifactId>sentinel-datasource-nacos</artifactId>
-            <version>1.7.2</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba.csp</groupId>-->
+<!--            <artifactId>sentinel-datasource-nacos</artifactId>-->
+<!--            <version>1.7.2</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>com.yomahub</groupId>
@@ -153,17 +161,51 @@
         </dependency>
 
         <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>imageseg20191230</artifactId>
-            <version>1.0.5</version>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.25</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <scope>compile</scope>
+            <version>3.4.3.4</version>
+        </dependency>
+
+        <!--mybatis-plus代码生成器-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <scope>compile</scope>
+            <version>3.5.1</version>
         </dependency>
 
+        <!--velocity模板-->
         <dependency>
-            <groupId>com.chinatower.reszyzx.common</groupId>
-            <artifactId>chinatower-main-res-common</artifactId>
-            <version>1.0.0</version>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.3</version>
         </dependency>
 
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba</groupId>-->
+<!--            <artifactId>druid-spring-boot-starter</artifactId>-->
+<!--            <version>1.1.22</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>com.aliyun</groupId>-->
+<!--            <artifactId>imageseg20191230</artifactId>-->
+<!--            <version>1.0.5</version>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>com.chinatower.reszyzx.common</groupId>-->
+<!--            <artifactId>chinatower-main-res-common</artifactId>-->
+<!--            <version>1.0.0</version>-->
+<!--        </dependency>-->
+
     </dependencies>
 
     <dependencyManagement>

+ 3 - 4
src/main/java/com/fdkankan/scene/SceneApplication.java

@@ -4,19 +4,18 @@ import com.dtflys.forest.springboot.annotation.ForestScan;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 @SpringBootApplication
-@EnableTransactionManagement//开启事务
-@EnableDiscoveryClient
+//@EnableTransactionManagement//开启事务
+//@EnableDiscoveryClient
 @EnableScheduling
 @ComponentScan(basePackages = {"com.fdkankan.*"})
 @MapperScan("com.fdkankan.**.mapper")
 @ForestScan(basePackages = "com.fdkankan.scene.httpclient")
 public class SceneApplication {
+
     public static void main(String[] args) {
         SpringApplication.run(SceneApplication.class, args);
     }

+ 0 - 150
src/main/java/com/fdkankan/scene/controller/SceneMarkShapeController.java

@@ -1,150 +0,0 @@
-package com.fdkankan.scene.controller;
-
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.model.constants.UploadFilePath;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.scene.entity.SceneMarkShape;
-import com.fdkankan.scene.entity.ScenePlus;
-import com.fdkankan.scene.entity.ScenePlusExt;
-import com.fdkankan.scene.service.ISceneMarkShapeService;
-import com.fdkankan.scene.service.IScenePlusExtService;
-import com.fdkankan.scene.service.IScenePlusService;
-import com.fdkankan.scene.vo.SceneMarkShapeDetectParamVO;
-import com.fdkankan.scene.vo.SceneMarkShapeParamVO;
-import com.fdkankan.scene.vo.SceneMarkShapeReDetectParamVO;
-import com.fdkankan.web.controller.BaseController;
-import com.fdkankan.web.response.ResultData;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.annotation.Resource;
-import java.io.IOException;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 初始化接口
- *
- * @author fdkk
- */
-@RestController
-@RequestMapping("/service/scene/sceneMarkShape")
-@Slf4j
-public class SceneMarkShapeController extends BaseController
-{
-    @Value("${queue.scene.yolov5-detect-queue}")
-    private String yolov5DetectQueue;
-    @Autowired
-    private ISceneMarkShapeService sceneMarkShapeService;
-    @Resource
-    private FYunFileServiceInterface fYunFileService;
-    @Autowired
-    private IScenePlusService scenePlusService;
-    @Autowired
-    private IScenePlusExtService scenePlusExtService;
-    @Value("${fyun.host}")
-    private String ossUrlPrefix;
-    @Autowired
-    private RabbitMqProducer rabbitMqProducer;
-    @Value("${main.url}")
-    private String mainUrl;
-
-
-    /**
-     * 获取场景全景图路径连接
-     */
-    @PostMapping("/getPanorama")
-    public ResultData getPanorama(@RequestBody @Validated  SceneMarkShapeParamVO param) {
-        ScenePlus scenePlus = scenePlusService.getScenePlusByNum(param.getNum());
-        if(ObjectUtil.isNotNull(scenePlus)) {
-            ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
-            if (ObjectUtil.isNotNull(scenePlus)) {
-                String publicUserPath = String.format(UploadFilePath.scene_result_data_path, param.getNum());
-                List<String> panoramaList = fYunFileService.listRemoteFiles(scenePlusExt.getYunFileBucket(), publicUserPath + "caches/images/");
-                List<String> panoramaListUrl = panoramaList.stream().filter(f -> FileUtil.extName(f).equals("jpg")).map(s -> ossUrlPrefix + s).collect(Collectors.toList());
-                return ResultData.ok(panoramaListUrl);
-            }
-        }
-        return ResultData.ok("场景数据不存在");
-    }
-    /**
-     * 根据场景码和图片名称获取数据
-     */
-    @PostMapping("/getInfo")
-    public ResultData getInfo(@RequestBody @Validated  SceneMarkShapeParamVO param) {
-        SceneMarkShape res=  sceneMarkShapeService.findByNumAndImagePath(param.getNum(),param.getImagePath());
-        return ResultData.ok(res);
-    }
-    /**
-     * 将需要推理的场景推入到队列
-     */
-    @PostMapping("/detectScene")
-    public ResultData detect(@RequestBody @Validated SceneMarkShapeDetectParamVO param) {
-        param.setWebSite(mainUrl);
-        rabbitMqProducer.sendByWorkQueue(yolov5DetectQueue, param);
-        return ResultData.ok();
-    }
-    /**
-     * 将需要训练的场景推入到队列
-     */
-    @PostMapping("/trainScene")
-    public ResultData trainScene(@RequestBody @Validated SceneMarkShapeReDetectParamVO param) {
-        sceneMarkShapeService.trainScene(param);
-        return ResultData.ok();
-    }
-    /**
-     * 将需要重新推理的场景推入到队列
-     */
-    @PostMapping("/editReDetectStatus")
-    public ResultData editReDetectStatus(@RequestBody @Validated SceneMarkShapeParamVO param) {
-        sceneMarkShapeService.editTrainStatus(param);
-        return ResultData.ok();
-    }
-    /**
-     * 保存或者修改
-     */
-    @PostMapping("/saveOrEdit")
-    public ResultData save(@RequestParam(value = "num") String num,@RequestParam("file") MultipartFile file) throws IOException {
-        sceneMarkShapeService.saveFileToDB(file,num);
-        return ResultData.ok();
-    }
-    /**
-     * 保存或者修改JSON
-     */
-    @PostMapping("/saveOrEditJson")
-    public ResultData saveOrEditJson(@RequestBody SceneMarkShape param) {
-        SceneMarkShape shape = sceneMarkShapeService.findByNumAndImagePath(param.getNum(), param.getImagePath());
-        if (ObjectUtil.isNotNull(shape)){
-            param.setId(shape.getId());
-            param.setUpdateTime(new Date());
-            return ResultData.ok(sceneMarkShapeService.updateById(param));
-        }else {
-            param.setCreateTime(new Date());
-            return ResultData.ok(sceneMarkShapeService.save(param));
-        }
-    }
-    /**
-     * 保存或者修改JSON
-     */
-    @PostMapping("/editLabel")
-    public ResultData editLabel(@RequestParam(value = "num") String num,@RequestParam(value = "imgPath") String imgPath,@RequestParam("file") MultipartFile file) throws IOException {
-        log.info("进入editLabel---num{},imgPath{}",num,imgPath);
-        return sceneMarkShapeService.editLabelByFile(num, imgPath, file);
-    }
-    /**
-     * 保存或者修改JSON
-     */
-    @PostMapping("/testquery")
-    public ResultData testquery()   {
-        Map<String, List<SceneMarkShape>> res=new HashMap<>();
-        res.put("findByReTrainStatus",sceneMarkShapeService.findByReTrainStatus(1));
-        res.put("findByToTrainStatus",sceneMarkShapeService.findByToTrainStatus(0));
-        return ResultData.ok(res);
-    }
-}

+ 0 - 33
src/main/java/com/fdkankan/scene/controller/TestController.java

@@ -1,33 +0,0 @@
-package com.fdkankan.scene.controller;
-
-import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
-import com.fdkankan.web.response.ResultData;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/8/17
- **/
-@RestController
-@RequestMapping("/test")
-public class TestController {
-
-    @Autowired
-    private RabbitMqProducer rabbitMqProducer;
-    @Autowired
-    private FYunFileServiceInterface fYunFileService;
-
-    @GetMapping("/test")
-    public ResultData test(){
-        return ResultData.ok(fYunFileService.fileExist("scene_result_data/KK-t-JCaoqtvy7AO/caches/images"));
-    }
-
-}

+ 0 - 98
src/main/java/com/fdkankan/scene/generate/AutoGenerate.java

@@ -1,98 +0,0 @@
-package com.fdkankan.scene.generate;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.generator.FastAutoGenerator;
-import com.baomidou.mybatisplus.generator.config.OutputFile;
-import com.baomidou.mybatisplus.generator.config.rules.DateType;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-public class AutoGenerate {
-
-
-    public static void main(String[] args) {
-
-        String path =System.getProperty("user.dir");
-
-        generate(path,"scene", getTables(new String[]{
-                "t_scene_cold_storage"
-        }));
-
-//        generate(path,"goods", getTables(new String[]{
-//                        "t_camera","t_camera_detail","t_camera_out","t_camera_space","t_camera_version",
-//                        "t_company","t_goods","t_goods_sku","t_cart","t_goods_spec",
-//                        "t_goods_spec_value","t_goods_spu_spec","t_sn_code"
-//        }));
-//
-//        generate(path,"order", getTables(new String[]{
-//                        "t_increment_order","t_invoice","t_order","t_order_item",
-//                        "t_pre_sale","t_space_sdk","t_trade_log","t_commerce_order","t_download_order","t_expansion_order"
-//        }));
-//        generate(path,"order", getTables(new String[]{
-//                        "t_virtual_order"
-//        }));
-//
-//        generate(path,"user", getTables(new String[]{
-//                        "t_user","t_user_increment","t_manager","t_province","t_increment_type","t_intercom_message","t_receiver_info"
-//        }));
-    }
-
-    public static List<String> getTables(String [] tableNames){
-        return new ArrayList<>(Arrays.asList(tableNames));
-    }
-
-
-    public static void  generate(String path,String moduleName,  List<String> tables){
-        FastAutoGenerator.create("jdbc:mysql://120.24.144.164:3306/4dkankan_v4",
-            "root","4Dage@4Dage#@168")
-                .globalConfig(builder -> {
-                    builder.author("")               //作者
-                            .outputDir(path+"\\src\\main\\java")    //输出路径(写到java目录)
-                            //.enableSwagger()           //开启swagger
-                            .commentDate("yyyy-MM-dd")
-                            .dateType(DateType.ONLY_DATE)
-                            .fileOverride();            //开启覆盖之前生成的文件
-
-                })
-                .packageConfig(builder -> {
-                    builder.parent("com.fdkankan")
-                            .moduleName(moduleName)
-                            .entity("entity")
-                            .service("service")
-                            .serviceImpl("service.impl")
-                            .controller("controller")
-                            .mapper("mapper")
-                            .xml("test.mapper")
-                            .pathInfo(Collections.singletonMap(OutputFile.mapperXml,path+"\\src\\main\\resources\\mapper\\"+moduleName));
-                })
-                .strategyConfig(builder -> {
-                    builder.addInclude(tables)
-                            .addTablePrefix("t_")
-
-                            .serviceBuilder()
-                            .formatServiceFileName("I%sService")
-                            .formatServiceImplFileName("%sServiceImpl")
-
-                            .entityBuilder()
-                            .enableLombok()
-                            .logicDeleteColumnName("rec_status")
-                            .enableTableFieldAnnotation()
-//                            .superClass(BaseEntity.class)
-
-                            .controllerBuilder()
-                            .formatFileName("%sController")
-                            .enableRestStyle()
-
-                            .mapperBuilder()
-                            .superClass(BaseMapper.class)
-                            .formatMapperFileName("I%sMapper")
-                            .enableMapperAnnotation()
-                            .formatXmlFileName("%sMapper");
-                })
-                // .templateEngine(new FreemarkerTemplateEngine()) // 使用Freemarker引擎模板,默认的是Velocity引擎模板
-                .execute();
-    }
-}

+ 0 - 98
src/main/java/com/fdkankan/scene/listener/RabbitMqListener.java

@@ -1,98 +0,0 @@
-package com.fdkankan.scene.listener;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.scene.entity.DownloadTourVideo;
-import com.fdkankan.scene.service.IDownloadTourVideoService;
-import com.fdkankan.scene.service.ISceneService;
-import com.rabbitmq.client.Channel;
-import java.nio.charset.StandardCharsets;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.Message;
-import org.springframework.amqp.rabbit.annotation.Queue;
-import org.springframework.amqp.rabbit.annotation.RabbitListener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-/**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/4/19
- **/
-@Slf4j
-@Component
-public class RabbitMqListener {
-
-    @Value("${queue.scene.transfer-tour-video}")
-    private String downloadTourVideoQueue;
-
-    @Value("${queue.bodySegment:body-segment}")
-    private String bodySegmentQueueName;
-
-    @Autowired
-    private IDownloadTourVideoService downloadTourVideoService;
-    @Autowired
-    private ISceneService sceneService;
-
-    /**
-     * 开启了手动确认模式,如果没有手动确认,消费者不会重试,当服务重启时会再次消费,因为rabbitmq认为你还没有处理完你的业务
-     * queuesToDeclare = @Queue("${queue.modeling.modeling-test}"),  如果队列不不存在会自动创建队列
-     * concurrency = "3"    设置消费线程数,每个线程每次只拉取一条消息消费
-     */
-    @RabbitListener(
-        queuesToDeclare = @Queue("${queue.scene.transfer-tour-video}")
-    )
-    public void transferTourVideo(Channel channel, Message message) throws Exception {
-        String messageId = message.getMessageProperties().getMessageId();
-        String msg = new String(message.getBody(), StandardCharsets.UTF_8);
-        log.info("开始消费消息,id:{},queue:{},content:{}", messageId, downloadTourVideoQueue, msg);
-        DownloadTourVideo downloadTourVideo = JSON.parseObject(msg, DownloadTourVideo.class);
-        downloadTourVideoService.transferTourVideo(downloadTourVideo);
-        log.info("deliverTag:" + message.getMessageProperties().getDeliveryTag());
-        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
-        log.info("结束消费消息,id:{}", messageId);
-    }
-
-    /**
-     * 开启了手动确认模式,如果没有手动确认,消费者不会重试,当服务重启时会再次消费,因为rabbitmq认为你还没有处理完你的业务
-     * queuesToDeclare = @Queue("${queue.modeling.modeling-test}"),  如果队列不不存在会自动创建队列
-     * concurrency = "3"    设置消费线程数,每个线程每次只拉取一条消息消费
-     */
-    @RabbitListener(
-            queuesToDeclare = @Queue("${queue.bodySegment}"),
-            concurrency = "${maxThread.bodySegment}"
-    )
-    public void bodySegment(Channel channel, Message message) throws Exception {
-        String messageId = message.getMessageProperties().getMessageId();
-        String msg = new String(message.getBody(), StandardCharsets.UTF_8);
-        log.info("开始消费消息,id:{},queue:{},content:{}", messageId, bodySegmentQueueName, msg);
-        JSONObject jsonObject = JSON.parseObject(msg);
-        sceneService.bodySegmentHandler(jsonObject.getString("imgUrl"), jsonObject.getString("uuid"));
-        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
-        log.info("结束消费消息,id:{}", messageId);
-    }
-
-    /**
-     * 开启了手动确认模式,如果没有手动确认,消费者不会重试,当服务重启时会再次消费,因为rabbitmq认为你还没有处理完你的业务
-     * queuesToDeclare = @Queue("${queue.modeling.modeling-test}"),  如果队列不不存在会自动创建队列
-     * concurrency = "3"    设置消费线程数,每个线程每次只拉取一条消息消费
-     */
-    @RabbitListener(
-        queuesToDeclare = @Queue("test_dsx")
-    )
-    public void test(Channel channel, Message message) throws Exception {
-        String messageId = message.getMessageProperties().getMessageId();
-        String msg = new String(message.getBody(), StandardCharsets.UTF_8);
-        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
-        log.info("开始消费消息,id:{},queue:{},content:{}", messageId, "test_dsx", msg);
-        Thread.sleep(10000L);
-        log.info("deliverTag:" + message.getMessageProperties().getDeliveryTag());
-        log.info("结束消费消息,id:{}", messageId);
-    }
-
-
-}

+ 148 - 150
src/main/java/com/fdkankan/scene/schedule/ScheduleJob.java

@@ -1,190 +1,188 @@
-package com.fdkankan.scene.schedule;
-
-import com.fdkankan.redis.constant.RedisLockKey;
-import com.fdkankan.redis.util.RedisLockUtil;
-import com.fdkankan.scene.service.ISceneAsynOperLogService;
-import com.fdkankan.scene.service.ISceneCleanOrigService;
-import lombok.extern.log4j.Log4j2;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-
-@RefreshScope
-@Log4j2
-@Component
-public class ScheduleJob {
-
-    @Value("${environment:#{null}}")
-    private String environment;
-
-    @Autowired
-    private ISceneAsynOperLogService sceneAsynOperLogService;
-    @Autowired
-    private ISceneCleanOrigService sceneCleanOrigService;
-    @Autowired
-    private RedisLockUtil redisLockUtil;
-
-    /**
-     * 每天凌晨一点执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void cleanDownloadPanorama() {
-        log.info("定时清除全景图压缩包开始");
-        sceneAsynOperLogService.cleanDownloadPanorama();
-        log.info("定时清除全景图压缩包完毕");
-    }
-
+//package com.fdkankan.scene.schedule;
+//
+//import com.fdkankan.redis.constant.RedisLockKey;
+//import com.fdkankan.redis.util.RedisLockUtil;
+//import com.fdkankan.scene.service.ISceneAsynOperLogService;
+//import com.fdkankan.scene.service.ISceneCleanOrigService;
+//import lombok.extern.log4j.Log4j2;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.scheduling.annotation.Scheduled;
+//import org.springframework.stereotype.Component;
+//
+//import javax.annotation.PostConstruct;
+//
+//@Log4j2
+//@Component
+//public class ScheduleJob {
+//
+//    @Value("${environment:#{null}}")
+//    private String environment;
+//
+//    @Autowired
+//    private ISceneAsynOperLogService sceneAsynOperLogService;
+//    @Autowired
+//    private ISceneCleanOrigService sceneCleanOrigService;
+//    @Autowired
+//    private RedisLockUtil redisLockUtil;
+//
 //    /**
-//     * 删除场景原始资源
+//     * 每天凌晨一点执行
+//     */
+//    @Scheduled(cron="0 0 1 * * ?")
+//    public void cleanDownloadPanorama() {
+//        log.info("定时清除全景图压缩包开始");
+//        sceneAsynOperLogService.cleanDownloadPanorama();
+//        log.info("定时清除全景图压缩包完毕");
+//    }
+//
+////    /**
+////     * 删除场景原始资源
+////     * 每天凌晨执行
+////     */
+////    @Scheduled(cron="0 0 1 * * ?")
+////    public void cleanOssHomeV3() {
+////        log.info("删除v3场景原始资源开始");
+////        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V3;
+////        try {
+////            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
+////            if(!lock){
+////                return;
+////            }
+////            sceneCleanOrigService.cleanOrigV3();
+////        }finally {
+////            redisLockUtil.unlockLua(lockKey);
+////        }
+////        log.info("删除v3场景原始资源结束");
+////    }
+////
+////    /**
+////     * 删除场景原始资源
+////     * 每天凌晨执行
+////     */
+////    @Scheduled(cron="0 0 1 * * ?")
+////    public void cleanOssHomeV4() {
+////        log.info("删除v4场景原始资源开始");
+////        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V4;
+////        try {
+////            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
+////            if(!lock){
+////                return;
+////            }
+////            sceneCleanOrigService.cleanOrigV4();
+////        }finally {
+////            redisLockUtil.unlockLua(lockKey);
+////        }
+////        log.info("删除v4场景原始资源结束");
+////    }
+//
+//    /**
+//     * 删除已删除场景原始资源及caches
 //     * 每天凌晨执行
 //     */
 //    @Scheduled(cron="0 0 1 * * ?")
-//    public void cleanOssHomeV3() {
-//        log.info("删除v3场景原始资源开始");
-//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V3;
+//    public void cleanOss4DeletedSceneV3() {
+//        log.info("删除已删除V3场景原始资源开始");
+//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_DELETED_ORIG_V3;
 //        try {
 //            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
 //            if(!lock){
 //                return;
 //            }
-//            sceneCleanOrigService.cleanOrigV3();
+//            sceneCleanOrigService.cleanOss4DeletedSceneV3();
 //        }finally {
 //            redisLockUtil.unlockLua(lockKey);
 //        }
-//        log.info("删除v3场景原始资源结束");
+//        log.info("删除已删除V3场景原始资源结束");
 //    }
 //
+//
 //    /**
-//     * 删除场景原始资源
+//     * 删除已删除场景原始资源及caches
 //     * 每天凌晨执行
 //     */
 //    @Scheduled(cron="0 0 1 * * ?")
-//    public void cleanOssHomeV4() {
-//        log.info("删除v4场景原始资源开始");
-//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V4;
+//    public void cleanOss4DeletedSceneV4() {
+//        log.info("删除已删除V4场景原始资源开始");
+//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_DELETED_ORIG_V4;
 //        try {
 //            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
 //            if(!lock){
 //                return;
 //            }
-//            sceneCleanOrigService.cleanOrigV4();
+//            sceneCleanOrigService.cleanOss4DeletedSceneV4();
 //        }finally {
 //            redisLockUtil.unlockLua(lockKey);
 //        }
-//        log.info("删除v4场景原始资源结束");
+//        log.info("删除已删除V4场景原始资源结束");
 //    }
-
-    /**
-     * 删除已删除场景原始资源及caches
-     * 每天凌晨执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void cleanOss4DeletedSceneV3() {
-        log.info("删除已删除V3场景原始资源开始");
-        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_DELETED_ORIG_V3;
-        try {
-            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
-            if(!lock){
-                return;
-            }
-            sceneCleanOrigService.cleanOss4DeletedSceneV3();
-        }finally {
-            redisLockUtil.unlockLua(lockKey);
-        }
-        log.info("删除已删除V3场景原始资源结束");
-    }
-
-
-    /**
-     * 删除已删除场景原始资源及caches
-     * 每天凌晨执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void cleanOss4DeletedSceneV4() {
-        log.info("删除已删除V4场景原始资源开始");
-        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_DELETED_ORIG_V4;
-        try {
-            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
-            if(!lock){
-                return;
-            }
-            sceneCleanOrigService.cleanOss4DeletedSceneV4();
-        }finally {
-            redisLockUtil.unlockLua(lockKey);
-        }
-        log.info("删除已删除V4场景原始资源结束");
-    }
-
+//
+////    /**
+////     * 删除测试相机场景原始资源及caches
+////     * 每天凌晨执行
+////     */
+////    @Scheduled(cron="0 0 1 * * ?")
+////    public void cleanOss4TestCameraV3() {
+////        if(StrUtil.isEmpty(environment) || !environment.equals("dev")){
+////            return;
+////        }
+////        log.info("删除已删除V4场景原始资源开始");
+////        sceneCleanOrigService.cleanOss4TestCameraV3();
+////        log.info("删除已删除V4场景原始资源结束");
+////    }
+////
+////
+////    /**
+////     * 删除测试相机场景原始资源及caches
+////     * 每天凌晨执行
+////     */
+////    @Scheduled(cron="0 0 1 * * ?")
+////    public void cleanOss4TestCameraV4() {
+////        if(StrUtil.isEmpty(environment) || !environment.equals("dev")){
+////            return;
+////        }
+////        log.info("删除已删除V4场景原始资源开始");
+////        sceneCleanOrigService.cleanOss4TestCameraV4();
+////        log.info("删除已删除V4场景原始资源结束");
+////    }
+//
 //    /**
-//     * 删除测试相机场景原始资源及caches
+//     * 删除场景原始资源
 //     * 每天凌晨执行
 //     */
 //    @Scheduled(cron="0 0 1 * * ?")
-//    public void cleanOss4TestCameraV3() {
-//        if(StrUtil.isEmpty(environment) || !environment.equals("dev")){
-//            return;
+//    public void coldStorageHomeV3() {
+//        log.info("冻结v3场景原始资源开始");
+//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V3;
+//        try {
+//            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
+//            if(!lock){
+//                return;
+//            }
+//            sceneCleanOrigService.coldStorageHomeV3();
+//        }finally {
+//            redisLockUtil.unlockLua(lockKey);
 //        }
-//        log.info("删除已删除V4场景原始资源开始");
-//        sceneCleanOrigService.cleanOss4TestCameraV3();
-//        log.info("删除已删除V4场景原始资源结束");
+//        log.info("冻结v3场景原始资源结束");
 //    }
 //
-//
 //    /**
-//     * 删除测试相机场景原始资源及caches
+//     * 删除场景原始资源
 //     * 每天凌晨执行
 //     */
 //    @Scheduled(cron="0 0 1 * * ?")
-//    public void cleanOss4TestCameraV4() {
-//        if(StrUtil.isEmpty(environment) || !environment.equals("dev")){
-//            return;
+//    public void coldStorageHomeV4() {
+//        log.info("冻结v4场景原始资源开始");
+//        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V4;
+//        try {
+//            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
+//            if(!lock){
+//                return;
+//            }
+//            sceneCleanOrigService.coldStorageHomeV4();
+//        }finally {
+//            redisLockUtil.unlockLua(lockKey);
 //        }
-//        log.info("删除已删除V4场景原始资源开始");
-//        sceneCleanOrigService.cleanOss4TestCameraV4();
-//        log.info("删除已删除V4场景原始资源结束");
+//        log.info("冻结v4场景原始资源结束");
 //    }
-
-    /**
-     * 删除场景原始资源
-     * 每天凌晨执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void coldStorageHomeV3() {
-        log.info("冻结v3场景原始资源开始");
-        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V3;
-        try {
-            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
-            if(!lock){
-                return;
-            }
-            sceneCleanOrigService.coldStorageHomeV3();
-        }finally {
-            redisLockUtil.unlockLua(lockKey);
-        }
-        log.info("冻结v3场景原始资源结束");
-    }
-
-    /**
-     * 删除场景原始资源
-     * 每天凌晨执行
-     */
-    @Scheduled(cron="0 0 1 * * ?")
-    public void coldStorageHomeV4() {
-        log.info("冻结v4场景原始资源开始");
-        String lockKey = RedisLockKey.LOCK_CLEAN_SCENE_ORIG_V4;
-        try {
-            boolean lock = redisLockUtil.lock(lockKey, 24*60*60);
-            if(!lock){
-                return;
-            }
-            sceneCleanOrigService.coldStorageHomeV4();
-        }finally {
-            redisLockUtil.unlockLua(lockKey);
-        }
-        log.info("冻结v4场景原始资源结束");
-    }
-}
+//}

+ 5 - 7
src/main/java/com/fdkankan/scene/service/impl/DownloadTourVideoServiceImpl.java

@@ -10,7 +10,7 @@ import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFilePath;
 import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.model.utils.CreateObjUtil;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
+//import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.scene.entity.DownloadTourVideo;
 import com.fdkankan.scene.mapper.IDownloadTourVideoMapper;
 import com.fdkankan.scene.service.IDownloadTourVideoService;
@@ -32,21 +32,19 @@ import org.springframework.web.multipart.MultipartFile;
  * 导览视频转换记录表 服务实现类
  * </p>
  *
- * @author 
+ * @author
  * @since 2022-10-12
  */
 @Service
 public class DownloadTourVideoServiceImpl extends ServiceImpl<IDownloadTourVideoMapper, DownloadTourVideo> implements IDownloadTourVideoService {
 
-    @Value("${queue.scene.transfer-tour-video}")
-    private String downloadTourVideoQueue;
     @Value("${fyun.type}")
     private String type;
     @Value("${fyun.bucket:4dkankan}")
     private String bucket;
 
-    @Autowired
-    private RabbitMqProducer rabbitMqProducer;
+//    @Autowired
+//    private RabbitMqProducer rabbitMqProducer;
     @Autowired
     private FYunFileServiceInterface fYunFileService;
 
@@ -94,7 +92,7 @@ public class DownloadTourVideoServiceImpl extends ServiceImpl<IDownloadTourVideo
         this.save(downloadTourVideo);
 
         //发送mq
-        rabbitMqProducer.sendByWorkQueue(downloadTourVideoQueue, downloadTourVideo);
+//        rabbitMqProducer.sendByWorkQueue(downloadTourVideoQueue, downloadTourVideo);
 
         return ResultData.ok();
     }

+ 6 - 12
src/main/java/com/fdkankan/scene/service/impl/SceneCleanOrigServiceImpl.java

@@ -6,11 +6,8 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.fdkankan.common.constant.CommonStatus;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.common.constant.CommonSuccessStatus;
-import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.common.constant.OperationType;
-import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.fyun.config.FYunFileConfig;
 import com.fdkankan.fyun.constant.FYunTypeEnum;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
@@ -23,17 +20,15 @@ import com.fdkankan.scene.bean.SceneBean;
 import com.fdkankan.scene.entity.Camera;
 import com.fdkankan.scene.entity.SceneCleanOrig;
 import com.fdkankan.scene.mapper.ISceneCleanOrigMapper;
-import com.fdkankan.scene.mapper.IScenePlusExtMapper;
 import com.fdkankan.scene.service.*;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Service;
-import sun.font.TextRecord;
 
-import java.util.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -41,10 +36,9 @@ import java.util.stream.Collectors;
  * 删除oss原始资源记录 服务实现类
  * </p>
  *
- * @author 
+ * @author
  * @since 2023-03-29
  */
-@RefreshScope
 @Slf4j
 @Service
 public class SceneCleanOrigServiceImpl extends ServiceImpl<ISceneCleanOrigMapper, SceneCleanOrig> implements ISceneCleanOrigService {
@@ -61,7 +55,7 @@ public class SceneCleanOrigServiceImpl extends ServiceImpl<ISceneCleanOrigMapper
     private Integer cleanTestCameraMonth;
     @Value("${fyun.bucket}")
     private String bucket;
-    @Value("${fyun.coldBucket}")
+//    @Value("${fyun.coldBucket}")
     private String coldBucket;
     @Autowired
     private ICameraService cameraService;

+ 16 - 65
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -1,13 +1,9 @@
 package com.fdkankan.scene.service.impl;
-import cn.hutool.core.util.CharsetUtil;
-import com.fdkankan.common.constant.*;
-import com.fdkankan.common.util.FileSizeUtil;
-import com.fdkankan.scene.service.*;
-import com.fdkankan.scene.vo.SaveFiltersParamVO;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.CharsetUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.ZipUtil;
 import com.alibaba.fastjson.JSON;
@@ -17,8 +13,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.common.constant.*;
 import com.fdkankan.common.exception.BusinessException;
 import com.fdkankan.common.util.FileMd5Util;
+import com.fdkankan.common.util.FileSizeUtil;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFilePath;
@@ -31,76 +29,30 @@ import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
 import com.fdkankan.redis.util.RedisUtil;
-import com.fdkankan.scene.bean.BoxPhotoBean;
-import com.fdkankan.scene.bean.PointBean;
-import com.fdkankan.scene.bean.SceneJsonBean;
-import com.fdkankan.scene.bean.SegmentBean;
-import com.fdkankan.scene.bean.StyleBean;
-import com.fdkankan.scene.bean.TagBean;
-import com.fdkankan.scene.bean.VertexBean;
-import com.fdkankan.scene.bean.WallBean;
-import com.fdkankan.scene.entity.CameraDetail;
-import com.fdkankan.scene.entity.Company;
-import com.fdkankan.scene.entity.SceneAsynOperLog;
-import com.fdkankan.scene.entity.SceneDataDownload;
-import com.fdkankan.scene.entity.SceneEditControls;
-import com.fdkankan.scene.entity.SceneEditInfo;
-import com.fdkankan.scene.entity.SceneEditInfoExt;
-import com.fdkankan.scene.entity.ScenePlus;
-import com.fdkankan.scene.entity.ScenePlusExt;
+import com.fdkankan.scene.bean.*;
+import com.fdkankan.scene.entity.*;
 import com.fdkankan.scene.mapper.ISceneEditInfoMapper;
-import com.fdkankan.scene.vo.BallScreenVideoParamVO;
-import com.fdkankan.scene.vo.BaseDataParamVO;
-import com.fdkankan.scene.vo.BaseFileParamVO;
-import com.fdkankan.scene.vo.BaseSceneParamVO;
-import com.fdkankan.scene.vo.DeleteFileParamVO;
-import com.fdkankan.scene.vo.DeleteLinkPanParamVO;
-import com.fdkankan.scene.vo.DeleteStylesParamVO;
-import com.fdkankan.scene.vo.DeleteMosaicParamVO;
-import com.fdkankan.scene.vo.DeleteSidParamVO;
-import com.fdkankan.scene.vo.DownloadVO;
-import com.fdkankan.scene.vo.FileNameAndDataParamVO;
-import com.fdkankan.scene.vo.FileParamVO;
-import com.fdkankan.scene.vo.RenameCadParamVO;
-import com.fdkankan.scene.vo.SaveLinkPanParamVO;
-import com.fdkankan.scene.vo.SceneCheckKeyParamVO;
-import com.fdkankan.scene.vo.SceneEditControlsVO;
-import com.fdkankan.scene.vo.SceneEditInfoParamVO;
-import com.fdkankan.scene.vo.SceneEditInfoVO;
-import com.fdkankan.scene.vo.SceneInfoParamVO;
-import com.fdkankan.scene.vo.SceneInfoVO;
-import com.fdkankan.scene.vo.SurveillanceVO;
-import com.fdkankan.scene.vo.UploadPanoramaVO;
+import com.fdkankan.scene.service.*;
+import com.fdkankan.scene.vo.*;
 import com.fdkankan.web.response.ResultData;
 import com.google.common.collect.Lists;
 import com.google.errorprone.annotations.Var;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
 import java.io.File;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Set;
-import java.util.UUID;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
-import javax.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
 
 /**
  * <p>
@@ -111,7 +63,6 @@ import org.springframework.web.multipart.MultipartFile;
  * @since 2022-01-18
  */
 @Slf4j
-@RefreshScope
 @Service
 public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper, SceneEditInfo> implements ISceneEditInfoService {
 

+ 14 - 39
src/main/java/com/fdkankan/scene/service/impl/SceneEditServiceImpl.java

@@ -9,51 +9,27 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.fdkankan.common.constant.CommonStatus;
 import com.fdkankan.common.constant.ErrorCode;
-import com.fdkankan.model.constants.UploadFilePath;
 import com.fdkankan.common.exception.BusinessException;
-import com.fdkankan.scene.httpclient.MyClient;
-import com.fdkankan.web.response.ResultData;
 import com.fdkankan.common.util.DateExtUtil;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
-import com.fdkankan.scene.entity.Camera;
-import com.fdkankan.scene.entity.CameraDetail;
-import com.fdkankan.scene.entity.SceneCooperation;
-import com.fdkankan.scene.entity.ScenePlus;
-import com.fdkankan.scene.entity.ScenePlusExt;
-import com.fdkankan.scene.entity.SceneResource;
-import com.fdkankan.scene.entity.User;
-import com.fdkankan.scene.entity.UserIncrement;
-import com.fdkankan.scene.service.ICameraDetailService;
-import com.fdkankan.scene.service.ICameraService;
-import com.fdkankan.scene.service.ISceneCooperationService;
-import com.fdkankan.scene.service.ISceneEditInfoExtService;
-import com.fdkankan.scene.service.ISceneEditService;
-import com.fdkankan.scene.service.IScenePlusExtService;
-import com.fdkankan.scene.service.IScenePlusService;
-import com.fdkankan.scene.service.ISceneProService;
-import com.fdkankan.scene.service.ISceneResourceService;
-import com.fdkankan.scene.service.ISceneUploadService;
-import com.fdkankan.scene.service.IUserIncrementService;
-import com.fdkankan.scene.service.IUserService;
-import com.fdkankan.scene.vo.BaseDataParamVO;
-import com.fdkankan.scene.vo.BaseSceneParamVO;
-import com.fdkankan.scene.vo.DeleteFileParamVO;
-import com.fdkankan.scene.vo.LocalesParamVO;
-import com.fdkankan.scene.vo.SceneAuthVO;
+import com.fdkankan.model.constants.UploadFilePath;
+import com.fdkankan.scene.entity.*;
+import com.fdkankan.scene.httpclient.MyClient;
+import com.fdkankan.scene.service.*;
+import com.fdkankan.scene.vo.*;
+import com.fdkankan.web.response.ResultData;
 import com.fdkankan.web.user.SSOUser;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.Objects;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.stereotype.Service;
-import org.springframework.util.ObjectUtils;
 
 /**
  * <p>
@@ -65,13 +41,12 @@ import org.springframework.util.ObjectUtils;
  **/
 @Slf4j
 @Service
-@RefreshScope
 public class SceneEditServiceImpl implements ISceneEditService {
 
-    @Value("${4dkk.manageService.basePath}")
+//    @Value("${4dkk.manageService.basePath}")
     private String manageServiceUrl;
 
-    @Value("${4dkk.manageService.api.getServiceUpTip}")
+//    @Value("${4dkk.manageService.api.getServiceUpTip}")
     private String getServiceUpTipApi;
 
     @Autowired
@@ -90,7 +65,7 @@ public class SceneEditServiceImpl implements ISceneEditService {
     private ICameraService cameraService;
     @Autowired
     private IUserIncrementService userIncrementService;
-    @Value("${expected.time}")
+//    @Value("${expected.time}")
     private String expectedTime;
     @Autowired
     private IUserService userService;

+ 6 - 6
src/main/java/com/fdkankan/scene/service/impl/SceneMarkShapeServiceImpl.java

@@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.common.constant.ErrorCode;
 import com.fdkankan.model.constants.ConstantFilePath;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
+//import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.scene.entity.SceneMarkShape;
 import com.fdkankan.scene.mapper.MarkShapeMapper;
 import com.fdkankan.scene.service.ISceneMarkShapeService;
@@ -39,9 +39,9 @@ import java.util.List;
 @Slf4j
 @Service
 public class SceneMarkShapeServiceImpl extends ServiceImpl<MarkShapeMapper, SceneMarkShape> implements ISceneMarkShapeService {
-    @Autowired
-    private RabbitMqProducer rabbitMqProducer;
-    @Value("${queue.scene.yolov5-train-queue}")
+//    @Autowired
+//    private RabbitMqProducer rabbitMqProducer;
+//    @Value("${queue.scene.yolov5-train-queue}")
     private String yolov5TrainQueue;
     @Value("${main.url}")
     private String mainUrl;
@@ -84,7 +84,7 @@ public class SceneMarkShapeServiceImpl extends ServiceImpl<MarkShapeMapper, Scen
             paramVO.setNum(shape.getNum());
             paramVO.setImagePath(shape.getImagePath());
             paramVO.setDetectType(1);
-            rabbitMqProducer.sendByWorkQueue(yolov5TrainQueue,paramVO);
+//            rabbitMqProducer.sendByWorkQueue(yolov5TrainQueue,paramVO);
         }
         //查询需要进入训练的场景
         List<SceneMarkShape> byToDetectStatus = findByToTrainStatus(0);
@@ -96,7 +96,7 @@ public class SceneMarkShapeServiceImpl extends ServiceImpl<MarkShapeMapper, Scen
             }
             paramVO.setNum(shape.getNum());
             paramVO.setDetectType(2);
-            rabbitMqProducer.sendByWorkQueue(yolov5TrainQueue,paramVO);
+//            rabbitMqProducer.sendByWorkQueue(yolov5TrainQueue,paramVO);
         }
     }
 

+ 12 - 12
src/main/java/com/fdkankan/scene/service/impl/SceneServiceImpl.java

@@ -13,12 +13,12 @@ import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.fyun.config.FYunFileConfig;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFilePath;
-import com.fdkankan.rabbitmq.util.RabbitMqProducer;
+//import com.fdkankan.rabbitmq.util.RabbitMqProducer;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
 import com.fdkankan.scene.bean.BodySegmentStatusBean;
 import com.fdkankan.scene.service.ISceneService;
-import com.fdkankan.scene.util.OssBodySegmentUtil;
+//import com.fdkankan.scene.util.OssBodySegmentUtil;
 import com.fdkankan.web.response.ResultData;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,14 +49,14 @@ public class SceneServiceImpl implements ISceneService {
     @Value("${oss.bodySegment.point:oss-cn-shanghai.aliyuncs.com}")
     private String bodySegmentHost;
 
-    @Autowired
-    private OssBodySegmentUtil ossBodySegmentUtil;
+//    @Autowired
+//    private OssBodySegmentUtil ossBodySegmentUtil;
     @Autowired
     private RedisUtil redisUtil;
-    @Autowired
-    private RabbitMqProducer rabbitMqProducer;
-    @Autowired
-    private FYunFileServiceInterface fYunFileService;
+//    @Autowired
+//    private RabbitMqProducer rabbitMqProducer;
+//    @Autowired
+//    private FYunFileServiceInterface fYunFileService;
     @Autowired
     public FYunFileConfig fYunFileConfig;
 
@@ -99,7 +99,7 @@ public class SceneServiceImpl implements ISceneService {
         ImgUtil.scale(new File(tempFile.getPath()), new File(tempFile.getPath()), scale);
 
         String orgImgOssPath = "body_segment/original/" + tempFile.getName();
-        ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
+//        ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
 //        fYunFileService.uploadFile(bodySegmentBucket, tempFile.getPath(), orgImgOssPath);
 
         BodySegmentStatusBean bodySegmentStatusBean = BodySegmentStatusBean.builder().uuid(uuid).status(CommonOperStatus.WAITING.code()).build();
@@ -108,7 +108,7 @@ public class SceneServiceImpl implements ISceneService {
         Map<String, String> map = new HashMap<>();
         map.put("uuid", uuid);
         map.put("imgUrl", "https://" +  bodySegmentBucket + "." + bodySegmentHost + "/" + orgImgOssPath);
-        rabbitMqProducer.sendByWorkQueue(queueName, map);
+//        rabbitMqProducer.sendByWorkQueue(queueName, map);
 
         return ResultData.ok(uuid);
     }
@@ -134,12 +134,12 @@ public class SceneServiceImpl implements ISceneService {
                     DateExtUtil.format(Calendar.getInstance().getTime(), DateExtUtil.dateStyle6);
             String fileName = uuid + ".png";
             String imgPath = dir + "/" + fileName;
-            ossBodySegmentUtil.extracted(imgUrl, dir, fileName);
+//            ossBodySegmentUtil.extracted(imgUrl, dir, fileName);
             if(!FileUtil.exist(imgPath)){
                 throw new Exception("提取图片失败");
             }
             String targetOssImgPath = "body_segment/segment/" + uuid + ".png";
-            fYunFileService.uploadFile(imgPath, targetOssImgPath);
+//            fYunFileService.uploadFile(imgPath, targetOssImgPath);
             bodySegmentStatusBean.setStatus(CommonOperStatus.SUCCESS.code());
             bodySegmentStatusBean.setImageUrl(fYunFileConfig.getHost() + targetOssImgPath);
             redisUtil.set(String.format(RedisKey.SCENE_BODY_SEGMENT, uuid), JSON.toJSONString(bodySegmentStatusBean), RedisKey.CAMERA_EXPIRE_7_TIME);

+ 98 - 98
src/main/java/com/fdkankan/scene/util/OssBodySegmentUtil.java

@@ -1,98 +1,98 @@
-package com.fdkankan.scene.util;
-
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.http.HttpUtil;
-import com.aliyun.imageseg20191230.models.SegmentBodyResponse;
-import com.aliyun.oss.OSS;
-import com.aliyun.oss.OSSClientBuilder;
-import com.aliyun.tea.TeaException;
-import com.fdkankan.common.util.FileUtils;
-import com.fdkankan.scene.httpclient.MyClient;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.io.File;
-
-@Slf4j
-@Component
-@RefreshScope
-public class OssBodySegmentUtil {
-
-    @Value("${oss.bodySegment.point:oss-cn-shanghai.aliyuncs.com}")
-    private String endPoint;
-
-    @Value("${oss.bodySegment.imagesegPoint:imageseg.cn-shanghai.aliyuncs.com}")
-    private String imagesegEndPoint;
-
-    @Value("${fyun.key}")
-    private String accessKeyId;
-
-    @Value("${fyun.secret}")
-    private String accessKeySecret;
-
-    @Value("${oss.bodySegment.bucket:4dkankan-huadong}")
-    private String bucket;
-
-    @Resource
-    private MyClient myClient;
-
-    public void uploadOss(String filePath, String key){
-        OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, accessKeySecret);
-        try {
-            File file = new File(filePath);
-            if (!file.exists()) {
-                log.error("要上传的文件不存在:" + filePath);
-                return;
-            }
-            ossClient.putObject(bucket, key, new File(filePath));
-        } catch (Exception e) {
-            log.error(e.toString() + filePath);
-        } finally {
-            ossClient.shutdown();
-        }
-    }
-
-    public void extracted(String imageUrl, String dir, String fileName) throws Exception {
-        try {
-            com.aliyun.imageseg20191230.Client client = this.createClient();
-            com.aliyun.imageseg20191230.models.SegmentBodyRequest segmentBodyRequest =
-                    new com.aliyun.imageseg20191230.models.SegmentBodyRequest().setImageURL(imageUrl);
-            com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
-            // 复制代码运行请自行打印 API 的返回值
-            SegmentBodyResponse segmentBodyResponse = client.segmentBodyWithOptions(segmentBodyRequest, runtime);
-            String imageURL = segmentBodyResponse.getBody().getData().getImageURL();
-            log.info("人体抠图imageURL:{}", imageURL);
-            myClient.downloadFile(imageURL, dir, fileName);
-        }catch (Exception e){
-            log.error("人体抠图失败,imageUrl:" + imageUrl, e);
-            myClient.downloadFile(imageUrl, dir, fileName);
-        }
-
-    }
-
-    public static void main(String[] args) {
-        FileUtils.downLoadFromUrl("http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/segment-body/2023-02-24/5d44fe44-308c-44c3-8e1d-2d4cbe601f86/image.png?Expires=1677208715&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRpDvh1&Signature=4ZyzaOz6W1nBD9s3KQuFN10c%2BPw%3D",
-                "1.png","D:\\test");
-    }
-
-    /**
-     * 使用AK&SK初始化账号Client
-     * @return Client
-     * @throws Exception
-     */
-    public com.aliyun.imageseg20191230.Client createClient() throws Exception {
-        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
-                // 必填,您的 AccessKey ID
-                .setAccessKeyId(accessKeyId)
-                // 必填,您的 AccessKey Secret
-                .setAccessKeySecret(accessKeySecret);
-        // 访问的域名
-        config.endpoint = this.imagesegEndPoint;
-        return new com.aliyun.imageseg20191230.Client(config);
-    }
-
-}
+//package com.fdkankan.scene.util;
+//
+//import cn.hutool.core.io.FileUtil;
+//import cn.hutool.http.HttpUtil;
+//import com.aliyun.imageseg20191230.models.SegmentBodyResponse;
+//import com.aliyun.oss.OSS;
+//import com.aliyun.oss.OSSClientBuilder;
+//import com.aliyun.tea.TeaException;
+//import com.fdkankan.common.util.FileUtils;
+//import com.fdkankan.scene.httpclient.MyClient;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.cloud.context.config.annotation.RefreshScope;
+//import org.springframework.stereotype.Component;
+//
+//import javax.annotation.Resource;
+//import java.io.File;
+//
+//@Slf4j
+//@Component
+//@RefreshScope
+//public class OssBodySegmentUtil {
+//
+//    @Value("${oss.bodySegment.point:oss-cn-shanghai.aliyuncs.com}")
+//    private String endPoint;
+//
+//    @Value("${oss.bodySegment.imagesegPoint:imageseg.cn-shanghai.aliyuncs.com}")
+//    private String imagesegEndPoint;
+//
+//    @Value("${fyun.key}")
+//    private String accessKeyId;
+//
+//    @Value("${fyun.secret}")
+//    private String accessKeySecret;
+//
+//    @Value("${oss.bodySegment.bucket:4dkankan-huadong}")
+//    private String bucket;
+//
+//    @Resource
+//    private MyClient myClient;
+//
+//    public void uploadOss(String filePath, String key){
+//        OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, accessKeySecret);
+//        try {
+//            File file = new File(filePath);
+//            if (!file.exists()) {
+//                log.error("要上传的文件不存在:" + filePath);
+//                return;
+//            }
+//            ossClient.putObject(bucket, key, new File(filePath));
+//        } catch (Exception e) {
+//            log.error(e.toString() + filePath);
+//        } finally {
+//            ossClient.shutdown();
+//        }
+//    }
+//
+//    public void extracted(String imageUrl, String dir, String fileName) throws Exception {
+//        try {
+//            com.aliyun.imageseg20191230.Client client = this.createClient();
+//            com.aliyun.imageseg20191230.models.SegmentBodyRequest segmentBodyRequest =
+//                    new com.aliyun.imageseg20191230.models.SegmentBodyRequest().setImageURL(imageUrl);
+//            com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
+//            // 复制代码运行请自行打印 API 的返回值
+//            SegmentBodyResponse segmentBodyResponse = client.segmentBodyWithOptions(segmentBodyRequest, runtime);
+//            String imageURL = segmentBodyResponse.getBody().getData().getImageURL();
+//            log.info("人体抠图imageURL:{}", imageURL);
+//            myClient.downloadFile(imageURL, dir, fileName);
+//        }catch (Exception e){
+//            log.error("人体抠图失败,imageUrl:" + imageUrl, e);
+//            myClient.downloadFile(imageUrl, dir, fileName);
+//        }
+//
+//    }
+//
+//    public static void main(String[] args) {
+//        FileUtils.downLoadFromUrl("http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/segment-body/2023-02-24/5d44fe44-308c-44c3-8e1d-2d4cbe601f86/image.png?Expires=1677208715&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRpDvh1&Signature=4ZyzaOz6W1nBD9s3KQuFN10c%2BPw%3D",
+//                "1.png","D:\\test");
+//    }
+//
+//    /**
+//     * 使用AK&SK初始化账号Client
+//     * @return Client
+//     * @throws Exception
+//     */
+//    public com.aliyun.imageseg20191230.Client createClient() throws Exception {
+//        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
+//                // 必填,您的 AccessKey ID
+//                .setAccessKeyId(accessKeyId)
+//                // 必填,您的 AccessKey Secret
+//                .setAccessKeySecret(accessKeySecret);
+//        // 访问的域名
+//        config.endpoint = this.imagesegEndPoint;
+//        return new com.aliyun.imageseg20191230.Client(config);
+//    }
+//
+//}

+ 0 - 97
src/main/java/com/fdkankan/scene/util/test.java

@@ -1,97 +0,0 @@
-package com.fdkankan.scene.util;
-// This file is auto-generated, don't edit it. Thanks.
-
-import cn.hutool.core.io.FileUtil;
-import cn.hutool.core.thread.ThreadUtil;
-import cn.hutool.http.HttpUtil;
-import com.aliyun.imageseg20191230.Client;
-import com.aliyun.imageseg20191230.models.SegmentBodyResponse;
-import com.aliyun.tea.TeaException;
-import com.aliyun.teautil.Common;
-
-import java.io.File;
-
-public class test {
-
-    /**
-     * 使用AK&SK初始化账号Client
-     *
-     * @param accessKeyId
-     * @param accessKeySecret
-     * @return Client
-     * @throws Exception
-     */
-    public static com.aliyun.imageseg20191230.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
-        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
-                // 必填,您的 AccessKey ID
-                .setAccessKeyId(accessKeyId)
-                // 必填,您的 AccessKey Secret
-                .setAccessKeySecret(accessKeySecret);
-        // 访问的域名
-        config.endpoint = "imageseg.cn-shanghai.aliyuncs.com";
-        return new com.aliyun.imageseg20191230.Client(config);
-    }
-
-    public static void main(String[] args_) throws Exception {
-
-        java.util.List<String> args = java.util.Arrays.asList(args_);
-        // 工程代码泄露可能会导致AccessKey泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/378657.html
-        com.aliyun.imageseg20191230.Client client = test.createClient("LTAIUrvuHqj8pvry", "JLOVl0k8Ke0aaM8nLMMiUAZ3EiiqI4");
-        ThreadUtil.execAsync(() -> {
-            extracted(client, "https://4dkankan-huadong.oss-cn-shanghai.aliyuncs.com/segment/1.jpg", "1");
-
-        });
-        ThreadUtil.execAsync(() -> {
-            extracted(client, "https://4dkankan-huadong.oss-cn-shanghai.aliyuncs.com/segment/2.jpg", "2");
-
-        });
-        ThreadUtil.sleep(1000);
-        ThreadUtil.execAsync(() -> {
-            extracted(client, "https://4dkankan-huadong.oss-cn-shanghai.aliyuncs.com/segment/3.jpg", "3");
-
-        });
-        ThreadUtil.execAsync(() -> {
-            extracted(client, "https://4dkankan-huadong.oss-cn-shanghai.aliyuncs.com/segment/4.webp", "4");
-
-        });
-//      ThreadUtil.sleep(2000);
-//      ThreadUtil.sleep(3000);
-
-//      ThreadUtil.sleep(4000);
-
-
-    }
-
-    private static void extracted(Client client, String imageUrl, String imgName) {
-
-        com.aliyun.imageseg20191230.models.SegmentBodyRequest segmentBodyRequest = new com.aliyun.imageseg20191230.models.SegmentBodyRequest()
-                .setImageURL(imageUrl);
-        com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
-        try {
-            // 复制代码运行请自行打印 API 的返回值
-            long stime = System.currentTimeMillis();
-            System.out.println("开始-----------" + imgName);
-            SegmentBodyResponse segmentBodyResponse = client.segmentBodyWithOptions(segmentBodyRequest, runtime);
-            String imageURL = segmentBodyResponse.getBody().getData().getImageURL();
-            long etime = System.currentTimeMillis();
-            System.out.printf("执行时长:%d 毫秒.----%s", (etime - stime), imgName);
-            File file = FileUtil.file("C:\\Users\\4DAGE\\Downloads\\抠像测试\\抠像测试\\1\\" + imgName + ".png");
-            if (FileUtil.exist(file)) {
-                FileUtil.del(file);
-            }
-            System.out.println(imageURL);
-            ThreadUtil.sleep(1000);
-            HttpUtil.downloadFile(imageURL, FileUtil.file(file));
-        } catch (TeaException error) {
-            // 如有需要,请打印 error
-            String s = Common.assertAsString(error.message);
-            System.out.println("错误1" + s);
-        } catch (Exception _error) {
-            TeaException error = new TeaException(_error.getMessage(), _error);
-            // 如有需要,请打印 error
-            String s = Common.assertAsString(error.message);
-            System.out.println("错误2" + s);
-
-        }
-    }
-}

+ 57 - 0
src/main/resources/application-test.yml

@@ -0,0 +1,57 @@
+spring:
+  application:
+    name: 4dkankan-center-scene
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource          # 数据源类型:HikariCP
+    driver-class-name: com.mysql.jdbc.Driver          # mysql驱动
+    #192.168.0.146
+    url: jdbc:mysql://192.168.0.25:3306/4dkankan_v4?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
+    username: root
+    password: 4dkk2023cuikuan%
+    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   # 连接测试语句
+
+fyun:
+  type: local
+  key:
+  secret:
+  bucket: 4dkankan
+  endPoint:
+  host: /oss/
+
+main:
+  url: xxx
+
+scene:
+  url: show.html?m=
+  pro:
+    url: showProMobile.html?m=
+    v3:
+      url: smobile.html?m=
+    new:
+      url: smg.html?m=
+  expired:
+    month: 6
+  cleanOrig:
+    month: 12
+  cleanDeleted:  ##已删除场景的资源清除时限
+    month: 6
+  cleanTestCamera:  ##清除测试环境测试相机场景资源配置
+    snCode:
+    month: 6
+  coldStorage:
+    month: 12
+
+
+
+
+
+
+

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: dev
+    active: test

+ 0 - 72
src/main/resources/bootstrap-dev-eur.yml

@@ -1,72 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      config:
-        server-addr: 192.168.0.47:8848
-        file-extension: yaml
-        namespace: 4dkankan-dev
-        extension-configs:
-          - data-id: 4dkankan-center-scene.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: other-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-upload-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-      discovery:
-        server-addr: 192.168.0.47:8848
-        namespace: 4dkankan-dev
-    sentinel:
-      transport:
-        dashboard: 192.168.0.47:8888
-        heartbeat-interval-ms: 500
-        port: 8719
-      eager: true #取消sentinel控制台懒加载
-      #sentinel配置持久化nacos
-      datasource:
-        #流控规则
-        flow:
-          nacos:
-            server-addr: ${spring.cloud.nacos.config.server-addr}
-            dataId: ${spring.application.name}-flow-rules
-            groupId: SENTINEL_GROUP
-            namespace: 4dkankan-dev
-            rule-type: flow
-        #熔断规则
-        degrade:
-          nacos:
-            server-addr: ${spring.cloud.nacos.config.server-addr}
-            dataId: ${spring.application.name}-degrade-rules
-            groupId: SENTINEL_GROUP
-            namespace: 4dkankan-dev
-            rule-type: degrade
-#      log:
-#        dir: ./logs # 默认值${home}/logs/csp/
-#        switch-pid: true # 日志带上线程id
-
-#开启feign熔断降级,如果没有开启,feign调用链路不会显示再sentinel控制中
-#feign:
-#  sentinel:
-#    enabled: true
-
-feign:
-  httpclient:
-    connection-timeout: 200000
-
-
-
-

+ 0 - 35
src/main/resources/bootstrap-dev.yml

@@ -1,35 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      server-addr: 120.24.144.164:8848
-      namespace: 4dkankan-v4-test
-      config:
-        file-extension: yaml
-        namespace: ${spring.cloud.nacos.namespace}
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-fyun-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-      discovery:
-        namespace: ${spring.cloud.nacos.namespace}
-
-
-
-
-
-
-

+ 0 - 36
src/main/resources/bootstrap-prod-eur.yml

@@ -1,36 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      server-addr: 172.31.47.163:8848
-      namespace: 4dkankan-v4-prod-eur
-      config:
-        file-extension: yaml
-        namespace: ${spring.cloud.nacos.namespace}
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-fyun-config.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
-      discovery:
-        namespace: ${spring.cloud.nacos.namespace}

+ 0 - 43
src/main/resources/bootstrap-prod.yml

@@ -1,43 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      server-addr: 172.20.1.63:8848
-      namespace: 4dkankan-v4-prod
-      config:
-        file-extension: yaml
-        namespace: ${spring.cloud.nacos.namespace}
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-fyun-config.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
-      discovery:
-        namespace: ${spring.cloud.nacos.namespace}
-
-
-
-
-
-
-

+ 0 - 43
src/main/resources/bootstrap-test-eur.yml

@@ -1,43 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      server-addr: 120.24.144.164:8848
-      namespace: 4dkankan-v4-test-eur
-      config:
-        file-extension: yaml
-        namespace: ${spring.cloud.nacos.namespace}
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-fyun-config.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
-      discovery:
-        namespace: ${spring.cloud.nacos.namespace}
-
-
-
-
-
-
-

+ 0 - 44
src/main/resources/bootstrap-test.yml

@@ -1,44 +0,0 @@
-spring:
-  application:
-    name: 4dkankan-center-scene
-  cloud:
-    nacos:
-      server-addr: 120.24.144.164:8848
-      namespace: 4dkankan-v4-test
-      config:
-        file-extension: yaml
-        namespace: ${spring.cloud.nacos.namespace}
-        shared-configs:
-          - data-id: common-db-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-redis-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-config.yaml
-            group: DEFAULT_GROUP
-            refresh: true
-
-          - data-id: common-fyun-config.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
-      discovery:
-        namespace: ${spring.cloud.nacos.namespace}
-#        namespace: public
-
-
-
-
-
-
-