|
@@ -29,6 +29,7 @@ import com.fs.store.vo.FsUserShareVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.wx.domain.FsWxExpressTask;
|
|
import com.fs.wx.domain.FsWxExpressTask;
|
|
|
import com.fs.wx.mapper.FsWxExpressTaskMapper;
|
|
import com.fs.wx.mapper.FsWxExpressTaskMapper;
|
|
|
|
|
+import com.google.common.util.concurrent.RateLimiter;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang.ObjectUtils;
|
|
import org.apache.commons.lang.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -507,6 +508,7 @@ public class StoreTask {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ private final RateLimiter rateLimiter = RateLimiter.create(1.3);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 更新发货状态
|
|
* 更新发货状态
|
|
@@ -517,9 +519,11 @@ public class StoreTask {
|
|
|
|
|
|
|
|
for (FsStoreOrder order : list) {
|
|
for (FsStoreOrder order : list) {
|
|
|
try{
|
|
try{
|
|
|
|
|
+ rateLimiter.acquire();
|
|
|
orderService.syncDeliveryOrder(order);
|
|
orderService.syncDeliveryOrder(order);
|
|
|
}catch (Exception e) {
|
|
}catch (Exception e) {
|
|
|
logger.error("获取订单是否发货失败!原因: ",e);
|
|
logger.error("获取订单是否发货失败!原因: ",e);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|