物流处理 完成了顺丰api对接
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user