AliyunSmsTask.java 709 B

123456789101112131415161718192021222324252627
  1. package com.kmall.admin.task;
  2. import com.kmall.admin.service.aliyunsms.SendSmsRecordService;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.scheduling.annotation.Scheduled;
  5. import org.springframework.stereotype.Component;
  6. /**
  7. * 阿里云短信定时任务
  8. *
  9. * @author zhuhh
  10. * @date 2021-12-9 11:37:26
  11. */
  12. @Component
  13. public class AliyunSmsTask {
  14. @Autowired
  15. private SendSmsRecordService sendSmsRecordService;
  16. /**
  17. * 定时扫描 send_sms_record 表的发送失败短信并重新发送
  18. */
  19. @Scheduled(fixedRate = 10000)
  20. public void reSendFailMsg() {
  21. // todo,测试屏蔽
  22. // sendSmsRecordService.reSendFailMsg();
  23. }
  24. }