Junjie
17 小时以前 cbfb46f6fc3ed2a09540e4feb7fdb6b51b26d009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.zy.asrs.task;
 
import com.zy.asrs.service.StationCycleCapacityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
@Component
public class StationCycleCapacityScheduler {
 
    @Autowired
    private StationCycleCapacityService stationCycleCapacityService;
 
    // 每秒刷新一次循环圈承载量
    @Scheduled(cron = "0/1 * * * * ? ")
    public void refreshStationCycleCapacity() {
        stationCycleCapacityService.refreshSnapshot();
    }
}