fix: 修复同步搜索中心数据同步接口BUG

This commit is contained in:
zhangyanduan
2022-03-18 15:37:14 +08:00
parent a6bef4be76
commit 3c8cb14e32
@@ -313,7 +313,7 @@ public class ResetSearchCenterService {
sarStandardsInfo.setSarStandAttrEOStr(JSONObject.toJSONString(sarStandardsInfo.getAttrInfoMap()));
}
Map<String, Object> indexstate = elasticsearchService.searchDataById("stand","stand",standId,null);
if(!indexstate.isEmpty()){
if(indexstate!=null && !indexstate.isEmpty()){
createStandMQService.sendStandMQ(sarStandardsInfo,"update");
}else{
createStandMQService.sendStandMQ(sarStandardsInfo,"add");
@@ -336,7 +336,7 @@ public class ResetSearchCenterService {
sarBussionessStand.setSarStandAttrEOStr(JSONObject.toJSONString(sarBussionessStand.getAttrInfoMap()));
}
Map<String, Object> indexstate = elasticsearchService.searchDataById("bussstand","bussstand",standId,null);
if(!indexstate.isEmpty()){
if(indexstate!=null && !indexstate.isEmpty()){
createStandMQService.sendBussStandMQ(sarBussionessStand,"update");
}else{
createStandMQService.sendBussStandMQ(sarBussionessStand,"add");