package com.xinelu.quartz.controller;

import com.aliyuncs.exceptions.ClientException;
import com.xinelu.quartz.task.SendTextMessageTask;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description 短信相关定时任务
 * @Author zh
 * @Date 2024-07-22
 */
@RestController
@RequestMapping("/monitor/sendTextMessage")
public class SendTextMessageController {

    @Resource
    private SendTextMessageTask textMessageTask;

    /**
     * 手动执行短信发送定时任务
     */
    @GetMapping("/textMessageSend")
    public void textMessageSend() throws ClientException {
        textMessageTask.automaticSendTextMessageTask();
    }
}
