1234567891011121314151617181920212223242526 |
- package com.kmall.admin.task;
- import com.kmall.admin.service.aliyunsms.SendSmsRecordService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Component;
- /**
- * 阿里云短信定时任务
- *
- * @author zhuhh
- * @date 2021-12-9 11:37:26
- */
- @Component
- public class AliyunSmsTask {
- @Autowired
- private SendSmsRecordService sendSmsRecordService;
- /**
- * 定时扫描 send_sms_record 表的发送失败短信并重新发送
- */
- @Scheduled(fixedRate = 10000)
- public void reSendFailMsg() {
- sendSmsRecordService.reSendFailMsg();
- }
- }
|