|
|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.payment.platform.module.payment.enterprise.entity.EnterpriseEntity;
|
|
|
import com.payment.platform.module.payment.enterprise.mapper.EnterpriseMapper;
|
|
|
import com.payment.platform.module.payment.enterprise.service.AlipayEnterpriseService;
|
|
|
+import jakarta.annotation.PostConstruct;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
@@ -26,6 +27,11 @@ public class EnterpriseNameSyncScheduler {
|
|
|
|
|
|
private static final int MAX_RETRY = 20;
|
|
|
|
|
|
+ @PostConstruct
|
|
|
+ public void init() {
|
|
|
+ retryNameSync();
|
|
|
+ }
|
|
|
+
|
|
|
@Scheduled(fixedDelay = 10 * 60 * 1000) // 每 10 分钟
|
|
|
public void retryNameSync() {
|
|
|
List<EnterpriseEntity> list = enterpriseMapper.selectList(
|