From ab65e97dbd71a246fc0d54a71ebd0429ba7f993f Mon Sep 17 00:00:00 2001 From: luoweijian <1329394916@qq.com> Date: Wed, 18 Mar 2026 16:11:17 +0800 Subject: [PATCH] bug --- .../impl/NotifyExamRecordDomainServiceImpl.java | 2 +- .../NotifyExamRecordDomainServiceImplTest.java | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImpl.java b/src/main/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImpl.java index 94769b1..b2ea7a4 100644 --- a/src/main/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImpl.java +++ b/src/main/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImpl.java @@ -44,7 +44,7 @@ public class NotifyExamRecordDomainServiceImpl implements NotifyExamRecordDomain .singleTitle("查看详情") // todo 修改为对应页面 .singleUrl(dingProperties.getNoticeUrlPrefix() + - "examResult/?" + "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF" + + "/examResult/?" + "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF" + "&corpid=" + dingProperties.getCorpId() + "&id=" + dto.getId() + "&index=1" ).build()) .build(); diff --git a/src/test/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImplTest.java b/src/test/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImplTest.java index 693816a..00c94c1 100644 --- a/src/test/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImplTest.java +++ b/src/test/java/com/project/exam/domain/service/impl/NotifyExamRecordDomainServiceImplTest.java @@ -5,20 +5,26 @@ //import com.github.tingyugetc520.ali.dingtalk.bean.message.DtCorpConversationMessage; //import com.github.tingyugetc520.ali.dingtalk.bean.message.DtCorpConversationMsgSendResult; //import com.github.tingyugetc520.ali.dingtalk.bean.message.DtMessage; +//import com.project.ding.config.DingProperties; //import org.junit.Test; //import org.junit.runner.RunWith; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.boot.test.context.SpringBootTest; +//import org.springframework.test.context.ActiveProfiles; //import org.springframework.test.context.junit4.SpringRunner; // //import java.util.Collections; // //@SpringBootTest //@RunWith(SpringRunner.class) // 必须添加这一行 -// +//@ActiveProfiles("test") // 假设你想使用 application-dev.yml //public class NotifyExamRecordDomainServiceImplTest { // @Autowired // private DtService dtService; +// +// +// @Autowired +// private DingProperties dingProperties; // @Test // public void notifyExamRecord() { // System.out.println("111"); @@ -39,9 +45,10 @@ // .markdown(markdown) // .singleTitle("查看详情") // // todo 修改为对应页面 -// .singleUrl("http://172.16.25.182:5173/examResult/?" + -// "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF&" + -// "corpid=ding13d71da66ad91ff0f5bf40eda33b7ba0&id=688755610295992320&index=1").build()) +// .singleUrl(dingProperties.getNoticeUrlPrefix() + +// "/examResult/?" + "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF" + +// "&corpid=" + dingProperties.getCorpId() + "&id=" + "689503022862041088" + "&index=1" +// ).build()) // .build(); // DtCorpConversationMsgSendResult result = dtService.getCorpConversationMsgService().send(message); // if (result.getErrCode() == 0) {