|
|
@@ -2,6 +2,7 @@ package com.dderp.business.service.flycat;
|
|
|
|
|
|
import com.dderp.common.api.NoSqlKeysService;
|
|
|
import com.dderp.common.api.PlatformService;
|
|
|
+import com.dderp.common.api.SupplierInitService;
|
|
|
import com.dderp.common.api.flycat.ExpressGeoService;
|
|
|
import com.dderp.common.api.flycat.ExpressOutService;
|
|
|
import com.dderp.common.base.BaseService;
|
|
|
@@ -10,6 +11,7 @@ import com.dderp.common.entity.base.InvokeCallParams;
|
|
|
import com.dderp.common.entity.base.InvokeCallResult;
|
|
|
import com.dderp.common.entity.geo.RiderGeoInfo;
|
|
|
import com.dderp.common.entity.platform.PlatformInfo;
|
|
|
+import com.dderp.common.entity.system.KeyValuePair;
|
|
|
import com.dderp.common.tool.ERPUtils;
|
|
|
import com.dySweetFishPlugin.redis.RedisService;
|
|
|
import com.dySweetFishPlugin.tool.lang.ThreadFactoryWithNamePrefix;
|
|
|
@@ -54,6 +56,9 @@ public class ExpressGeoServiceImpl extends BaseService implements ExpressGeoServ
|
|
|
@Resource
|
|
|
ExpressOutService expressOutService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ SupplierInitService supplierService;
|
|
|
+
|
|
|
private final List<ScheduledThreadPoolExecutor> scheduleScanThreadList = new ArrayList<>();
|
|
|
|
|
|
private ExecutorService riderWorkExecutor;
|
|
|
@@ -96,6 +101,10 @@ public class ExpressGeoServiceImpl extends BaseService implements ExpressGeoServ
|
|
|
@Override
|
|
|
public void start(AnyValue config) {
|
|
|
super.start(config);
|
|
|
+
|
|
|
+ //本来想放在supplierInitImpl中启动初始化,但代码侵入有些多,暂时先放在自己的服务中初始化
|
|
|
+ List<KeyValuePair> dataItemList = supplierService.getDataBaseItemList();
|
|
|
+ dataItemList.forEach((x) -> initScanThread(x.getKey(), Long.parseLong(x.getValue())));
|
|
|
}
|
|
|
|
|
|
public void initScanThread(String dataSourceId, long supplierCode) {
|