package com.qianwen.smartman.modules.mdc.jobHandler; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.log.XxlJobLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.qianwen.smartman.modules.mdc.service.ICollectDataService; import org.springframework.stereotype.Component; /** * xxljob任务,同步当前时间全量参数,从缓存到new_param_json_[工位id]表 */ @Component public class CacheNewCollectXxlJob { private static final Logger log = LoggerFactory.getLogger(CacheNewCollectXxlJob.class); private final ICollectDataService collectService; public CacheNewCollectXxlJob(final ICollectDataService collectService) { this.collectService = collectService; } @XxlJob("allDmpCollectDataJobHandler") public ReturnT allDmpCollectDataJobHandler(String param) throws Exception { XxlJobLogger.log("XXL-JOB, 获取DMP采集参数当前时间全量数据.....缓存构建开始", new Object[0]); this.collectService.cacheNowCollectData(); XxlJobLogger.log("XXL-JOB, 获取DMP采集参数当前时间全量数据.....缓存构建结束", new Object[0]); return ReturnT.SUCCESS; } }