src/main/java/com/dji/sample/component/websocket/config/AuthPrincipalHandler.java
@@ -15,7 +15,6 @@ import java.security.Principal; import java.util.Map; import java.util.Optional; import java.util.UUID; /** * @author sean.zhou @@ -64,7 +63,7 @@ CustomClaim claim = (CustomClaim) ((ServletServerHttpRequest) request).getServletRequest() .getAttribute(AuthInterceptor.TOKEN_CLAIM); return () -> UUID.randomUUID().toString() + "/" + claim.getUserType() + "/" + claim.getId(); return () -> claim.getWorkspaceId() + "/" + claim.getUserType() + "/" + claim.getId(); } return () -> null; } src/main/java/com/dji/sample/control/service/impl/ControlServiceImpl.java
@@ -68,7 +68,7 @@ mapper.convertValue(Objects.nonNull(param) ? param : new Object(), controlMethodEnum.getClazz()) : new RemoteDebugHandler(); if (!handler.canPublish(sn)) { throw new RuntimeException("The current state of the dock does not support this function."); throw new RuntimeException("当前的机场状态不支持此功能。"); } if (Objects.nonNull(param) && !handler.valid()) { throw new RuntimeException(CommonErrorEnum.ILLEGAL_ARGUMENT.getErrorMsg());