package com.moral.api.task; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.moral.api.service.HistoryHourlyService; import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.handler.annotation.XxlJob; @Component public class DeleteHistoryHourlyTransitionTask { @Autowired private HistoryHourlyService historyHourlyService; //删除中间小时表数据 @XxlJob("deleteHourlyTransition") public ReturnT insertHistoryFiveMinutely() { try { historyHourlyService.deleteHistoryHourlyTransition(); } catch (Exception e) { XxlJobHelper.log(e.getMessage()); return ReturnT.FAIL; } return ReturnT.SUCCESS; } }