|
|
@@ -1,6 +1,5 @@
|
|
|
package com.payment.platform.module.payment.enterprise.scheduler;
|
|
|
|
|
|
-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;
|
|
|
@@ -36,12 +35,7 @@ public class EnterpriseNameSyncScheduler {
|
|
|
@Scheduled(fixedDelay = 60 * 1000)
|
|
|
public void retryNameSync() {
|
|
|
log.info("[企业名称同步] 开始执行");
|
|
|
- List<EnterpriseEntity> list = enterpriseMapper.selectList(
|
|
|
- new LambdaQueryWrapper<EnterpriseEntity>()
|
|
|
- .eq(EnterpriseEntity::getNameSyncStatus, "0")
|
|
|
- .lt(EnterpriseEntity::getNameSyncRetryCount, MAX_RETRY)
|
|
|
- .le(EnterpriseEntity::getNameSyncNextTime, OffsetDateTime.now())
|
|
|
- .last("LIMIT 50"));
|
|
|
+ List<EnterpriseEntity> list = enterpriseMapper.selectPendingNameSync(MAX_RETRY, 50);
|
|
|
if (list.isEmpty()) return;
|
|
|
|
|
|
log.info("[企业名称同步] 待重试: {} 条", list.size());
|