|
|
|
@ -4,6 +4,7 @@ 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 com.project.ding.config.DingProperties; |
|
|
|
import com.project.ding.utils.SecurityUtils; |
|
|
|
import com.project.exam.domain.dto.ExamRecordDTO; |
|
|
|
import com.project.exam.domain.service.NotifyExamRecordDomainService; |
|
|
|
@ -20,6 +21,9 @@ public class NotifyExamRecordDomainServiceImpl implements NotifyExamRecordDomain |
|
|
|
@Autowired |
|
|
|
private DtService dtService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DingProperties dingProperties; |
|
|
|
|
|
|
|
@Override |
|
|
|
public void notifyExamRecord(ExamRecordDTO dto) { |
|
|
|
String userId = SecurityUtils.getUserId(); |
|
|
|
@ -39,7 +43,10 @@ public class NotifyExamRecordDomainServiceImpl implements NotifyExamRecordDomain |
|
|
|
.markdown(markdown) |
|
|
|
.singleTitle("查看详情") |
|
|
|
// todo 修改为对应页面
|
|
|
|
.singleUrl("https://www.baidu.com/").build()) |
|
|
|
.singleUrl(dingProperties.getNoticeUrlPrefix() + |
|
|
|
"examResult/?" + "dd_nav_translucent=true&dd_full_screen=true&dd_nav_bgcolor=33E0EEFF" + |
|
|
|
"&corpid=" + dingProperties.getCorpId() + "&id=" + dto.getId() + "&index=1" |
|
|
|
).build()) |
|
|
|
.build(); |
|
|
|
DtCorpConversationMsgSendResult result = dtService.getCorpConversationMsgService().send(message); |
|
|
|
if (result.getErrCode() == 0) { |
|
|
|
|