Blame view

ChangeStudentStatus.java 527 Bytes
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
package com.meishu.common.schedule;

import com.meishu.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ChangeStudentStatus {

    @Autowired
    private StudentMapper studentMapper;

    @Scheduled(cron = "0 30 20 * * ?")
    public void changeStudentStatus(){
        System.out.println("=========");
        studentMapper.changeStudentStatus();
    }

}