Browse Source

项目流转短信消息

master
zhaoqifeng 5 years ago
parent
commit
8f2ef22a58
  1. 19
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  2. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

19
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -707,6 +707,25 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
logger.error("项目流转,推送微信订阅消息失败");
//throw new RenException(ProjectConstant.SAVE_WXMP_MSG_EXCEPTION);
}
//短信消息
List<ProjectSendMsgFormDTO> smsList = new ArrayList<>();
staffList.forEach(staff -> {
CustomerStaffDTO staffDTO = new CustomerStaffDTO();
staffDTO.setUserId(staff.getStaffId());
Result<CustomerStaffDTO> staffResult = epmetUserFeignClient.getCustomerStaffInfoByUserId(staffDTO);
if (staffResult.success() && null != staffResult.getData()) {
ProjectSendMsgFormDTO sms = new ProjectSendMsgFormDTO();
sms.setCustomerId(staffResult.getData().getCustomerId());
sms.setMobile(staffResult.getData().getMobile());
sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_TRANSFER);
smsList.add(sms);
}
});
Result result = epmetMessageOpenFeignClient.projectSendMsg(smsList);
if (!result.success()) {
logger.error("项目流转,发送手机短信失败" + JSON.toJSONString(result));
}
}
}

17
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -1813,6 +1813,23 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
if (!result.success()) {
logger.error("项目退回成功,发送微信订阅消息失败" + JSON.toJSONString(result));
}
//短信消息
List<ProjectSendMsgFormDTO> smsList = new ArrayList<>();
CustomerStaffDTO staffDTO = new CustomerStaffDTO();
staffDTO.setUserId(projectStaffDTO.getStaffId());
Result<CustomerStaffDTO> staffResult = epmetUserFeignClient.getCustomerStaffInfoByUserId(staffDTO);
if (staffResult.success() && null != staffResult.getData()) {
ProjectSendMsgFormDTO sms = new ProjectSendMsgFormDTO();
sms.setCustomerId(staffResult.getData().getCustomerId());
sms.setMobile(staffResult.getData().getMobile());
sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_TRANSFER);
smsList.add(sms);
}
result = epmetMessageOpenFeignClient.projectSendMsg(smsList);
if (!result.success()) {
logger.error("项目退回,发送手机短信失败" + JSON.toJSONString(result));
}
}
/**

Loading…
Cancel
Save