24 lines
641 B
Java
24 lines
641 B
Java
package com.ruoyi.task;
|
|
|
|
import com.ruoyi.system.service.PayoutProcessingService;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* 定时确认已广播代付交易,链上成功后执行最终结算。
|
|
*/
|
|
@Component
|
|
public class PayoutConfirmationTask {
|
|
private final PayoutProcessingService service;
|
|
|
|
public PayoutConfirmationTask(PayoutProcessingService service) {
|
|
this.service = service;
|
|
}
|
|
|
|
@Scheduled(fixedDelay = 30000L)
|
|
@com.ruoyi.quartz.annotation.AllowedJobMethod
|
|
public void confirm() {
|
|
service.confirmPending();
|
|
}
|
|
}
|