|
@@ -87,10 +87,8 @@ public class UfoCommonBulkService implements ApplicationEventPublisherAware { |
|
@@ -87,10 +87,8 @@ public class UfoCommonBulkService implements ApplicationEventPublisherAware { |
87
|
}
|
87
|
}
|
88
|
|
88
|
|
89
|
//5、批量更新
|
89
|
//5、批量更新
|
90
|
- yohoIndexService.bulk(toUpdateDataList);
|
|
|
91
|
-
|
|
|
92
|
- //6、记录日志
|
|
|
93
|
if (CollectionUtils.isNotEmpty(toUpdateDataList)) {
|
90
|
if (CollectionUtils.isNotEmpty(toUpdateDataList)) {
|
|
|
91
|
+ yohoIndexService.bulk(toUpdateDataList);
|
94
|
logger.info("doBulk, the blukList size is {} and cost {} ms,", toUpdateDataList.size(), System.currentTimeMillis() - begin);
|
92
|
logger.info("doBulk, the blukList size is {} and cost {} ms,", toUpdateDataList.size(), System.currentTimeMillis() - begin);
|
95
|
Thread.sleep(100);
|
93
|
Thread.sleep(100);
|
96
|
} else {
|
94
|
} else {
|
|
@@ -105,6 +103,9 @@ public class UfoCommonBulkService implements ApplicationEventPublisherAware { |
|
@@ -105,6 +103,9 @@ public class UfoCommonBulkService implements ApplicationEventPublisherAware { |
105
|
}
|
103
|
}
|
106
|
|
104
|
|
107
|
private Map<Integer, ESBluk> queryBulkDataByIdList(List<Integer> ufoProductIdList) {
|
105
|
private Map<Integer, ESBluk> queryBulkDataByIdList(List<Integer> ufoProductIdList) {
|
|
|
106
|
+ if(ufoProductIdList==null || ufoProductIdList.isEmpty()){
|
|
|
107
|
+ return new HashMap<>();
|
|
|
108
|
+ }
|
108
|
List<UfoProductIndexBO> ufoProductIndexBOList = ufoProductIndexBuilder.buildUfoProductIndexBOIncrease(ufoProductIdList);
|
109
|
List<UfoProductIndexBO> ufoProductIndexBOList = ufoProductIndexBuilder.buildUfoProductIndexBOIncrease(ufoProductIdList);
|
109
|
if (ufoProductIndexBOList == null || ufoProductIndexBOList.isEmpty()) {
|
110
|
if (ufoProductIndexBOList == null || ufoProductIndexBOList.isEmpty()) {
|
110
|
return new HashMap<>();
|
111
|
return new HashMap<>();
|