diff --git a/pnkx-blog/src/main/java/com/pnkx/service/impl/PxFriendLinkServiceImpl.java b/pnkx-blog/src/main/java/com/pnkx/service/impl/PxFriendLinkServiceImpl.java index 2d0c0a8..b5365e6 100644 --- a/pnkx-blog/src/main/java/com/pnkx/service/impl/PxFriendLinkServiceImpl.java +++ b/pnkx-blog/src/main/java/com/pnkx/service/impl/PxFriendLinkServiceImpl.java @@ -93,7 +93,7 @@ public class PxFriendLinkServiceImpl implements IPxFriendLinkService { throw new ServiceException("发送邮件异常"); } } - if ("2".equals(pxFriendLink.getStatus())) { + if ("2".equals(pxFriendLink.getStatus()) && StringUtils.isNotNull(pxFriendLink.getEmail())) { // 改为失效的友链 SysEmail sysEmail = new SysEmail(); String activationTemplate = TemplateUtils.getTemplate("link"); @@ -104,7 +104,7 @@ public class PxFriendLinkServiceImpl implements IPxFriendLinkService { activationTemplate = activationTemplate.replace("template-lineImg", pxFriendLink.getImg()); activationTemplate = activationTemplate.replace("template-lineEmail", pxFriendLink.getEmail()); sysEmail.setReceiverEmail(pxFriendLink.getEmail()); - sysEmail.setSubject("\uD83D\uDC49 叮咚!「Pei你看雪博客」上有人申请友链"); + sysEmail.setSubject("\uD83D\uDC49 叮咚!「Pei你看雪博客」上您的友链已失效"); sysEmail.setContent(activationTemplate); try { sysEmailService.sendMail(sysEmail);