Commit c3ce2bc5d069ba57309567aee4ae418bc0cf75ed

Authored by 648540858
1 parent 72b9239c

优化异常处理以及级联设备状态查询

Showing 27 changed files with 117 additions and 89 deletions
src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -520,7 +520,7 @@ public class StreamInfo implements Serializable, Cloneable{ @@ -520,7 +520,7 @@ public class StreamInfo implements Serializable, Cloneable{
520 try{ 520 try{
521 instance = (StreamInfo)super.clone(); 521 instance = (StreamInfo)super.clone();
522 }catch(CloneNotSupportedException e) { 522 }catch(CloneNotSupportedException e) {
523 - e.printStackTrace(); 523 + logger.error("未处理的异常 ", e);
524 } 524 }
525 return instance; 525 return instance;
526 } 526 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
@@ -937,8 +937,6 @@ public class SIPCommander implements ISIPCommander { @@ -937,8 +937,6 @@ public class SIPCommander implements ISIPCommander {
937 catalogXml.append("<DeviceID>" + device.getDeviceId() + "</DeviceID>\r\n"); 937 catalogXml.append("<DeviceID>" + device.getDeviceId() + "</DeviceID>\r\n");
938 catalogXml.append("</Query>\r\n"); 938 catalogXml.append("</Query>\r\n");
939 939
940 -  
941 -  
942 Request request = headerProvider.createMessageRequest(device, catalogXml.toString(), null, SipUtils.getNewFromTag(), null,sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport())); 940 Request request = headerProvider.createMessageRequest(device, catalogXml.toString(), null, SipUtils.getNewFromTag(), null,sipSender.getNewCallIdHeader(sipLayer.getLocalIp(device.getLocalIp()),device.getTransport()));
943 941
944 sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent); 942 sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), request, errorEvent);
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -16,6 +16,7 @@ import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; @@ -16,6 +16,7 @@ import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
16 import com.genersoft.iot.vmp.storager.IRedisCatchStorage; 16 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
17 import com.genersoft.iot.vmp.storager.dao.dto.PlatformRegisterInfo; 17 import com.genersoft.iot.vmp.storager.dao.dto.PlatformRegisterInfo;
18 import com.genersoft.iot.vmp.utils.DateUtil; 18 import com.genersoft.iot.vmp.utils.DateUtil;
  19 +import com.genersoft.iot.vmp.utils.GitUtil;
