MCPcopy
hub / github.com/Exrick/xpay / sendEmailJob

Method sendEmailJob

xpay-code/src/main/java/cn/exrick/common/task/Jobs.java:84–96  ·  view source on GitHub ↗

每日10am统一发送支付失败邮件

()

Source from the content-addressed store, hash-verified

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小时

Callers

nothing calls this directly

Calls 8

getTimeStampMethod · 0.95
isNotBlankMethod · 0.95
checkEmailMethod · 0.95
getByStateIsMethod · 0.80
setTimeMethod · 0.80
getCreateTimeMethod · 0.80
getEmailMethod · 0.80
sendTemplateMailMethod · 0.80

Tested by

no test coverage detected