每日10am统一发送支付失败邮件
()
| 82 | * 每日10am统一发送支付失败邮件 |
| 83 | */ |
| 84 | @Scheduled(cron="0 0 10 * * ?") |
| 85 | public void sendEmailJob(){ |
| 86 | |
| 87 | List<Pay> list=payDao.getByStateIs(2); |
| 88 | for(Pay p:list){ |
| 89 | p.setTime(StringUtils.getTimeStamp(p.getCreateTime())); |
| 90 | if(StringUtils.isNotBlank(p.getEmail())&&EmailUtils.checkEmail(p.getEmail())) { |
| 91 | emailUtils.sendTemplateMail(EMAIL_SENDER, p.getEmail(), "【XPay个人收款支付系统】支付失败通知", "pay-fail", p); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | log.info("定时执行统一发送支付失败邮件完毕"); |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * 每日1am关闭系统7小时 |
nothing calls this directly
no test coverage detected