jiaosong
2023-09-12 c2d456b74202d5b2b375ea8c4912dcfbd70c972b
server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -1,6 +1,8 @@
package com.doumee.task;
import com.doumee.service.business.BaseDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -15,14 +17,16 @@
@EnableScheduling
public class ScheduleTool {
    @Autowired
    private BaseDataService baseDataService;
    /**
     * 缓存省市区
     * 定时处理爬虫源数据,生成素材库数据
     * @throws Exception
     */
    @Scheduled(fixedDelay=24*60*60*1000)
    public void cacheCampus() throws Exception {
    @Scheduled(fixedDelay=10*60*1000)
    public void dealBaseData() throws Exception {
        baseDataService.dealBaseData();
    }
}