package com.ruoyi.framework.task;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.system.domain.SysMessage;
import com.ruoyi.project.system.service.ISysMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component("testNoParams")
public class TestTask extends BaseController
{
    @Autowired
    private ISysMessageService sysMessageService;
    public void TestTask()
    {
        System.out.println("执行无参方法");
        SysMessage sysMessage = new SysMessage();
        sysMessage.setMsgTitle("task测试");
        sysMessage.setMsgContent("task测试");
        sysMessage.setUserId(1l);
        sysMessageService.insertSysMessage(sysMessage);

    }
}
