fix:79161

This commit is contained in:
梁琦涛
2023-12-08 14:16:44 +08:00
parent 09841493bf
commit 850d74eb78
@@ -941,6 +941,12 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
log.info("================ES更新数据开始=================");
ForkJoinPool pool = new ForkJoinPool();
CompletableFuture.runAsync(()->{
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
try{
switch (resourceType){
case LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD:
@@ -1356,6 +1362,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(map, SerializerFeature.WriteMapNullValue));
try {
jeroElasticsearchTemplate.saveOrUpdate(HomeSearchEnum.INDEX_NAME_DOCUMENT_ZQ.getValue(), HomeSearchEnum.TYPE_NAME_DOCUMENT_ZQ.getValue(), idTemp, jsonObject);
log.info("==============更新es成功================");
} catch (Exception e) {
log.error("文档库添加es失败",e);
}