Files
as-daycard-openapi/src/main/java/io/as/modules/daycard/task/ProfitSharingQueryTask.java
T

33 lines
1.0 KiB
Java
Raw Normal View History

2026-07-26 12:34:13 +08:00
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;
/**
* 分账兜底查询定时任务
* <p>定时扫描状态为 PENDING 或 FAILED 且超过5分钟的分账单,逐条重试</p>
*/
@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);
}
}
}