19 import gov.nist.javax.sip.message.MessageFactoryImpl; 20 import gov.nist.javax.sip.message.MessageFactoryImpl;
20 import gov.nist.javax.sip.message.SIPRequest; 21 import gov.nist.javax.sip.message.SIPRequest;
21 import org.slf4j.Logger; 22 import org.slf4j.Logger;
@@ -65,6 +66,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { @@ -65,6 +66,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
65 @Autowired 66 @Autowired
66 private DynamicTask dynamicTask; 67 private DynamicTask dynamicTask;
67 68
  69 + @Autowired
  70 + private GitUtil gitUtil;
  71 +
68 @Override 72 @Override
69 public void register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException { 73 public void register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException {
70 register(parentPlatform, null, null, errorEvent, okEvent, false, true); 74 register(parentPlatform, null, null, errorEvent, okEvent, false, true);
@@ -266,6 +270,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { @@ -266,6 +270,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
266 270
267 String callId = request.getCallIdHeader().getCallId(); 271 String callId = request.getCallIdHeader().getCallId();
268 272
  273 + logger.info("[命令发送] 国标级联{} 目录查询回复: 共{}条,已发送{}条", parentPlatform.getServerGBId(),
  274 + channels.size(), Math.min(index + parentPlatform.getCatalogGroup(), channels.size()));
  275 + logger.debug(catalogXml);
269 if (sendAfterResponse) { 276 if (sendAfterResponse) {
270 // 默认按照收到200回复后发送下一条, 如果超时收不到回复,就以30毫秒的间隔直接发送。 277 // 默认按照收到200回复后发送下一条, 如果超时收不到回复,就以30毫秒的间隔直接发送。
271 dynamicTask.startDelay(timeoutTaskKey, ()->{ 278 dynamicTask.startDelay(timeoutTaskKey, ()->{
@@ -317,17 +324,22 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { @@ -317,17 +324,22 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
317 if (parentPlatform == null) { 324 if (parentPlatform == null) {
318 return; 325 return;
319 } 326 }
  327 + String deviceId = device == null ? parentPlatform.getDeviceGBId() : device.getDeviceId();
  328 + String deviceName = device == null ? parentPlatform.getName() : device.getName();
  329 + String manufacturer = device == null ? "WVP-28181-PRO" : device.getManufacturer();
  330 + String model = device == null ? "platform" : device.getModel();
  331 + String firmware = device == null ? gitUtil.getBuildVersion() : device.getFirmware();
320 String characterSet = parentPlatform.getCharacterSet(); 332 String characterSet = parentPlatform.getCharacterSet();
321 StringBuffer deviceInfoXml = new StringBuffer(600); 333 StringBuffer deviceInfoXml = new StringBuffer(600);
322 deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); 334 deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
323 deviceInfoXml.append("<Response>\r\n"); 335 deviceInfoXml.append("<Response>\r\n");
324 deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); 336 deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n");
325 deviceInfoXml.append("<SN>" +sn + "</SN>\r\n"); 337 deviceInfoXml.append("<SN>" +sn + "</SN>\r\n");
326 - deviceInfoXml.append("<DeviceID>" + device.getDeviceId() + "</DeviceID>\r\n");  
327 - deviceInfoXml.append("<DeviceName>" + device.getName() + "</DeviceName>\r\n");  
328 - deviceInfoXml.append("<Manufacturer>" + device.getManufacturer() + "</Manufacturer>\r\n");  
329 - deviceInfoXml.append("<Model>" + device.getModel() + "</Model>\r\n");  
330 - deviceInfoXml.append("<Firmware>" + device.getFirmware() + "</Firmware>\r\n"); 338 + deviceInfoXml.append("<DeviceID>" + deviceId + "</DeviceID>\r\n");
  339 + deviceInfoXml.append("<DeviceName>" + deviceName + "</DeviceName>\r\n");
  340 + deviceInfoXml.append("<Manufacturer>" + manufacturer + "</Manufacturer>\r\n");
  341 + deviceInfoXml.append("<Model>" + model + "</Model>\r\n");
  342 + deviceInfoXml.append("<Firmware>" + firmware + "</Firmware>\r\n");
331 deviceInfoXml.append("<Result>OK</Result>\r\n"); 343 deviceInfoXml.append("<Result>OK</Result>\r\n");
332 deviceInfoXml.append("</Response>\r\n"); 344 deviceInfoXml.append("</Response>\r\n");
333 345
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
@@ -45,7 +45,7 @@ public abstract class SIPRequestProcessorParent { @@ -45,7 +45,7 @@ public abstract class SIPRequestProcessorParent {
45 try { 45 try {
46 return SipFactory.getInstance().createHeaderFactory(); 46 return SipFactory.getInstance().createHeaderFactory();
47 } catch (PeerUnavailableException e) { 47 } catch (PeerUnavailableException e) {
48 - e.printStackTrace(); 48 + logger.error("未处理的异常 ", e);
49 } 49 }
50 return null; 50 return null;
51 } 51 }
@@ -54,7 +54,7 @@ public abstract class SIPRequestProcessorParent { @@ -54,7 +54,7 @@ public abstract class SIPRequestProcessorParent {
54 try { 54 try {
55 return SipFactory.getInstance().createMessageFactory(); 55 return SipFactory.getInstance().createMessageFactory();
56 } catch (PeerUnavailableException e) { 56 } catch (PeerUnavailableException e) {
57 - e.printStackTrace(); 57 + logger.error("未处理的异常 ", e);
58 } 58 }
59 return null; 59 return null;
60 } 60 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
@@ -406,12 +406,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -406,12 +406,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
406 }, 60 * 1000); 406 }, 60 * 1000);
407 responseSdpAck(request, content.toString(), platform); 407 responseSdpAck(request, content.toString(), platform);
408 408
409 - } catch (SipException e) {  
410 - e.printStackTrace();  
411 - } catch (InvalidArgumentException e) {  
412 - e.printStackTrace();  
413 - } catch (ParseException e) {  
414 - e.printStackTrace(); 409 + } catch (SipException | InvalidArgumentException | ParseException e) {
  410 + logger.error("[命令发送失败] 国标级联 回复SdpAck", e);
415 } 411 }
416 }; 412 };
417 SipSubscribe.Event errorEvent = ((event) -> { 413 SipSubscribe.Event errorEvent = ((event) -> {
@@ -420,7 +416,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -420,7 +416,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
420 Response response = getMessageFactory().createResponse(event.statusCode, evt.getRequest()); 416 Response response = getMessageFactory().createResponse(event.statusCode, evt.getRequest());
421 sipSender.transmitRequest(request.getLocalAddress().getHostAddress(), response); 417 sipSender.transmitRequest(request.getLocalAddress().getHostAddress(), response);
422 } catch (ParseException | SipException e) { 418 } catch (ParseException | SipException e) {
423 - e.printStackTrace(); 419 + logger.error("未处理的异常 ", e);
424 } 420 }
425 }); 421 });
426 sendRtpItem.setApp("rtp"); 422 sendRtpItem.setApp("rtp");
@@ -531,7 +527,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -531,7 +527,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
531 } catch (SdpParseException e) { 527 } catch (SdpParseException e) {
532 logger.error("sdp解析错误", e); 528 logger.error("sdp解析错误", e);
533 } catch (SdpException e) { 529 } catch (SdpException e) {
534 - e.printStackTrace(); 530 + logger.error("未处理的异常 ", e);
535 } 531 }
536 } 532 }
537 533
@@ -686,11 +682,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -686,11 +682,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
686 mediaListManager.removedChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream()); 682 mediaListManager.removedChannelOnlineEventLister(gbStream.getApp(), gbStream.getStream());
687 responseAck(request, Response.REQUEST_TIMEOUT); // 超时 683 responseAck(request, Response.REQUEST_TIMEOUT); // 超时
688 } catch (SipException e) { 684 } catch (SipException e) {
689 - e.printStackTrace(); 685 + logger.error("未处理的异常 ", e);
690 } catch (InvalidArgumentException e) { 686 } catch (InvalidArgumentException e) {
691 - e.printStackTrace(); 687 + logger.error("未处理的异常 ", e);
692 } catch (ParseException e) { 688 } catch (ParseException e) {
693 - e.printStackTrace(); 689 + logger.error("未处理的异常 ", e);
694 } 690 }
695 }, userSetting.getPlatformPlayTimeout()); 691 }, userSetting.getPlatformPlayTimeout());
696 // 添加监听 692 // 添加监听
@@ -709,11 +705,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -709,11 +705,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
709 try { 705 try {
710 responseAck(request, Response.BUSY_HERE); 706 responseAck(request, Response.BUSY_HERE);
711 } catch (SipException e) { 707 } catch (SipException e) {
712 - e.printStackTrace(); 708 + logger.error("未处理的异常 ", e);
713 } catch (InvalidArgumentException e) { 709 } catch (InvalidArgumentException e) {
714 - e.printStackTrace(); 710 + logger.error("未处理的异常 ", e);
715 } catch (ParseException e) { 711 } catch (ParseException e) {
716 - e.printStackTrace(); 712 + logger.error("未处理的异常 ", e);
717 } 713 }
718 return; 714 return;
719 } 715 }
@@ -771,11 +767,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -771,11 +767,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
771 try { 767 try {
772 responseAck(request, Response.BUSY_HERE); 768 responseAck(request, Response.BUSY_HERE);
773 } catch (SipException e) { 769 } catch (SipException e) {
774 - e.printStackTrace(); 770 + logger.error("未处理的异常 ", e);
775 } catch (InvalidArgumentException e) { 771 } catch (InvalidArgumentException e) {
776 - e.printStackTrace(); 772 + logger.error("未处理的异常 ", e);
777 } catch (ParseException e) { 773 } catch (ParseException e) {
778 - e.printStackTrace(); 774 + logger.error("未处理的异常 ", e);
779 } 775 }
780 return; 776 return;
781 } 777 }
@@ -851,11 +847,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -851,11 +847,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
851 try { 847 try {
852 return responseSdpAck(request, content.toString(), platform); 848 return responseSdpAck(request, content.toString(), platform);
853 } catch (SipException e) { 849 } catch (SipException e) {
854 - e.printStackTrace(); 850 + logger.error("未处理的异常 ", e);
855 } catch (InvalidArgumentException e) { 851 } catch (InvalidArgumentException e) {
856 - e.printStackTrace(); 852 + logger.error("未处理的异常 ", e);
857 } catch (ParseException e) { 853 } catch (ParseException e) {
858 - e.printStackTrace(); 854 + logger.error("未处理的异常 ", e);
859 } 855 }
860 return null; 856 return null;
861 } 857 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
@@ -93,7 +93,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements @@ -93,7 +93,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
93 try { 93 try {
94 responseAck((SIPRequest) evt.getRequest(), Response.OK, null, null); 94 responseAck((SIPRequest) evt.getRequest(), Response.OK, null, null);
95 }catch (SipException | InvalidArgumentException | ParseException e) { 95 }catch (SipException | InvalidArgumentException | ParseException e) {
96 - e.printStackTrace(); 96 + logger.error("未处理的异常 ", e);
97 } 97 }
98 boolean runed = !taskQueue.isEmpty(); 98 boolean runed = !taskQueue.isEmpty();
99 taskQueue.offer(new HandlerCatchData(evt, null, null)); 99 taskQueue.offer(new HandlerCatchData(evt, null, null));
@@ -225,7 +225,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements @@ -225,7 +225,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
225 jsonObject.put("speed", mobilePosition.getSpeed()); 225 jsonObject.put("speed", mobilePosition.getSpeed());
226 redisCatchStorage.sendMobilePositionMsg(jsonObject); 226 redisCatchStorage.sendMobilePositionMsg(jsonObject);
227 } catch (DocumentException e) { 227 } catch (DocumentException e) {
228 - e.printStackTrace(); 228 + logger.error("未处理的异常 ", e);
229 } 229 }
230 } 230 }
231 231
@@ -335,7 +335,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements @@ -335,7 +335,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
335 publisher.deviceAlarmEventPublish(deviceAlarm); 335 publisher.deviceAlarmEventPublish(deviceAlarm);
336 } 336 }
337 } catch (DocumentException e) { 337 } catch (DocumentException e) {
338 - e.printStackTrace(); 338 + logger.error("未处理的异常 ", e);
339 } 339 }
340 } 340 }
341 341
@@ -428,7 +428,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements @@ -428,7 +428,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
428 } 428 }
429 } 429 }
430 } catch (DocumentException e) { 430 } catch (DocumentException e) {
431 - e.printStackTrace(); 431 + logger.error("未处理的异常 ", e);
432 } 432 }
433 } 433 }
434 434
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
@@ -185,7 +185,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen @@ -185,7 +185,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
185 deviceService.offline(deviceId, "主动注销"); 185 deviceService.offline(deviceId, "主动注销");
186 } 186 }
187 } catch (SipException | NoSuchAlgorithmException | ParseException e) { 187 } catch (SipException | NoSuchAlgorithmException | ParseException e) {
188 - e.printStackTrace(); 188 + logger.error("未处理的异常 ", e);
189 } 189 }
190 } 190 }
191 } 191 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/SubscribeRequestProcessor.java
@@ -96,7 +96,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme @@ -96,7 +96,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
96 sipSender.transmitRequest(request.getLocalAddress().getHostAddress(), response); 96 sipSender.transmitRequest(request.getLocalAddress().getHostAddress(), response);
97 } 97 }
98 } catch (ParseException | SipException | InvalidArgumentException | DocumentException e) { 98 } catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
99 - e.printStackTrace(); 99 + logger.error("未处理的异常 ", e);
100 } 100 }
101 101
102 } 102 }
@@ -149,7 +149,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme @@ -149,7 +149,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
149 } 149 }
150 150
151 } catch (SipException | InvalidArgumentException | ParseException e) { 151 } catch (SipException | InvalidArgumentException | ParseException e) {
152 - e.printStackTrace(); 152 + logger.error("未处理的异常 ", e);
153 } 153 }
154 } 154 }
155 155
@@ -195,7 +195,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme @@ -195,7 +195,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
195 subscribeHolder.putCatalogSubscribe(platformId, subscribeInfo); 195 subscribeHolder.putCatalogSubscribe(platformId, subscribeInfo);
196 } 196 }
197 } catch (SipException | InvalidArgumentException | ParseException e) { 197 } catch (SipException | InvalidArgumentException | ParseException e) {
198 - e.printStackTrace(); 198 + logger.error("未处理的异常 ", e);
199 } 199 }
200 } 200 }
201 } 201 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java
@@ -186,9 +186,13 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme @@ -186,9 +186,13 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme
186 // 发送给平台的报警信息。 发送redis通知 186 // 发送给平台的报警信息。 发送redis通知
187 logger.info("[发送给平台的报警信息]内容:{}", JSONObject.toJSONString(deviceAlarm)); 187 logger.info("[发送给平台的报警信息]内容:{}", JSONObject.toJSONString(deviceAlarm));
188 AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage(); 188 AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage();
189 - alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod())); 189 + if (deviceAlarm.getAlarmMethod() != null) {
  190 + alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod()));
  191 + }
