Commit 5cdb20a3 by 郑永强

方案邮件空值处理

parent 5b7f0a8e
......@@ -101,15 +101,18 @@ public class CustomPlanEmailBizImpl implements CustomPlanEmailBiz {
SendEmailDto sendEmailDto = new SendEmailDto();
sendEmailDto.setTypeCode("custom_plan_email_remind");
Map<String, Object> content = new HashMap<>();
content.put("planNumber", customPlan.getPlanNumber());
content.put("planName", customPlan.getPlanName());
content.put("createUserName", customPlan.getCreateUserName());
content.put("planDescription", customPlan.getDescription());
content.put("planH5Url", customPlan.getH5Url());
content.put("robotClassifyName", customPlanEmailDto.getPcloudRobotClassifyName());
content.put("robotId", customPlanEmailDto.getRobotId());
content.put("userWxId", customPlanEmailDto.getUserWxId());
content.put("description", customPlanEmailDto.getDescription());
content.put("planNumber", StringUtil.isNotEmpty(customPlan.getPlanNumber()) ? "<br/>方案编号:".concat(customPlan.getPlanNumber()) : "");
content.put("planName", StringUtil.isNotEmpty(customPlan.getPlanName()) ? "<br/>方案名称:".concat(customPlan.getPlanName()) : "");
content.put("createUserName", StringUtil.isNotEmpty(customPlan.getCreateUserName()) ? "<br/>方案创建者:".concat(customPlan.getCreateUserName()) : "");
content.put("planDescription", StringUtil.isNotEmpty(customPlan.getDescription()) ? "<br/>方案说明:".concat(customPlan.getDescription()) : "");
content.put("planH5Url", StringUtil.isNotEmpty(customPlan.getH5Url()) ? "<br/>方案链接:".concat(customPlan.getH5Url()) : "");
content.put("planTarget",(StringUtil.isNotEmpty(customPlanEmailDto.getPcloudRobotClassifyName())
|| StringUtil.isNotEmpty(customPlanEmailDto.getRobotId())
|| StringUtil.isNotEmpty(customPlanEmailDto.getUserWxId()))? "<br/>方案对象:" : "");
content.put("robotClassifyName", StringUtil.isNotEmpty(customPlanEmailDto.getPcloudRobotClassifyName()) ? "&nbsp;&nbsp;&nbsp;&nbsp;分类:".concat(customPlanEmailDto.getPcloudRobotClassifyName()) : "");
content.put("robotId", StringUtil.isNotEmpty(customPlanEmailDto.getRobotId()) ? "&nbsp;&nbsp;&nbsp;&nbsp;小睿:".concat(customPlanEmailDto.getRobotId()) : "");
content.put("userWxId", StringUtil.isNotEmpty(customPlanEmailDto.getUserWxId()) ? "&nbsp;&nbsp;&nbsp;&nbsp;读者微信:".concat(customPlanEmailDto.getUserWxId()) : "");
content.put("description", StringUtil.isNotEmpty(customPlanEmailDto.getDescription()) ? "<br/>邮件内容补充:".concat(customPlanEmailDto.getDescription()) : "");
sendEmailDto.setContent(content);
for(String email : customPlanEmailDto.getEmailList()){
sendEmailDto.setToEmail(email);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment