package com.mzl.flower.schedule; import com.mzl.flower.service.district.DistrictTengxunService; import com.mzl.flower.service.map.MapGaodeService; import com.mzl.flower.service.map.MapTengxunService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component @Slf4j public class MapScheduleService { @Autowired private MapTengxunService mapTengxunService; @Autowired private MapGaodeService mapGaodeService; @Autowired private DistrictTengxunService districtTengxunService; /** * 每个月第一天凌晨5点执行一次 */ // @Scheduled(cron = "5 * * * * ?") @Scheduled(cron = "0 5 0 1 * ?") public void expiredPointGoodsRecord() { // 高德地图解析-行政区划 // mapGaodeService.getAdministrativeDivision(); // 腾讯地图解析-行政区划 mapTengxunService.getAdministrativeDivision(); // districtTengxunService.refreshDistrict(); } }