优化各个配置启动顺序

This commit is contained in:
648540858
2023-02-22 18:01:30 +08:00
parent 4446218f9e
commit 2d2832dbe9
19 changed files with 50 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
@Component
@Order(value=1)
@Order(value=10)
public class SipLayer implements CommandLineRunner {
private final static Logger logger = LoggerFactory.getLogger(SipLayer.class);

View File

@@ -28,7 +28,7 @@ import java.util.Map;
* @author lin
*/
@Component
@Order(value=4)
@Order(value=14)
public class SipRunner implements CommandLineRunner {
@Autowired

View File

@@ -38,6 +38,7 @@ import javax.sip.header.FromHeader;
import javax.sip.message.Response;
import java.text.ParseException;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
@@ -150,6 +151,17 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
Element deviceIdElement = rootElement.element("DeviceID");
String channelId = deviceIdElement.getTextTrim().toString();
Device device = redisCatchStorage.getDevice(deviceId);
if (device == null) {
// 根据通道id查询设备Id
List<Device> deviceList = deviceChannelService.getDeviceByChannelId(channelId);
if (deviceList.size() > 0) {
device = deviceList.get(0);
}else {
logger.warn("[mobilePosition移动位置Notify] 未找到通道{}所属的设备", channelId);
return;
}
}
if (device != null) {
if (!ObjectUtils.isEmpty(device.getName())) {
mobilePosition.setDeviceName(device.getName());

View File

@@ -1,6 +1,5 @@
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl;
import com.genersoft.iot.vmp.conf.ServiceInfo;
import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper;
@@ -92,7 +91,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
// }
// }
System.out.println(ServiceInfo.getServerPort());
// System.out.println(ServiceInfo.getServerPort());
SIPRequest request = (SIPRequest)evt.getRequest();
Response response = null;
boolean passwordCorrect = false;