|
@@ -24,6 +24,8 @@ import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.ConcurrentHashMap;
|
|
|
+import java.util.concurrent.CopyOnWriteArrayList;
|
|
|
|
|
|
@Component
|
|
|
public class ScheduledTasks {
|
|
@@ -80,11 +82,11 @@ public class ScheduledTasks {
|
|
|
* 一天执行一次,把callBack表中查询到的数据保存到地址库中,并删除callBack表有数据的记录
|
|
|
*/
|
|
|
// 暂存待入库的回流表数据
|
|
|
- public static List<TAddressCallback> callBackDatas = new ArrayList<>();
|
|
|
+ public static List<TAddressCallback> callBackDatas = new CopyOnWriteArrayList<>();
|
|
|
// TODO 缓存所有回流表中的地址,
|
|
|
- public static List<String> callBackAllErrorAddrs = new ArrayList<>();
|
|
|
+ public static List<String> callBackAllErrorAddrs = new CopyOnWriteArrayList<>();
|
|
|
// 暂存的所有地址库中的数据
|
|
|
- public static Map<String, List<YyskDmdzAddressStandardization>> allDmdzData = new HashMap<>();
|
|
|
+ public static Map<String, List<YyskDmdzAddressStandardization>> allDmdzData = new ConcurrentHashMap<>();
|
|
|
|
|
|
@Resource
|
|
|
private YyskAddressStandardizationServiceImpl yyskAddressStandardizationService;
|