admin
2019-03-15 dab56e93753325d37e2505467589718652758112
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
33
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.hongbao.ThreeSaleRankService;
import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
import com.yeshi.fanli.util.Constant;
 
@Component
public class ThreeSaleJob {
 
    @Resource
    private ThreeSaleSerivce threeSaleSerivce;
 
    @Resource
    private ThreeSaleRankService threeSaleRankService;
 
    @Scheduled(cron = "0 0 */1 * * ? ")
    public void twentyFour() {
        // if (Constant.IS_TASK)
        // threeSaleSerivce.validateTwentyFour();
    }
 
    @Scheduled(cron = "0 0 0 ? * MON ")
    public void updateRank() {
        if (Constant.IS_TASK)
            threeSaleRankService.update();
    }
 
}