From 39ffdf5754b4ebca682bd3c925f7a500e8a1bbda Mon Sep 17 00:00:00 2001
From: aix <vip_xiaobin810@163.com>
Date: Thu, 08 Aug 2024 16:56:36 +0800
Subject: [PATCH] 国土调查云身份凭证token

---
 src/main/java/com/dji/sample/control/service/impl/PayloadCommandsHandler.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/dji/sample/control/service/impl/PayloadCommandsHandler.java b/src/main/java/com/dji/sample/control/service/impl/PayloadCommandsHandler.java
index c0eeee6..a348f5b 100644
--- a/src/main/java/com/dji/sample/control/service/impl/PayloadCommandsHandler.java
+++ b/src/main/java/com/dji/sample/control/service/impl/PayloadCommandsHandler.java
@@ -33,19 +33,19 @@
         Optional<OsdSubDeviceReceiver> deviceOpt = SpringBeanUtils.getBean(IDeviceRedisService.class)
                 .getDeviceOsd(deviceSn, OsdSubDeviceReceiver.class);
         if (deviceOpt.isEmpty()) {
-            throw new RuntimeException("The device is offline.");
+            throw new RuntimeException("设备离线");
         }
         osdCamera = deviceOpt.get().getCameras().stream()
                 .filter(osdCamera -> param.getPayloadIndex().equals(osdCamera.getPayloadIndex()))
                 .findAny()
-                .orElseThrow(() -> new RuntimeException("Did not receive osd information about the camera, please check the cache data."));
+                .orElseThrow(() -> new RuntimeException("没有收到相机osd信息,请检查缓存数据"));
         return true;
     }
 
     private String checkDockOnline(String dockSn) {
         Optional<DeviceDTO> deviceOpt = SpringBeanUtils.getBean(IDeviceRedisService.class).getDeviceOnline(dockSn);
         if (deviceOpt.isEmpty()) {
-            throw new RuntimeException("The dock is offline.");
+            throw new RuntimeException("设备离线");
         }
         return deviceOpt.get().getChildDeviceSn();
     }
@@ -53,7 +53,7 @@
     private void checkDeviceOnline(String deviceSn) {
         boolean isOnline = SpringBeanUtils.getBean(IDeviceRedisService.class).checkDeviceOnline(deviceSn);
         if (!isOnline) {
-            throw new RuntimeException("The device is offline.");
+            throw new RuntimeException("设备离线");
         }
     }
 
@@ -61,13 +61,13 @@
         boolean hasAuthority = SpringBeanUtils.getBean(IDevicePayloadService.class)
                 .checkAuthorityPayload(deviceSn, param.getPayloadIndex());
         if (!hasAuthority) {
-            throw new RuntimeException("The device does not have payload control authority.");
+            throw new RuntimeException("设备没有有效载荷控制权限");
         }
     }
 
     public final void checkCondition(String dockSn) {
         if (!valid()) {
-            throw new RuntimeException("illegal argument");
+            throw new RuntimeException("非法参数");
         }
 
         String deviceSn = checkDockOnline(dockSn);
@@ -75,7 +75,7 @@
         checkAuthority(deviceSn);
 
         if (!canPublish(deviceSn)) {
-            throw new RuntimeException("The current state of the drone does not support this function, please try again later.");
+            throw new RuntimeException("无人机当前状态不支持此功能,请稍后再试");
         }
     }
 

--
Gitblit v1.9.3