临时提交

This commit is contained in:
lin 2025-10-16 18:07:36 +08:00
parent ac92237e08
commit dd0a760d8a
11 changed files with 40 additions and 21 deletions

View File

@ -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进行解密

View File

@ -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,9 +11,7 @@ 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;

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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

View File

@ -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
@ -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