|
|
@@ -87,9 +87,13 @@ public class DeviceOprLogsServiceImpl implements IDeviceOprLogsService {
|
|
|
}
|
|
|
|
|
|
private void addDeviceOprLog(DeviceDTO redisDevice, LogOprTypeEnum oprTypeEnum,CustomClaim customClaim) {
|
|
|
+ String userName = "System";
|
|
|
+ if(customClaim != null) {
|
|
|
+ userName = customClaim.getUsername();
|
|
|
+ }
|
|
|
WorkspaceDTO workspaceDTO = workspaceService.getWorkspaceByWorkspaceId(redisDevice.getWorkspaceId()).get();
|
|
|
DeviceOprLogsDTO deviceOprLogsDTO =
|
|
|
- DeviceOprLogsDTO.builder().username(customClaim.getUsername())
|
|
|
+ DeviceOprLogsDTO.builder().username(userName)
|
|
|
.deviceSn(redisDevice.getDeviceSn())
|
|
|
.deviceName(redisDevice.getDeviceName())
|
|
|
.nickName(redisDevice.getNickname())
|