mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 22:17:49 +08:00
临时提交
This commit is contained in:
parent
ac92237e08
commit
dd0a760d8a
@ -152,7 +152,6 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
parameterMap.remove("sign");
|
|
||||||
// 参数排序
|
// 参数排序
|
||||||
Set<String> paramKeys = new TreeSet<>(parameterMap.keySet());
|
Set<String> paramKeys = new TreeSet<>(parameterMap.keySet());
|
||||||
|
|
||||||
@ -160,6 +159,9 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
// 参数拼接
|
// 参数拼接
|
||||||
StringBuilder beforeSign = new StringBuilder();
|
StringBuilder beforeSign = new StringBuilder();
|
||||||
for (String paramKey : paramKeys) {
|
for (String paramKey : paramKeys) {
|
||||||
|
if (paramKey.equals("sign")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
beforeSign.append(paramKey).append(parameterMap.get(paramKey)[0]);
|
beforeSign.append(paramKey).append(parameterMap.get(paramKey)[0]);
|
||||||
}
|
}
|
||||||
// 如果是post请求的json消息,拼接body字符串
|
// 如果是post请求的json消息,拼接body字符串
|
||||||
@ -182,15 +184,15 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 验证请求时间戳
|
// 验证请求时间戳
|
||||||
Long timestamp = Long.getLong(timestampStr);
|
long timestamp = Long.parseLong(timestampStr);
|
||||||
Instant timeInstant = Instant.ofEpochMilli(timestamp + SyTokenManager.INSTANCE.expires * 60 * 1000);
|
Instant timeInstant = Instant.ofEpochMilli(timestamp + SyTokenManager.INSTANCE.expires * 60 * 1000);
|
||||||
if (timeInstant.isAfter(Instant.now())) {
|
if (timeInstant.isBefore(Instant.now())) {
|
||||||
log.info("[SY-接口验签] 时间戳已经过期");
|
log.info("[SY-接口验签] 时间戳已经过期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// accessToken校验
|
// accessToken校验
|
||||||
if (accessToken.equals(SyTokenManager.INSTANCE.adminToken)) {
|
if (accessToken.equals(SyTokenManager.INSTANCE.adminToken)) {
|
||||||
log.info("[SY-接口验签] 时间戳已经过期");
|
log.info("[SY-接口验签] adminToken已经默认放行");
|
||||||
return true;
|
return true;
|
||||||
}else {
|
}else {
|
||||||
// 对token进行解密
|
// 对token进行解密
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
|||||||
import gov.nist.core.InternalErrorHandler;
|
import gov.nist.core.InternalErrorHandler;
|
||||||
import gov.nist.javax.sip.header.SIPDate;
|
import gov.nist.javax.sip.header.SIPDate;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,11 +11,9 @@ import java.util.*;
|
|||||||
*/
|
*/
|
||||||
public class GbSipDate extends SIPDate {
|
public class GbSipDate extends SIPDate {
|
||||||
|
|
||||||
/**
|
@Serial
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private Calendar javaCal;
|
private Calendar javaCal;
|
||||||
|
|
||||||
public GbSipDate(long timeMillis) {
|
public GbSipDate(long timeMillis) {
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package com.genersoft.iot.vmp.gb28181.event.alarm;
|
|||||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 报警事件
|
* @description: 报警事件
|
||||||
* @author: lawrencehj
|
* @author: lawrencehj
|
||||||
@ -10,9 +12,8 @@ import org.springframework.context.ApplicationEvent;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class AlarmEvent extends ApplicationEvent {
|
public class AlarmEvent extends ApplicationEvent {
|
||||||
/**
|
|
||||||
*
|
@Serial
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public AlarmEvent(Object source) {
|
public AlarmEvent(Object source) {
|
||||||
@ -24,7 +25,7 @@ public class AlarmEvent extends ApplicationEvent {
|
|||||||
public DeviceAlarm getAlarmInfo() {
|
public DeviceAlarm getAlarmInfo() {
|
||||||
return deviceAlarm;
|
return deviceAlarm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAlarmInfo(DeviceAlarm deviceAlarm) {
|
public void setAlarmInfo(DeviceAlarm deviceAlarm) {
|
||||||
this.deviceAlarm = deviceAlarm;
|
this.deviceAlarm = deviceAlarm;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 录像查询结束时间
|
* @description: 录像查询结束时间
|
||||||
* @author: pan
|
* @author: pan
|
||||||
@ -13,9 +15,8 @@ import org.springframework.context.ApplicationEvent;
|
|||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
public class RecordInfoEndEvent extends ApplicationEvent {
|
public class RecordInfoEndEvent extends ApplicationEvent {
|
||||||
/**
|
|
||||||
*
|
@Serial
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public RecordInfoEndEvent(Object source) {
|
public RecordInfoEndEvent(Object source) {
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 录像查询结束时间
|
* @description: 录像查询结束时间
|
||||||
* @author: pan
|
* @author: pan
|
||||||
@ -14,9 +16,8 @@ import org.springframework.context.ApplicationEvent;
|
|||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
public class RecordInfoEvent extends ApplicationEvent {
|
public class RecordInfoEvent extends ApplicationEvent {
|
||||||
/**
|
|
||||||
*
|
@Serial
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public RecordInfoEvent(Object source) {
|
public RecordInfoEvent(Object source) {
|
||||||
|
|||||||
@ -67,7 +67,10 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||||||
}
|
}
|
||||||
commonGBChannel.setCreateTime(DateUtil.getNow());
|
commonGBChannel.setCreateTime(DateUtil.getNow());
|
||||||
commonGBChannel.setUpdateTime(DateUtil.getNow());
|
commonGBChannel.setUpdateTime(DateUtil.getNow());
|
||||||
return commonGBChannelMapper.insert(commonGBChannel);
|
int result = commonGBChannelMapper.insert(commonGBChannel);
|
||||||
|
// 发送通道新增通知
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
import java.time.Clock;
|
import java.time.Clock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,6 +16,7 @@ import java.time.Clock;
|
|||||||
@Getter
|
@Getter
|
||||||
public class ConnectChangeEvent extends ApplicationEvent {
|
public class ConnectChangeEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public ConnectChangeEvent(Object source) {
|
public ConnectChangeEvent(Object source) {
|
||||||
|
|||||||
@ -5,11 +5,14 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备更新事件
|
* 设备更新事件
|
||||||
*/
|
*/
|
||||||
public class DeviceUpdateEvent extends ApplicationEvent {
|
public class DeviceUpdateEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public DeviceUpdateEvent(Object source) {
|
public DeviceUpdateEvent(Object source) {
|
||||||
|
|||||||
@ -6,11 +6,14 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备更新事件
|
* 设备更新事件
|
||||||
*/
|
*/
|
||||||
public class JTPositionEvent extends ApplicationEvent {
|
public class JTPositionEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public JTPositionEvent(Object source) {
|
public JTPositionEvent(Object source) {
|
||||||
|
|||||||
@ -5,10 +5,12 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
|
||||||
public abstract class MediaServerEventAbstract extends ApplicationEvent {
|
public abstract class MediaServerEventAbstract extends ApplicationEvent {
|
||||||
|
|
||||||
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
@ -264,6 +264,7 @@ export default {
|
|||||||
this.closeInfoBox()
|
this.closeInfoBox()
|
||||||
this.$store.dispatch('commonChanel/getAllForMap', {}).then(data => {
|
this.$store.dispatch('commonChanel/getAllForMap', {}).then(data => {
|
||||||
cameraListForSource = data
|
cameraListForSource = data
|
||||||
|
console.log(data.length)
|
||||||
let minLng = data[0].gbLongitude
|
let minLng = data[0].gbLongitude
|
||||||
let maxLng = data[0].gbLongitude
|
let maxLng = data[0].gbLongitude
|
||||||
let minLat = data[0].gbLatitude
|
let minLat = data[0].gbLatitude
|
||||||
@ -294,7 +295,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cameraList.push(cameraData)
|
cameraList.push(cameraData)
|
||||||
if (item.mapLevel) {
|
if (item.mapLevel) {
|
||||||
if (cameraListForLevelMap.has(item.mapLevel)) {
|
if (cameraListForLevelMap.has(item.mapLevel)) {
|
||||||
let list = cameraListForLevelMap.get(item.mapLevel)
|
let list = cameraListForLevelMap.get(item.mapLevel)
|
||||||
list.push(cameraData)
|
list.push(cameraData)
|
||||||
@ -350,6 +351,7 @@ export default {
|
|||||||
if (this.channelLayer) {
|
if (this.channelLayer) {
|
||||||
this.channelLayer = this.$refs.mapComponent.updatePointLayer(this.channelLayer, cameraList, true)
|
this.channelLayer = this.$refs.mapComponent.updatePointLayer(this.channelLayer, cameraList, true)
|
||||||
}else {
|
}else {
|
||||||
|
console.log(cameraList.length)
|
||||||
this.channelLayer = this.$refs.mapComponent.addPointLayer(cameraList, clientEvent, null)
|
this.channelLayer = this.$refs.mapComponent.addPointLayer(cameraList, clientEvent, null)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user