190 alarmChannelMessage.setAlarmDescription(deviceAlarm.getAlarmDescription()); 192 alarmChannelMessage.setAlarmDescription(deviceAlarm.getAlarmDescription());
191 - alarmChannelMessage.setAlarmType(Integer.parseInt(deviceAlarm.getAlarmType())); 193 + if (deviceAlarm.getAlarmType() != null) {
  194 + alarmChannelMessage.setAlarmType(Integer.parseInt(deviceAlarm.getAlarmType()));
  195 + }
192 alarmChannelMessage.setGbId(channelId); 196 alarmChannelMessage.setGbId(channelId);
193 redisCatchStorage.sendAlarmMsg(alarmChannelMessage); 197 redisCatchStorage.sendAlarmMsg(alarmChannelMessage);
194 continue; 198 continue;
@@ -204,6 +208,7 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme @@ -204,6 +208,7 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme
204 publisher.deviceAlarmEventPublish(deviceAlarm); 208 publisher.deviceAlarmEventPublish(deviceAlarm);
205 } 209 }
206 }catch (Exception e) { 210 }catch (Exception e) {
  211 + logger.error("未处理的异常 ", e);
207 logger.warn("[收到报警通知] 发现未处理的异常, {}\r\n{}",e.getMessage(), evt.getRequest()); 212 logger.warn("[收到报警通知] 发现未处理的异常, {}\r\n{}",e.getMessage(), evt.getRequest());
208 } 213 }
209 } 214 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
@@ -149,9 +149,10 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen @@ -149,9 +149,10 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen
149 redisCatchStorage.sendMobilePositionMsg(jsonObject); 149 redisCatchStorage.sendMobilePositionMsg(jsonObject);
150 150
151 } catch (DocumentException e) { 151 } catch (DocumentException e) {
152 - e.printStackTrace(); 152 + logger.error("未处理的异常 ", e);
153 } catch (Exception e) { 153 } catch (Exception e) {
154 - logger.warn("[移动位置通知] 发现未处理的异常, {}\r\n{}",e.getMessage(), evt.getRequest()); 154 + logger.warn("[移动位置通知] 发现未处理的异常, \r\n{}", evt.getRequest());
  155 + logger.error("[移动位置通知] 异常内容: ", e);
155 } 156 }
156 } 157 }
157 }); 158 });
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/DeviceInfoQueryMessageHandler.java
@@ -60,17 +60,24 @@ public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent imp @@ -60,17 +60,24 @@ public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent imp
60 return; 60 return;
61 } 61 }
62 String sn = rootElement.element("SN").getText(); 62 String sn = rootElement.element("SN").getText();
  63 +
