工作组催款提醒添加邮件发送失败提醒
This commit is contained in:
+9
-1
@@ -368,11 +368,14 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
|||||||
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
|
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
|
||||||
return Result.error("联系人不存在!");
|
return Result.error("联系人不存在!");
|
||||||
}
|
}
|
||||||
|
List<String> listMsg = new ArrayList<>();
|
||||||
listPayWorkingGroupSubItem.forEach(p->{
|
listPayWorkingGroupSubItem.forEach(p->{
|
||||||
List<PayContactsManagementTemporary> listContactsInfo = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdOne(),item.getId())).collect(Collectors.toList());
|
List<PayContactsManagementTemporary> listContactsInfo = listPayContactsManagementTemporary.stream().filter(item->Objects.equals(p.getContactsTemporaryIdOne(),item.getId())).collect(Collectors.toList());
|
||||||
if(CollectionUtils.isEmpty(listContactsInfo)){
|
if(CollectionUtils.isEmpty(listContactsInfo)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
|
||||||
// 发送消息
|
// 发送消息
|
||||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||||
if (!StringUtils.isBlank(listContactsInfo.get(0).getEmail())) {
|
if (!StringUtils.isBlank(listContactsInfo.get(0).getEmail())) {
|
||||||
@@ -392,8 +395,13 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
|||||||
json.put("id", p.getId());
|
json.put("id", p.getId());
|
||||||
sendMessageDTO.setBusId(json.toJSONString());
|
sendMessageDTO.setBusId(json.toJSONString());
|
||||||
sendMessageService.SendMessageService(sendMessageDTO);
|
sendMessageService.SendMessageService(sendMessageDTO);
|
||||||
|
}catch (Exception e){
|
||||||
|
if(e.getMessage().contains("邮件发送") && !listMsg.contains(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败")){
|
||||||
|
listMsg.add(p.getChargeCompanyTemporaryName() + "单位邮箱发送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("催款提醒成功!",listMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user