feat: 消息设置
This commit is contained in:
parent
00e7c7bed9
commit
25e9bff303
|
@ -178,16 +178,16 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
|||
List<NoticeDetail> noticeList = noticeService.queryNotice(testResult.getTestId());
|
||||
mailService.sendApiNotification(report, noticeList);
|
||||
}
|
||||
if (StringUtils.equals(NoticeConstants.API, report.getTriggerMode())) {
|
||||
if (StringUtils.equals(NoticeConstants.API, "API")) {
|
||||
List<String> userIds = new ArrayList<>();
|
||||
MessageSettingDetail messageSettingDetail = noticeService.searchMessage();
|
||||
List<MessageDetail> taskList = messageSettingDetail.getJenkinsTask();
|
||||
String contextSuccess = report.getName() + "执行成功";
|
||||
String contextFailed = report.getName() + "执行失败";
|
||||
String contextSuccess = "jenkins任务通知" + report.getName() + "执行成功";
|
||||
String contextFailed = "jenkins任务通知" + report.getName() + "执行失败";
|
||||
taskList.forEach(r -> {
|
||||
switch (r.getType()) {
|
||||
case NoticeConstants.NAIL_ROBOT:
|
||||
if (StringUtils.equals(NoticeConstants.EXECUTE_SUCCESSFUL,r.getEvent()) && StringUtils.equals(report.getStatus(), "Success")) {
|
||||
if (StringUtils.equals(NoticeConstants.EXECUTE_SUCCESSFUL, r.getEvent()) && StringUtils.equals(report.getStatus(), "Success")) {
|
||||
dingTaskService.sendNailRobot(r, userIds, contextSuccess, NoticeConstants.EXECUTE_SUCCESSFUL);
|
||||
}
|
||||
if (StringUtils.equals(NoticeConstants.EXECUTE_FAILED, r.getEvent()) && StringUtils.equals(report.getStatus(), "Error")) {
|
||||
|
|
Loading…
Reference in New Issue