修复多平台同时导入时的bug
parent
11d40d3e22
commit
0e69251281
|
@ -100,7 +100,6 @@ public class RegisterResponseProcessor extends SIPResponseProcessorAbstract {
|
||||||
subscribeHolder.removeCatalogSubscribe(platformGBId);
|
subscribeHolder.removeCatalogSubscribe(platformGBId);
|
||||||
subscribeHolder.removeMobilePositionSubscribe(platformGBId);
|
subscribeHolder.removeMobilePositionSubscribe(platformGBId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -411,8 +411,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||||
// 遍历存储结果,查找app+Stream->platformId+catalogId的对应关系,然后执行批量写入
|
// 遍历存储结果,查找app+Stream->platformId+catalogId的对应关系,然后执行批量写入
|
||||||
for (StreamPushItem streamPushItem : streamPushItemsForPlatform) {
|
for (StreamPushItem streamPushItem : streamPushItemsForPlatform) {
|
||||||
List<String[]> platFormInfoList = streamPushItemsForAll.get(streamPushItem.getApp() + streamPushItem.getStream());
|
List<String[]> platFormInfoList = streamPushItemsForAll.get(streamPushItem.getApp() + streamPushItem.getStream());
|
||||||
if (platFormInfoList != null) {
|
if (platFormInfoList != null && platFormInfoList.size() > 0) {
|
||||||
if (platFormInfoList.size() > 0) {
|
|
||||||
for (String[] platFormInfoArray : platFormInfoList) {
|
for (String[] platFormInfoArray : platFormInfoList) {
|
||||||
StreamPushItem streamPushItemForPlatform = new StreamPushItem();
|
StreamPushItem streamPushItemForPlatform = new StreamPushItem();
|
||||||
streamPushItemForPlatform.setGbStreamId(streamPushItem.getGbStreamId());
|
streamPushItemForPlatform.setGbStreamId(streamPushItem.getGbStreamId());
|
||||||
|
@ -425,8 +424,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]);
|
streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]);
|
||||||
|
if (platFormInfoArray[0].equals("34020000002110000001")) {
|
||||||
List<GbStream> gbStreamList = platformForEvent.get(streamPushItem.getPlatformId());
|
System.out.println(111);
|
||||||
|
}
|
||||||
|
List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]);
|
||||||
if (gbStreamList == null) {
|
if (gbStreamList == null) {
|
||||||
gbStreamList = new ArrayList<>();
|
gbStreamList = new ArrayList<>();
|
||||||
platformForEvent.put(platFormInfoArray[0], gbStreamList);
|
platformForEvent.put(platFormInfoArray[0], gbStreamList);
|
||||||
|
@ -443,7 +444,6 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||||
}
|
}
|
||||||
streamPushItemListFroPlatform.add(streamPushItemForPlatform);
|
streamPushItemListFroPlatform.add(streamPushItemForPlatform);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,16 +168,6 @@ public class StreamPushController {
|
||||||
result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// if (!file.getContentType().endsWith(".xls")
|
|
||||||
// && !file.getContentType().endsWith(".csv")
|
|
||||||
// && !file.getContentType().endsWith(".xlsx") ) {
|
|
||||||
// logger.warn("通道导入文件类型错误: {}",file.getContentType() );
|
|
||||||
// WVPResult<Object> wvpResult = new WVPResult<>();
|
|
||||||
// wvpResult.setCode(-1);
|
|
||||||
// wvpResult.setMsg("文件类型错误,请使用");
|
|
||||||
// result.setResult(ResponseEntity.status(HttpStatus.BAD_REQUEST).body(wvpResult));
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// 同时只处理一个文件
|
// 同时只处理一个文件
|
||||||
if (resultHolder.exist(key, null)) {
|
if (resultHolder.exist(key, null)) {
|
||||||
logger.warn("已有导入任务正在执行");
|
logger.warn("已有导入任务正在执行");
|
||||||
|
|
Loading…
Reference in New Issue