Administrator
2018-10-30 c0c91fbda1ba601c4c8cb6d12fd43dfbe02eea5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.yeshi.fanli.job;
 
import javax.annotation.Resource;
 
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import com.yeshi.fanli.service.inter.user.ExtractRecordService;
import com.yeshi.fanli.service.inter.user.PassWordErrorRecordService;
 
@Component
public class DeleteRecordJob {
    
    @Resource
    private ExtractRecordService extractRecordService;
    
    @Resource
    private PassWordErrorRecordService passWordErrorRecordService;
    
    //每天0点 清除ExtractRecord表中记录
    @Scheduled(cron = "0 0 0 * * ?")
    public void deleteExtractRecord() {
        extractRecordService.deleteExtractRecord();
    }
    
    //每天0点 清除yeshi_ec_password_error_record表中记录
    @Scheduled(cron = "0 0 0 * * ?")
    public void deletePasswordErrorRecord() {
        passWordErrorRecordService.deletePasswordErrorRecord();
    }
    
}