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