Browse Source

bug修复

master
luogw 1 month ago
parent
commit
492b965069
  1. 11
      src/main/java/com/project/ding/utils/DingUtil.java
  2. 11
      src/main/resources/application-dev.yml

11
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();

11
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
Loading…
Cancel
Save