From 492b965069979400617e81f7eb63d9dcd05b282d Mon Sep 17 00:00:00 2001 From: luogw <3132758203@qq.com> Date: Mon, 16 Mar 2026 17:24:47 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/project/ding/utils/DingUtil.java | 11 +++++++++-- src/main/resources/application-dev.yml | 11 ++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/project/ding/utils/DingUtil.java b/src/main/java/com/project/ding/utils/DingUtil.java index 1b260bf..c12bcca 100644 --- a/src/main/java/com/project/ding/utils/DingUtil.java +++ b/src/main/java/com/project/ding/utils/DingUtil.java @@ -24,6 +24,7 @@ import com.project.ding.domain.dto.UserDTO; import io.vavr.control.Try; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; @@ -57,6 +58,8 @@ public class DingUtil { @Autowired private DingProperties dingTalkProperties; + @Value("${ding.corpId}") + private String corpId; private static final String TICKET_KEY = "dingtalk:jsapi_ticket"; @@ -266,7 +269,6 @@ public class DingUtil { @Async("asycExecutor") public void sendWorkNotice(AppealDTO appealDTO) throws DtErrorException { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - String nowTime = LocalDateTime.now().format(formatter); boolean approved = appealDTO.getStatus() != null && appealDTO.getStatus() == 2; StringBuilder markdown = new StringBuilder(); @@ -274,6 +276,11 @@ public class DingUtil { .append(String.format("处理结果:%s\n\n" ,approved ? "同意" : "不同意")) .append(String.format("处理理由:%s" , appealDTO.getReason())); + StringBuilder url = new StringBuilder(); + url.append(String.format("http://172.16.25.182:5173/examResult/?" + + "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF" + + "&corpid=%s&id=%d&index=%d",corpId,appealDTO.getId(),appealDTO.getQuestionSort())); + //发送工作通知 DtCorpConversationMessage corpConversationMessage = DtCorpConversationMessage.builder() .agentId(dtService.getDtConfigStorage().getAgentId()) @@ -282,7 +289,7 @@ public class DingUtil { .title("产品知识考核") .markdown(markdown.toString()) .singleTitle("查看详情") - .singleUrl("https://www.baidu.com/") + .singleUrl(url.toString()) .build()) .build(); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 6a2ea8c..7d1f4f0 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -61,7 +61,7 @@ milvus: host: 8.129.84.155 port: 19530 analysis: - host: 8.129.84.155 + host: 172.16.204.50 port: 8888 url: /word/parse ding: @@ -70,13 +70,18 @@ ding: agentId: 4283077101 corpId: ding13d71da66ad91ff0f5bf40eda33b7ba0 algo: - clusterUrl: /api/algorithm/v1/cluster - baseUrl: / + clusterUrl: /semantic-cluster + baseUrl: http://172.16.204.50:8002 generateQuestionUrl: /v1/generate/questions_from_cluster apiUrl: http://8.129.84.155:8000 +jwt: + secret: "my-very-fixed-and-secure-secret-key-1234567890" # 题目生成相关配置 question: generation: # 限流速率:每秒允许的API请求数 rate-limit: 20 + +scheduled-task: + owner: test \ No newline at end of file