package io.as.modules.daycard.task; import io.as.modules.daycard.service.ProfitSharingExecuteService; import io.as.modules.job.task.ITask; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * 分账兜底查询定时任务 *
定时扫描状态为 PENDING 或 FAILED 且超过5分钟的分账单,逐条重试
*/ @Component("profitSharingQueryTask") public class ProfitSharingQueryTask implements ITask { private static final Logger logger = LoggerFactory.getLogger(ProfitSharingQueryTask.class); @Autowired private ProfitSharingExecuteService profitSharingExecuteService; @Override public void run(String params) { logger.info("分账兜底查询任务开始执行, params={}", params); try { profitSharingExecuteService.retryFailed(); logger.info("分账兜底查询任务执行完毕"); } catch (Exception e) { logger.error("分账兜底查询任务执行异常", e); } } }