9 changed files with 90 additions and 5 deletions
@ -0,0 +1,59 @@ |
|||
//package com.project.exam.domain.service.impl;
|
|||
//
|
|||
//
|
|||
//import com.github.tingyugetc520.ali.dingtalk.api.DtService;
|
|||
//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 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.junit4.SpringRunner;
|
|||
//
|
|||
//import java.util.Collections;
|
|||
//
|
|||
//@SpringBootTest
|
|||
//@RunWith(SpringRunner.class) // 必须添加这一行
|
|||
//
|
|||
//public class NotifyExamRecordDomainServiceImplTest {
|
|||
// @Autowired
|
|||
// private DtService dtService;
|
|||
// @Test
|
|||
// public void notifyExamRecord() {
|
|||
// System.out.println("111");
|
|||
// String userId = "01231011386731976125,01291369685624598595";
|
|||
//
|
|||
// // 不阻碍正常业务
|
|||
// try {
|
|||
// String markdown = String.format("### 【%s】考试成绩已公布,请留意查收\n\n", "" +
|
|||
// String.format("考试成绩:%.2f\n\n",0.1) +
|
|||
// String.format("考试结果:%s\n\n", Boolean.FALSE ? "考试通过" : "考试不通过") +
|
|||
// String.format("%s\n\n", Boolean.TRUE ? "恭喜考试通过,请继续保持!可以自行查看考试结果" :
|
|||
// "遗憾考试不通过,请再接再厉!可以查看考试结果或尝试重新补考"));
|
|||
// DtCorpConversationMessage message = DtCorpConversationMessage.builder()
|
|||
// .agentId(dtService.getDtConfigStorage().getAgentId())
|
|||
// .userIds(Collections.singletonList(userId))
|
|||
// .msg(DtMessage.ACTIONCARD()
|
|||
// .title("产品知识考核")
|
|||
// .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())
|
|||
// .build();
|
|||
// DtCorpConversationMsgSendResult result = dtService.getCorpConversationMsgService().send(message);
|
|||
// if (result.getErrCode() == 0) {
|
|||
//
|
|||
// } else {
|
|||
//
|
|||
// }
|
|||
//
|
|||
// } catch (Exception e) {
|
|||
//
|
|||
// }
|
|||
//
|
|||
// }
|
|||
//
|
|||
//}
|
|||
Loading…
Reference in new issue