物流处理 完成了顺丰api对接

This commit is contained in:
2025-07-21 23:39:30 +08:00
parent ca0ec753c7
commit b1914b7edc
23 changed files with 1581 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
package com.ruoyi.oa.task;
import com.ruoyi.oa.service.impl.OaExpressServiceImpl;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
@Component
public class OaExpressRefreshTask {
@Resource
private OaExpressServiceImpl oaExpressService;
// 每20分钟执行一次
@Scheduled(cron = "0 0/20 * * * ?")
public void refreshExpress() {
List<Long> expressIds = oaExpressService.getAllSfExpressIdsToRefresh();
if (expressIds != null && !expressIds.isEmpty()) {
oaExpressService.getRefreshExpress(expressIds);
}
}
}