dengsixing 1 年之前
父节点
当前提交
8954e15775

+ 5 - 5
pom.xml

@@ -71,11 +71,11 @@
       <version>3.0.0-SNAPSHOT</version>
     </dependency>
 
-    <dependency>
-      <groupId>com.fdkankan</groupId>
-      <artifactId>4dkankan-utils-dingtalk</artifactId>
-      <version>3.0.0-SNAPSHOT</version>
-    </dependency>
+<!--    <dependency>-->
+<!--      <groupId>com.fdkankan</groupId>-->
+<!--      <artifactId>4dkankan-utils-dingtalk</artifactId>-->
+<!--      <version>3.0.0-SNAPSHOT</version>-->
+<!--    </dependency>-->
 
     <dependency>
       <groupId>com.fdkankan</groupId>

+ 25 - 25
src/main/java/com/fdkankan/contro/service/impl/BuildSceneDTServiceImpl.java

@@ -2,9 +2,9 @@ package com.fdkankan.contro.service.impl;
 
 import cn.hutool.core.util.StrUtil;
 import com.fdkankan.contro.service.IBuildSceneDTService;
-import com.fdkankan.dingtalk.DingTalkSendUtils;
+//import com.fdkankan.dingtalk.DingTalkSendUtils;
 import com.fdkankan.fyun.config.FYunFileConfig;
-import com.taobao.api.ApiException;
+//import com.taobao.api.ApiException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -35,8 +35,8 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
 
     public static final String contentExt = "**algorithm-log**: [%sbuild_log/%s/console.log](%sbuild_log/%s/console.log)";
 
-    @Autowired
-    private DingTalkSendUtils dingTalkSendUtils;
+//    @Autowired
+//    private DingTalkSendUtils dingTalkSendUtils;
 
     @Autowired
     private FYunFileConfig fYunFileConfig;
@@ -46,30 +46,30 @@ public class BuildSceneDTServiceImpl implements IBuildSceneDTService {
 
     @Override
     public void handModelFail(String reason, String serverPath, String num, String hostName) {
-        CompletableFuture.runAsync(() -> {
-            try {
-                log.info("开始发送钉钉消息");
-                String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
-                log.info("发送钉钉消息,content:{}", logPath);
-                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
-                log.info("发送钉钉消息,content:{}", content);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
-            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
-                log.error("发送钉钉消息失败", apiException);
-            }
-        });
+//        CompletableFuture.runAsync(() -> {
+//            try {
+//                log.info("开始发送钉钉消息");
+//                String logPath = String.format(contentExt,fYunFileConfig.getHost(),num,fYunFileConfig.getHost(),num);
+//                log.info("发送钉钉消息,content:{}", logPath);
+//                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath) + logPath;
+//                log.info("发送钉钉消息,content:{}", content);
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
+//            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
+//                log.error("发送钉钉消息失败", apiException);
+//            }
+//        });
     }
 
     @Override
     public void handBaseFail(String reason, String serverPath, String num, String hostName) {
-        CompletableFuture.runAsync(() -> {
-            try {
-                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
-                log.info("发送钉钉消息,content:{}", content);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
-            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
-                log.error("发送钉钉消息失败", apiException);
-            }
-        });
+//        CompletableFuture.runAsync(() -> {
+//            try {
+//                String content = String.format(this.DINGTALK_MSG_PATTERN, this.mainUrl, hostName, reason, num, serverPath);
+//                log.info("发送钉钉消息,content:{}", content);
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content,"场景计算失败");
+//            } catch (ApiException | UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException apiException) {
+//                log.error("发送钉钉消息失败", apiException);
+//            }
+//        });
     }
 }

+ 5 - 5
src/main/java/com/fdkankan/contro/service/impl/Scene3dNumServiceImpl.java

@@ -14,7 +14,7 @@ import com.fdkankan.contro.enums.CameraTypeEnum;
 import com.fdkankan.contro.mapper.IScene3dNumMapper;
 import com.fdkankan.contro.service.ICameraTypeService;
 import com.fdkankan.contro.service.IScene3dNumService;
-import com.fdkankan.dingtalk.DingTalkSendUtils;
+//import com.fdkankan.dingtalk.DingTalkSendUtils;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
 import com.fdkankan.redis.util.RedisLockUtil;
@@ -67,8 +67,8 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
     @Value("${main.url}")
     private String mainUrl;
 
-    @Autowired
-    private DingTalkSendUtils dingTalkSendUtils;
+//    @Autowired
+//    private DingTalkSendUtils dingTalkSendUtils;
     @Autowired
     private ICameraTypeService cameraTypeService;
 
@@ -87,7 +87,7 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
         sceneNum = redisUtil.lLeftPop(RedisKey.FDKANKAN_SCENE_NUMS);
         if(Objects.isNull(sceneNum)){
             String content = String.format(this.DINGTALK_MSG_PATTERN, mainUrl, "场景码穷尽告警", "场景计算获取场景码失败");
-            dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
+//            dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
             throw new Exception("场景计算获取场景码失败");
         }
         return addPrefix(sceneNum,cameraType);
@@ -113,7 +113,7 @@ public class Scene3dNumServiceImpl extends ServiceImpl<IScene3dNumMapper, Scene3
             List<String> nums = this.findSceneNum(cachePageSize);
             if(CollUtil.isEmpty(nums) || nums.size() < cachePageSize){
                 String content = String.format(this.DINGTALK_MSG_PATTERN, mainUrl, "场景码穷尽告警", "场景码表中未使用状态少于" + cachePageSize);
-                dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
+//                dingTalkSendUtils.sendActioncardMsgToDingRobot(content, "场景码穷尽告警");
             }
             if(CollUtil.isNotEmpty(nums)){
                 redisUtil.lRightPushAll(RedisKey.FDKANKAN_SCENE_NUMS, nums);