From c49aebafe55bca031c0c4f5c5fd45dad9ff46f32 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Thu, 20 Nov 2025 09:59:50 +0800
Subject: [PATCH] 优化
---
ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java b/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
index 6197ddb..adacd79 100644
--- a/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
+++ b/ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
@@ -69,7 +69,14 @@
if (Objects.isNull(param)) {
return ResponseResult.error(CommonErrorEnum.ILLEGAL_ARGUMENT);
}
- BasicDeviceProperty basicDeviceProperty = mapper.convertValue(param.getAction(), controlMethodEnum.getClazz());
+ BasicDeviceProperty basicDeviceProperty = null;
+ if(serviceIdentifier.equals("sdr_workmode_switch")){
+ basicDeviceProperty= mapper.convertValue(param.getLink_workmode(), controlMethodEnum.getClazz());
+ }
+ else
+ {
+ basicDeviceProperty = mapper.convertValue(param.getAction(), controlMethodEnum.getClazz());
+ }
if (!basicDeviceProperty.valid()) {
return ResponseResult.error(CommonErrorEnum.ILLEGAL_ARGUMENT);
}
--
Gitblit v1.9.3