|
|
|
@ -10,8 +10,7 @@ import com.github.tingyugetc520.ali.dingtalk.bean.message.DtCorpConversationMsgS |
|
|
|
import com.github.tingyugetc520.ali.dingtalk.bean.message.DtMessage; |
|
|
|
import com.github.tingyugetc520.ali.dingtalk.error.DtErrorException; |
|
|
|
import com.project.ding.config.DingProperties; |
|
|
|
import com.project.information.domain.entity.ProductLineEntity; |
|
|
|
import com.project.information.domain.service.ProductLineBaseService; |
|
|
|
import com.project.information.application.ProductLineApplicationService; |
|
|
|
import com.project.task.domain.dto.TaskDTO; |
|
|
|
import com.project.task.domain.entity.TaskEntity; |
|
|
|
import com.project.task.domain.entity.TaskUserEntity; |
|
|
|
@ -39,7 +38,7 @@ public class NotifyTaskDomainServiceImpl implements NotifyTaskDomainService { |
|
|
|
@Autowired |
|
|
|
private DtService dtService; |
|
|
|
@Autowired |
|
|
|
private ProductLineBaseService productLineBaseService; |
|
|
|
private ProductLineApplicationService productLineApplicationService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DingProperties dingTalkProperties; |
|
|
|
@ -91,12 +90,7 @@ public class NotifyTaskDomainServiceImpl implements NotifyTaskDomainService { |
|
|
|
} |
|
|
|
|
|
|
|
//获取子产品线名称
|
|
|
|
String subLineName = productLineBaseService.lambdaQuery() |
|
|
|
.eq(ProductLineEntity::getId , taskDTO.getSubLineId()) |
|
|
|
.select(ProductLineEntity::getName) |
|
|
|
.oneOpt() |
|
|
|
.map(ProductLineEntity::getName) |
|
|
|
.orElse(""); |
|
|
|
String subLineName = productLineApplicationService.searchLineNameById(taskDTO.getSubLineId()); |
|
|
|
|
|
|
|
StringBuilder markdown = new StringBuilder(); |
|
|
|
markdown.append(String.format("### 【%s】已经<font color=#00b500>开始</font>,请按时完成\n\n" , taskDTO.getName())) |
|
|
|
@ -143,9 +137,13 @@ public class NotifyTaskDomainServiceImpl implements NotifyTaskDomainService { |
|
|
|
if (CollUtil.isEmpty(userIds)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//获取子产品线名称
|
|
|
|
String subLineName = productLineApplicationService.searchLineNameById(taskDTO.getSubLineId()); |
|
|
|
|
|
|
|
StringBuilder markdown = new StringBuilder(); |
|
|
|
markdown.append(String.format("### 【%s】即将<font color=#FF0000>结束</font>,请按时完成\n\n" , taskDTO.getName())) |
|
|
|
.append(String.format("产品线:%s\n\n" , taskDTO.getLineName())) |
|
|
|
.append(String.format("产品线:%s\n\n" , subLineName)) |
|
|
|
.append(String.format("开考时间:%s\n\n" ,sdf.format(taskDTO.getStartTime()))) |
|
|
|
.append(String.format("截止时间:%s\n\n" , sdf.format(taskDTO.getEndTime()))) |
|
|
|
.append(String.format("注意事项:%s" , taskDTO.getNote())); |
|
|
|
|