Просмотр исходного кода

Merge branch 'release-重定位日志上传目录更改' into test

# Conflicts:
#	src/main/java/com/fdkankan/contro/controller/InnerController.java
#	src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java
dengsixing 2 месяцев назад
Родитель
Сommit
13b22dfcb8

+ 0 - 1
src/main/java/com/fdkankan/contro/ModelingControlApplication.java

@@ -23,7 +23,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 @EnableAsync
 @MapperScan("com.fdkankan.**.mapper")
 @EnableDiscoveryClient
-@ForestScan(basePackages = "com.fdkankan.contro.httpclient")
 public class ModelingControlApplication {
     public static void main(String[] args) {
         SpringApplication.run(ModelingControlApplication.class, args);

+ 3 - 0
src/main/java/com/fdkankan/contro/controller/InnerController.java

@@ -9,6 +9,9 @@ import com.fdkankan.contro.vo.LocalfdageLogParamVo;
 import com.fdkankan.web.response.ResultData;
 import lombok.extern.log4j.Log4j2;
 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;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;

+ 1 - 1
src/main/java/com/fdkankan/contro/httpclient/LaserClient.java

@@ -8,7 +8,7 @@ import com.fdkankan.contro.common.Result;
 /**
  * 获取,调用激光服务
  */
-@Address(source = LaserAddressSource.class)
+//@Address(source = LaserAddressSource.class)
 public interface LaserClient {
 
 

+ 8 - 2
src/main/java/com/fdkankan/contro/mq/service/impl/BuildSxRelocationServiceImpl.java

@@ -12,6 +12,7 @@ import com.fdkankan.contro.entity.ScenePlus;
 import com.fdkankan.contro.entity.ScenePlusExt;
 import com.fdkankan.contro.mq.service.IBuildSceneService;
 import com.fdkankan.contro.service.*;
+import com.fdkankan.fyun.config.FYunFileConfig;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.model.constants.ConstantFileName;
 import com.fdkankan.model.constants.ConstantFilePath;
@@ -51,6 +52,8 @@ import java.util.stream.Collectors;
 @RefreshScope
 public class BuildSxRelocationServiceImpl implements IBuildSceneService {
 
+    public static final String logUrlFormat = "**algorithm-log**: [%sbuild_log/%s/e57/console.log](%sbuild_log/%s/relocation/console.log)";
+
     @Value("${queue.modeling.sx-relocation-post:sx-relocation-post}")
     private String queueModelingPost;
     @Value("${model.type:#{null}}")
@@ -75,6 +78,8 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
     private IRelocationBatchDetailService relocationBatchDetailService;
     @Autowired
     private IRelocationBatchService relocationBatchService;
+    @Resource
+    private FYunFileConfig fYunFileConfig;
 
     @Override
     public void buildScenePre(BuildSceneCallMessage message) throws Exception{
@@ -153,7 +158,7 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
             // 上传计算日志
             //如果是重复计算,没有走到计算逻辑,不需要上传日志文件
             log.info("开始上传计算日志");
-            String buildLogPath = String.format(UploadFilePath.BUILD_LOG_PATH, sceneCode);
+            String buildLogPath = String.format(UploadFilePath.BUILD_LOG_PATH, sceneCode) + "relocation/";
             fYunFileService.uploadFile(path + File.separator + "console.log", buildLogPath + "console.log");
             log.info("计算日志上传完成");
 
@@ -164,7 +169,8 @@ public class BuildSxRelocationServiceImpl implements IBuildSceneService {
                         .eq(ScenePlus::getNum, sceneCode));
 
                 // 发送钉钉消息,计算失败
-                buildSceneDTService.handModelFail("深巡场景重定向计算失败", message.getPath(), sceneCode, message.getHostName());
+                String logUrl = String.format(logUrlFormat,fYunFileConfig.getHost(),sceneCode,fYunFileConfig.getHost(),sceneCode);
+                buildSceneDTService.handModelFail("深巡场景重定向计算失败", message.getPath(), sceneCode, message.getHostName(), logUrl);
                 return;
             }
             ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);

+ 3 - 0
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -3,6 +3,9 @@ package com.fdkankan.contro.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.ObjUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.ObjUtil;
 import cn.hutool.core.util.ObjectUtil;

+ 1 - 1
src/main/resources/logback-nacos.xml

@@ -197,7 +197,7 @@
 	</appender>
 
 	<!-- 多环境配置 -->
-	<springProfile name="dev,test,prod">
+	<springProfile name="dev,test,pro">
 
 		<!--单独设置mapper包下的日志级别为DEBUG,因为输出执行的sql需要DEBUG级别-->
 		<logger name="com.fdkankan.contro.mapper" level="trace">