Procházet zdrojové kódy

add 添加子设备消息类型

18339543638 před 4 roky
rodič
revize
41d4e0476d

+ 0 - 17
jetlinks-components/common-component/src/main/java/org/jetlinks/community/annotation/MessageValueCodec.java

@@ -40,22 +40,5 @@ public class MessageValueCodec implements ValueCodec<Object, Object> {
         }
         MessageType messageType = MessageType.of(String.valueOf(msgType)).orElse(MessageType.UNKNOWN);
         return jsonObject.toJavaObject(messageType.getNewInstance().get().getClass());
-//        if(MessageType.WRITE_PROPERTY.name().equals(msgType)){
-//            return jsonObject.toJavaObject(WritePropertyMessage.class);
-//        }
-//        if(MessageType.READ_PROPERTY.name().equals(msgType)){
-//            return jsonObject.toJavaObject(ReadPropertyMessage.class);
-//        }
-//        if(MessageType.INVOKE_FUNCTION.name().equals(msgType)){
-//            return jsonObject.toJavaObject(FunctionInvokeMessage.class);
-//        }
-//        if (MessageType.STATE_CHECK.name().equals(msgType)) {
-//            return jsonObject.toJavaObject(DeviceStateCheckMessage.class);
-//        }
-//        if(MessageType.READ_PROPERTY_REPLY.name().equals(msgType)){
-//
-//        }
-//
-//        return null;
     }
 }

+ 0 - 1
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/interceptor/DeviceDirectiveSendInterceptor.java

@@ -63,7 +63,6 @@ public class DeviceDirectiveSendInterceptor implements DeviceMessageSenderInterc
                 .cast(DeviceMessage.class)
                 .flatMap(msg->
                     deviceDirectivesService.createUpdate()
-                        .where(DeviceDirectivesEntity::getDeviceId,msg.getDeviceId())
                         .where(DeviceDirectivesEntity::getMessageId,msg.getMessageId())
                         .set(DeviceDirectivesEntity::getUpstream,msg)
                         .set(DeviceDirectivesEntity::getState,DirectiveState.success)