|
@@ -58,7 +58,7 @@ public class ScheduledTasks {
|
|
|
/**
|
|
|
* 日志记录并会在程序结束时输出
|
|
|
*/
|
|
|
- public static List<Map<String, Object>> logInfos = new ArrayList<>();
|
|
|
+ public static List<Map<String, Object>> logInfos = new CopyOnWriteArrayList<>();
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -151,8 +151,8 @@ public class ScheduledTasks {
|
|
|
List<TAddressCallback> tAddressCallbacks = AreaService.getInstance().getCallbackDataByTag();
|
|
|
infoItem.put("用时(毫秒)", System.currentTimeMillis() - startTime);
|
|
|
infoItem.put("备注", "数据条数" + tAddressCallbacks.size());
|
|
|
- List<TAddressCallback> updateCallBackDatas = new ArrayList<>();
|
|
|
- List<YyskDmdzAddressStandardization> addDmdzDataList = new ArrayList<>();
|
|
|
+ List<TAddressCallback> updateCallBackDatas = new CopyOnWriteArrayList<>();
|
|
|
+ List<YyskDmdzAddressStandardization> addDmdzDataList = new CopyOnWriteArrayList<>();
|
|
|
// 然后调用市中心接口
|
|
|
ScheduledTasks.logInfos.add(infoItem);
|
|
|
for (TAddressCallback item : tAddressCallbacks) {
|
|
@@ -215,7 +215,7 @@ public class ScheduledTasks {
|
|
|
infoItem2.put("备注", "搜索地址:" + item.getSearchAddress());
|
|
|
ScheduledTasks.logInfos.add(infoItem2);
|
|
|
updateCallBackDatas.add(item);
|
|
|
- if (updateCallBackDatas.size() == 1000) {
|
|
|
+ if (updateCallBackDatas.size() >= 1000) {
|
|
|
Map<String, Object> infoItem3 = new HashMap<>();
|
|
|
infoItem3.put("操作", "将治理的数据入库更新callBack表");
|
|
|
long inBaseTime = System.currentTimeMillis();
|