zhaowenyu
2025-12-03 b5b95f50e7905e9424628254b3cba7b92aa77cde
ard-sample/src/main/java/com/ard/sample/manage/service/impl/ControlServiceImpl.java
@@ -85,7 +85,7 @@
        boolean isExist = deviceService.checkDeviceOnline(sn);
        if (!isExist) {
            return ResponseResult.error("The dock is offline.");
            return ResponseResult.error(CommonErrorEnum.DEVICE_OFFLINE.getErrorMsg());
        }
        String topic = TopicConst.THING_MODEL_PRE + TopicConst.PRODUCT + sn + TopicConst.SERVICES_SUF;
        String bid = UUID.randomUUID().toString();
@@ -101,9 +101,11 @@
        ServiceReply<EventsOutputReceiver> serviceReply = mapper.convertValue(
                serviceReplyOpt, new TypeReference<ServiceReply<EventsOutputReceiver>>() {});
        if (ResponseResult.CODE_SUCCESS != serviceReply.getResult()) {
            return ResponseResult.error(serviceReply.getResult(),
                    Objects.nonNull(serviceReply.getOutput()) ? serviceReply.getOutput().getStatus() : "errorCode: "
                            + serviceReply.getResult());
            String errorMsg = CommonErrorEnum.getMsgByCode(serviceReply.getResult());
            return ResponseResult.error(serviceReply.getResult(),errorMsg);
//            return ResponseResult.error(serviceReply.getResult(),
//                    Objects.nonNull(serviceReply.getOutput()) ? serviceReply.getOutput().getStatus() : "errorCode: "
//                            + serviceReply.getResult());
        }
        if (controlMethodEnum.getProgress()) {
            RedisOpsUtils.setWithExpire(serviceIdentifier + RedisConst.DELIMITER +  bid, sn,