Merge branch 'wvp-28181-2.0'
# Conflicts: # src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package com.genersoft.iot.vmp.conf;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEventListener;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
@@ -40,8 +40,8 @@ public class GlobalExceptionHandler {
|
||||
*/
|
||||
@ExceptionHandler(ControllerException.class)
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
public WVPResult<String> exceptionHandler(ControllerException e) {
|
||||
return WVPResult.fail(e.getCode(), e.getMsg());
|
||||
public ResponseEntity<WVPResult<String>> exceptionHandler(ControllerException e) {
|
||||
return new ResponseEntity<>(WVPResult.fail(e.getCode(), e.getMsg()), HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ public class GlobalExceptionHandler {
|
||||
*/
|
||||
@ExceptionHandler(BadCredentialsException.class)
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
public WVPResult<String> exceptionHandler(BadCredentialsException e) {
|
||||
return WVPResult.fail(ErrorCode.ERROR100.getCode(), e.getMessage());
|
||||
public ResponseEntity<WVPResult<String>> exceptionHandler(BadCredentialsException e) {
|
||||
return new ResponseEntity<>(WVPResult.fail(ErrorCode.ERROR100.getCode(), e.getMessage()), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class UserSetting {
|
||||
|
||||
private Boolean gbSendStreamStrict = Boolean.FALSE;
|
||||
|
||||
private Boolean syncChannelOnDeviceOnline = Boolean.FALSE;
|
||||
|
||||
private String serverId = "000000";
|
||||
|
||||
private String thirdPartyGBIdReg = "[\\s\\S]*";
|
||||
@@ -186,4 +188,12 @@ public class UserSetting {
|
||||
public void setGbSendStreamStrict(Boolean gbSendStreamStrict) {
|
||||
this.gbSendStreamStrict = gbSendStreamStrict;
|
||||
}
|
||||
|
||||
public Boolean getSyncChannelOnDeviceOnline() {
|
||||
return syncChannelOnDeviceOnline;
|
||||
}
|
||||
|
||||
public void setSyncChannelOnDeviceOnline(Boolean syncChannelOnDeviceOnline) {
|
||||
this.syncChannelOnDeviceOnline = syncChannelOnDeviceOnline;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user