63 /*根据WVP原有的数据结构,设备和通道是分开放置,设备信息都是存放在设备表里,通道表里的设备信息不可作为真实信息处理 64 /*根据WVP原有的数据结构,设备和通道是分开放置,设备信息都是存放在设备表里,通道表里的设备信息不可作为真实信息处理
64 大部分NVR/IPC设备对他的通道信息实现都是返回默认的值没有什么参考价值。NVR/IPC通道我们统一使用设备表的设备信息来作为返回。 65 大部分NVR/IPC设备对他的通道信息实现都是返回默认的值没有什么参考价值。NVR/IPC通道我们统一使用设备表的设备信息来作为返回。
65 我们这里使用查询数据库的方式来实现这个设备信息查询的功能,在其他地方对设备信息更新达到正确的目的。*/ 66 我们这里使用查询数据库的方式来实现这个设备信息查询的功能,在其他地方对设备信息更新达到正确的目的。*/
  67 +
66 String channelId = getText(rootElement, "DeviceID"); 68 String channelId = getText(rootElement, "DeviceID");
67 - Device device = storager.queryDeviceInfoByPlatformIdAndChannelId(parentPlatform.getServerGBId(), channelId);  
68 - if (device ==null){  
69 - logger.error("[平台没有该通道的使用权限]:platformId"+parentPlatform.getServerGBId()+" deviceID:"+channelId);  
70 - return; 69 + // 查询这是通道id还是设备id
  70 + Device device = null;
  71 + // 如果id指向平台的国标编号,那么就是查询平台的信息
  72 + if (!parentPlatform.getDeviceGBId().equals(channelId)) {
  73 + device = storager.queryDeviceInfoByPlatformIdAndChannelId(parentPlatform.getServerGBId(), channelId);
  74 + if (device ==null){
  75 + logger.error("[平台没有该通道的使用权限]:platformId"+parentPlatform.getServerGBId()+" deviceID:"+channelId);
  76 + return;
  77 + }
71 } 78 }
72 try { 79 try {
73 - cmderFroPlatform.deviceInfoResponse(parentPlatform,device, sn, fromHeader.getTag()); 80 + cmderFroPlatform.deviceInfoResponse(parentPlatform, device, sn, fromHeader.getTag());
74 } catch (SipException | InvalidArgumentException | ParseException e) { 81 } catch (SipException | InvalidArgumentException | ParseException e) {
75 logger.error("[命令发送失败] 国标级联 DeviceInfo查询回复: {}", e.getMessage()); 82 logger.error("[命令发送失败] 国标级联 DeviceInfo查询回复: {}", e.getMessage());
76 } 83 }
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java
@@ -131,7 +131,8 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp @@ -131,7 +131,8 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
131 131
132 } 132 }
133 }catch (Exception e) { 133 }catch (Exception e) {
134 - logger.warn("[收到通道] 发现未处理的异常, {}\r\n{}",e.getMessage(), evt.getRequest()); 134 + logger.warn("[收到通道] 发现未处理的异常, \r\n{}", evt.getRequest());
  135 + logger.error("[收到通道] 异常内容: ", e);
135 } 136 }
136 } 137 }
137 }); 138 });
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java
@@ -142,7 +142,7 @@ public class MobilePositionResponseMessageHandler extends SIPRequestProcessorPar @@ -142,7 +142,7 @@ public class MobilePositionResponseMessageHandler extends SIPRequestProcessorPar
142 } 142 }
143 143
144 } catch (DocumentException e) { 144 } catch (DocumentException e) {
145 - e.printStackTrace(); 145 + logger.error("未处理的异常 ", e);
146 } 146 }
147 } 147 }
148 148
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/RecordInfoResponseMessageHandler.java
@@ -150,7 +150,8 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent @@ -150,7 +150,8 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent
150 } 150 }
151 } 151 }
152 } catch (Exception e) { 152 } catch (Exception e) {
153 - logger.error("[国标录像] 发现未处理的异常, "+e.getMessage(), e); 153 + logger.error("[国标录像] 发现未处理的异常, \r\n{}", evt.getRequest());
  154 + logger.error("[国标录像] 异常内容: ", e);
154 } 155 }
155 }); 156 });
156 } 157 }
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
@@ -221,7 +221,7 @@ public class ZLMRTPServerFactory { @@ -221,7 +221,7 @@ public class ZLMRTPServerFactory {
221 if (localPort == 0) { 221 if (localPort == 0) {
222 return null; 222 return null;
223 } 223 }
224 - }alarm 224 + }
225 SendRtpItem sendRtpItem = new SendRtpItem(); 225 SendRtpItem sendRtpItem = new SendRtpItem();
226 sendRtpItem.setIp(ip); 226 sendRtpItem.setIp(ip);
227 sendRtpItem.setPort(port); 227 sendRtpItem.setPort(port);
src/main/java/com/genersoft/iot/vmp/service/impl/StreamProxyServiceImpl.java
@@ -207,7 +207,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService { @@ -207,7 +207,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
207 dataSourceTransactionManager.commit(transactionStatus); //手动提交 207 dataSourceTransactionManager.commit(transactionStatus); //手动提交
208 result = true; 208 result = true;
209 }catch (Exception e) { 209 }catch (Exception e) {
210 - e.printStackTrace(); 210 + logger.error("未处理的异常 ", e);
211 dataSourceTransactionManager.rollback(transactionStatus); 211 dataSourceTransactionManager.rollback(transactionStatus);
212 } 212 }
213 return result; 213 return result;
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisAlarmMsgListener.java
@@ -55,7 +55,7 @@ public class RedisAlarmMsgListener implements MessageListener { @@ -55,7 +55,7 @@ public class RedisAlarmMsgListener implements MessageListener {
55 boolean isEmpty = taskQueue.isEmpty(); 55 boolean isEmpty = taskQueue.isEmpty();
56 taskQueue.offer(message); 56 taskQueue.offer(message);
57 if (isEmpty) { 57 if (isEmpty) {
58 - logger.info("[线程池信息]活动线程数:{}, 最大线程数: {}", taskExecutor.getActiveCount(), taskExecutor.getMaxPoolSize()); 58 +// logger.info("[线程池信息]活动线程数:{}, 最大线程数: {}", taskExecutor.getActiveCount(), taskExecutor.getMaxPoolSize());
59 taskExecutor.execute(() -> { 59 taskExecutor.execute(() -> {
60 while (!taskQueue.isEmpty()) { 60 while (!taskQueue.isEmpty()) {
61 Message msg = taskQueue.poll(); 61 Message msg = taskQueue.poll();
@@ -140,6 +140,7 @@ public class RedisAlarmMsgListener implements MessageListener { @@ -140,6 +140,7 @@ public class RedisAlarmMsgListener implements MessageListener {
140 } 140 }
141 } 141 }
142 }catch (Exception e) { 142 }catch (Exception e) {
  143 + logger.error("未处理的异常 ", e);
143 logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 144 logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage());
144 } 145 }
145 } 146 }
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
@@ -202,7 +202,8 @@ public class RedisGbPlayMsgListener implements MessageListener { @@ -202,7 +202,8 @@ public class RedisGbPlayMsgListener implements MessageListener {
202 202
203 } 203 }
204 }catch (Exception e) { 204 }catch (Exception e) {
205 - logger.warn("[RedisGbPlayMsg] 发现未处理的异常, {}",e.getMessage()); 205 + logger.warn("[RedisGbPlayMsg] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  206 + logger.error("[RedisGbPlayMsg] 异常内容: ", e);
206 } 207 }
207 } 208 }
208 }); 209 });
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGpsMsgListener.java
@@ -53,7 +53,8 @@ public class RedisGpsMsgListener implements MessageListener { @@ -53,7 +53,8 @@ public class RedisGpsMsgListener implements MessageListener {
53 // 只是放入redis缓存起来 53 // 只是放入redis缓存起来
54 redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo); 54 redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo);
55 }catch (Exception e) { 55 }catch (Exception e) {
56 - logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 56 + logger.warn("[REDIS的ALARM通知] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  57 + logger.error("[REDIS的ALARM通知] 异常内容: ", e);
57 } 58 }
58 } 59 }
59 }); 60 });
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamResponseListener.java
@@ -58,7 +58,8 @@ public class RedisPushStreamResponseListener implements MessageListener { @@ -58,7 +58,8 @@ public class RedisPushStreamResponseListener implements MessageListener {
58 responseEvents.get(response.getApp() + response.getStream()).run(response); 58 responseEvents.get(response.getApp() + response.getStream()).run(response);
59 } 59 }
60 }catch (Exception e) { 60 }catch (Exception e) {
61 - logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 61 + logger.warn("[REDIS消息-请求推流结果] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  62 + logger.error("[REDIS消息-请求推流结果] 异常内容: ", e);
62 } 63 }
63 } 64 }
64 }); 65 });
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusListMsgListener.java
@@ -95,7 +95,8 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener { @@ -95,7 +95,8 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener {
95 gbStreamService.updateGbIdOrName(streamPushItemForUpdate); 95 gbStreamService.updateGbIdOrName(streamPushItemForUpdate);
96 } 96 }
97 }catch (Exception e) { 97 }catch (Exception e) {
98 - logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 98 + logger.warn("[REDIS消息-推流设备列表更新] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  99 + logger.error("[REDIS消息-推流设备列表更新] 异常内容: ", e);
99 } 100 }
100 } 101 }
101 }); 102 });
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusMsgListener.java
@@ -79,7 +79,8 @@ public class RedisPushStreamStatusMsgListener implements MessageListener, Applic @@ -79,7 +79,8 @@ public class RedisPushStreamStatusMsgListener implements MessageListener, Applic
79 streamPushService.online(statusChangeFromPushStream.getOnlineStreams()); 79 streamPushService.online(statusChangeFromPushStream.getOnlineStreams());
80 } 80 }
81 }catch (Exception e) { 81 }catch (Exception e) {
82 - logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 82 + logger.warn("[REDIS消息-推流设备状态变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  83 + logger.error("[REDIS消息-推流设备状态变化] 异常内容: ", e);
83 } 84 }
84 } 85 }
85 }); 86 });
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisStreamMsgListener.java
@@ -82,7 +82,8 @@ public class RedisStreamMsgListener implements MessageListener { @@ -82,7 +82,8 @@ public class RedisStreamMsgListener implements MessageListener {
82 zlmMediaListManager.removeMedia(app, stream); 82 zlmMediaListManager.removeMedia(app, stream);
83 } 83 }
84 }catch (Exception e) { 84 }catch (Exception e) {
85 - logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); 85 + logger.warn("[REDIS消息-流变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(message));
  86 + logger.error("[REDIS消息-流变化] 异常内容: ", e);
86 } 87 }
87 } 88 }
88 }); 89 });
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -197,7 +197,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @@ -197,7 +197,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
197 dataSourceTransactionManager.commit(transactionStatus); //手动提交 197 dataSourceTransactionManager.commit(transactionStatus); //手动提交
198 return true; 198 return true;
199 }catch (Exception e) { 199 }catch (Exception e) {
200 - e.printStackTrace(); 200 + logger.error("未处理的异常 ", e);
201 dataSourceTransactionManager.rollback(transactionStatus); 201 dataSourceTransactionManager.rollback(transactionStatus);
202 return false; 202 return false;
203 } 203 }
@@ -313,7 +313,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { @@ -313,7 +313,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
313 } 313 }
314 return true; 314 return true;
315 }catch (Exception e) { 315 }catch (Exception e) {
316 - e.printStackTrace(); 316 + logger.error("未处理的异常 ", e);
317 dataSourceTransactionManager.rollback(transactionStatus); 317 dataSourceTransactionManager.rollback(transactionStatus);
318 return false; 318 return false;
319 } 319 }
src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java
@@ -38,7 +38,7 @@ public class RedisUtil { @@ -38,7 +38,7 @@ public class RedisUtil {
38 } 38 }
39 return true; 39 return true;
40 } catch (Exception e) { 40 } catch (Exception e) {
41 - e.printStackTrace(); 41 + logger.error("未处理的异常 ", e);
42 return false; 42 return false;
43 } 43 }
44 } 44 }
@@ -66,7 +66,7 @@ public class RedisUtil { @@ -66,7 +66,7 @@ public class RedisUtil {
66 try { 66 try {
67 return redisTemplate.hasKey(key); 67 return redisTemplate.hasKey(key);
68 } catch (Exception e) { 68 } catch (Exception e) {
69 - e.printStackTrace(); 69 + logger.error("未处理的异常 ", e);
70 return false; 70 return false;
71 } 71 }
72 } 72 }
@@ -91,7 +91,7 @@ public class RedisUtil { @@ -91,7 +91,7 @@ public class RedisUtil {
91 } 91 }
92 return true; 92 return true;
93 } catch (Exception e) { 93 } catch (Exception e) {
94 - e.printStackTrace(); 94 + logger.error("未处理的异常 ", e);
95 return false; 95 return false;
96 } 96 }
97 } 97 }
@@ -124,7 +124,7 @@ public class RedisUtil { @@ -124,7 +124,7 @@ public class RedisUtil {
124 redisTemplate.opsForValue().set(key, value); 124 redisTemplate.opsForValue().set(key, value);
125 return true; 125 return true;
126 } catch (Exception e) { 126 } catch (Exception e) {
127 - e.printStackTrace(); 127 + logger.error("未处理的异常 ", e);
128 return false; 128 return false;
129 } 129 }
130 } 130 }
@@ -148,7 +148,7 @@ public class RedisUtil { @@ -148,7 +148,7 @@ public class RedisUtil {
148 } 148 }
149 return true; 149 return true;
150 } catch (Exception e) { 150 } catch (Exception e) {
151 - e.printStackTrace(); 151 + logger.error("未处理的异常 ", e);
152 return false; 152 return false;
153 } 153 }
154 } 154 }
@@ -226,7 +226,7 @@ public class RedisUtil { @@ -226,7 +226,7 @@ public class RedisUtil {
226 redisTemplate.opsForHash().putAll(key, map); 226 redisTemplate.opsForHash().putAll(key, map);
227 return true; 227 return true;
228 } catch (Exception e) { 228 } catch (Exception e) {
229 - e.printStackTrace(); 229 + logger.error("未处理的异常 ", e);
230 return false; 230 return false;
231 } 231 }
232 } 232 }
@@ -249,7 +249,7 @@ public class RedisUtil { @@ -249,7 +249,7 @@ public class RedisUtil {
249 } 249 }
250 return true; 250 return true;
251 } catch (Exception e) { 251 } catch (Exception e) {
252 - e.printStackTrace(); 252 + logger.error("未处理的异常 ", e);
253 return false; 253 return false;
254 } 254 }
255 } 255 }
@@ -269,7 +269,7 @@ public class RedisUtil { @@ -269,7 +269,7 @@ public class RedisUtil {
269 redisTemplate.opsForHash().put(key, item, value); 269 redisTemplate.opsForHash().put(key, item, value);
270 return true; 270 return true;
271 } catch (Exception e) { 271 } catch (Exception e) {
272 - e.printStackTrace(); 272 + logger.error("未处理的异常 ", e);
273 return false; 273 return false;
274 } 274 }
275 } 275 }
@@ -293,7 +293,7 @@ public class RedisUtil { @@ -293,7 +293,7 @@ public class RedisUtil {
293 } 293 }
294 return true; 294 return true;
295 } catch (Exception e) { 295 } catch (Exception e) {
296 - e.printStackTrace(); 296 + logger.error("未处理的异常 ", e);
297 return false; 297 return false;
298 } 298 }
299 } 299 }
@@ -365,7 +365,7 @@ public class RedisUtil { @@ -365,7 +365,7 @@ public class RedisUtil {
365 try { 365 try {
366 return redisTemplate.opsForSet().members(key); 366 return redisTemplate.opsForSet().members(key);
367 } catch (Exception e) { 367 } catch (Exception e) {
368 - e.printStackTrace(); 368 + logger.error("未处理的异常 ", e);
369 return null; 369 return null;
370 } 370 }
371 } 371 }
@@ -383,7 +383,7 @@ public class RedisUtil { @@ -383,7 +383,7 @@ public class RedisUtil {
383 try { 383 try {
384 return redisTemplate.opsForSet().isMember(key, value); 384 return redisTemplate.opsForSet().isMember(key, value);
385 } catch (Exception e) { 385 } catch (Exception e) {
386 - e.printStackTrace(); 386 + logger.error("未处理的异常 ", e);
387 return false; 387 return false;
388 } 388 }
389 } 389 }
@@ -401,7 +401,7 @@ public class RedisUtil { @@ -401,7 +401,7 @@ public class RedisUtil {
401 try { 401 try {
402 return redisTemplate.opsForSet().add(key, values); 402 return redisTemplate.opsForSet().add(key, values);
403 } catch (Exception e) { 403 } catch (Exception e) {
404 - e.printStackTrace(); 404 + logger.error("未处理的异常 ", e);
405 return 0; 405 return 0;
406 } 406 }
407 } 407 }
@@ -424,7 +424,7 @@ public class RedisUtil { @@ -424,7 +424,7 @@ public class RedisUtil {
424 } 424 }
425 return count; 425 return count;
426 } catch (Exception e) { 426 } catch (Exception e) {
427 - e.printStackTrace(); 427 + logger.error("未处理的异常 ", e);
428 return 0; 428 return 0;
429 } 429 }
430 } 430 }
@@ -441,7 +441,7 @@ public class RedisUtil { @@ -441,7 +441,7 @@ public class RedisUtil {
441 try { 441 try {
442 return redisTemplate.opsForSet().size(key); 442 return redisTemplate.opsForSet().size(key);
443 } catch (Exception e) { 443 } catch (Exception e) {
444 - e.printStackTrace(); 444 + logger.error("未处理的异常 ", e);
445 return 0; 445 return 0;
446 } 446 }
447 } 447 }
@@ -459,7 +459,7 @@ public class RedisUtil { @@ -459,7 +459,7 @@ public class RedisUtil {
459 try { 459 try {
460 return redisTemplate.opsForSet().remove(key, values); 460 return redisTemplate.opsForSet().remove(key, values);
461 } catch (Exception e) { 461 } catch (Exception e) {
462 - e.printStackTrace(); 462 + logger.error("未处理的异常 ", e);
463 return 0; 463 return 0;
464 } 464 }
465 } 465 }
@@ -625,7 +625,7 @@ public class RedisUtil { @@ -625,7 +625,7 @@ public class RedisUtil {
625 try { 625 try {
626 return redisTemplate.opsForList().range(key, start, end); 626 return redisTemplate.opsForList().range(key, start, end);
627 } catch (Exception e) { 627 } catch (Exception e) {
628 - e.printStackTrace(); 628 + logger.error("未处理的异常 ", e);
629 return null; 629 return null;
630 } 630 }
631 } 631 }
@@ -642,7 +642,7 @@ public class RedisUtil { @@ -642,7 +642,7 @@ public class RedisUtil {
642 try { 642 try {
643 return redisTemplate.opsForList().size(key); 643 return redisTemplate.opsForList().size(key);
644 } catch (Exception e) { 644 } catch (Exception e) {
645 - e.printStackTrace(); 645 + logger.error("未处理的异常 ", e);
646 return 0; 646 return 0;
647 } 647 }
648 } 648 }
@@ -662,7 +662,7 @@ public class RedisUtil { @@ -662,7 +662,7 @@ public class RedisUtil {
662 try { 662 try {
663 return redisTemplate.opsForList().index(key, index); 663 return redisTemplate.opsForList().index(key, index);
664 } catch (Exception e) { 664 } catch (Exception e) {
665 - e.printStackTrace(); 665 + logger.error("未处理的异常 ", e);
666 return null; 666 return null;
667 } 667 }
668 } 668 }
@@ -681,7 +681,7 @@ public class RedisUtil { @@ -681,7 +681,7 @@ public class RedisUtil {
681 redisTemplate.opsForList().rightPush(key, value); 681 redisTemplate.opsForList().rightPush(key, value);
682 return true; 682 return true;
683 } catch (Exception e) { 683 } catch (Exception e) {
684 - e.printStackTrace(); 684 + logger.error("未处理的异常 ", e);
685 return false; 685 return false;
686 } 686 }
687 } 687 }
@@ -704,7 +704,7 @@ public class RedisUtil { @@ -704,7 +704,7 @@ public class RedisUtil {
704 } 704 }
705 return true; 705 return true;
706 } catch (Exception e) { 706 } catch (Exception e) {
707 - e.printStackTrace(); 707 + logger.error("未处理的异常 ", e);
708 return false; 708 return false;
709 } 709 }
710 } 710 }
@@ -723,7 +723,7 @@ public class RedisUtil { @@ -723,7 +723,7 @@ public class RedisUtil {
723 redisTemplate.opsForList().rightPushAll(key, values); 723 redisTemplate.opsForList().rightPushAll(key, values);
724 return true; 724 return true;
725 } catch (Exception e) { 725 } catch (Exception e) {
726 - e.printStackTrace(); 726 + logger.error("未处理的异常 ", e);
727 return false; 727 return false;
728 } 728 }
729 } 729 }
@@ -746,7 +746,7 @@ public class RedisUtil { @@ -746,7 +746,7 @@ public class RedisUtil {
746 } 746 }
747 return true; 747 return true;
748 } catch (Exception e) { 748 } catch (Exception e) {
749 - e.printStackTrace(); 749 + logger.error("未处理的异常 ", e);
750 return false; 750 return false;
751 } 751 }
752 } 752 }
@@ -766,7 +766,7 @@ public class RedisUtil { @@ -766,7 +766,7 @@ public class RedisUtil {
766 redisTemplate.opsForList().set(key, index, value); 766 redisTemplate.opsForList().set(key, index, value);
767 return true; 767 return true;
768 } catch (Exception e) { 768 } catch (Exception e) {
769 - e.printStackTrace(); 769 + logger.error("未处理的异常 ", e);
770 return false; 770 return false;
771 } 771 }
772 } 772 }
@@ -787,7 +787,7 @@ public class RedisUtil { @@ -787,7 +787,7 @@ public class RedisUtil {
787 try { 787 try {
788 return redisTemplate.opsForList().remove(key, count, value); 788 return redisTemplate.opsForList().remove(key, count, value);
789 } catch (Exception e) { 789 } catch (Exception e) {
790 - e.printStackTrace(); 790 + logger.error("未处理的异常 ", e);
791 return 0; 791 return 0;
792 } 792 }
793 } 793 }
@@ -829,7 +829,7 @@ public class RedisUtil { @@ -829,7 +829,7 @@ public class RedisUtil {
829 Set<String> set = redisTemplate.keys(key); 829 Set<String> set = redisTemplate.keys(key);
830 return new ArrayList<>(set); 830 return new ArrayList<>(set);
831 } catch (Exception e) { 831 } catch (Exception e) {
832 - e.printStackTrace(); 832 + logger.error("未处理的异常 ", e);
833 return null; 833 return null;
834 } 834 }
835 } 835 }
@@ -854,7 +854,7 @@ public class RedisUtil { @@ -854,7 +854,7 @@ public class RedisUtil {
854 // //关闭cursor 854 // //关闭cursor
855 // cursor.close(); 855 // cursor.close();
856 // } catch (Exception e) { 856 // } catch (Exception e) {
857 -// e.printStackTrace(); 857 +// logger.error("未处理的异常 ", e);
858 // } 858 // }
859 // return result; 859 // return result;
860 // } 860 // }
src/main/java/com/genersoft/iot/vmp/vmanager/streamPush/StreamPushController.java
@@ -181,7 +181,7 @@ public class StreamPushController { @@ -181,7 +181,7 @@ public class StreamPushController {
181 String name = file.getName(); 181 String name = file.getName();
182 inputStream = file.getInputStream(); 182 inputStream = file.getInputStream();
183 } catch (IOException e) { 183 } catch (IOException e) {
184 - e.printStackTrace(); 184 + logger.error("未处理的异常 ", e);
185 } 185 }
186 try { 186 try {
187 //传入参数 187 //传入参数
web_src/src/components/dialog/platformEdit.vue
@@ -215,7 +215,7 @@ export default { @@ -215,7 +215,7 @@ export default {
215 this.platform.enable = platform.enable; 215 this.platform.enable = platform.enable;
216 this.platform.ptz = platform.ptz; 216 this.platform.ptz = platform.ptz;
217 this.platform.rtcp = platform.rtcp; 217 this.platform.rtcp = platform.rtcp;
218 - this.platform.rtcpasMessageChannel = platform.asMessageChannel; 218 + this.platform.asMessageChannel = platform.asMessageChannel;
219 this.platform.name = platform.name; 219 this.platform.name = platform.name;
220 this.platform.serverGBId = platform.serverGBId; 220 this.platform.serverGBId = platform.serverGBId;
221 this.platform.serverGBDomain = platform.serverGBDomain; 221 this.platform.serverGBDomain = platform.serverGBDomain;