Administrator
2023-06-19 49588f5a462ae7425e7eb030438a35fd80c246fa
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
package com.gk.firework.Scheduls.ReportTask;
 
import com.gk.firework.Service.HistoryStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
 
 
@Configuration
@EnableScheduling
@ConditionalOnProperty(prefix = "historystock.robot",name = "enabled",havingValue = "true")
public class HistoryStockRobot {
 
 
    @Autowired
    private HistoryStockService historyStockService;
    /**
     * @Description: 历史库存数据保留到新表-historystock
     */
    @Scheduled(cron = "0 0 4 * * ?")
//    @Scheduled(cron = "0/20 * * * * ?")
    public void hisStockPersisting() {
        historyStockService.hisStockPersisting();
    }
 
}