Showing
2 changed files
with
7 additions
and
2 deletions
... | ... | @@ -17,6 +17,7 @@ package org.thingsboard.server.common.data.id; |
17 | 17 | |
18 | 18 | import org.thingsboard.server.common.data.EntityType; |
19 | 19 | import org.thingsboard.server.common.data.edge.EdgeEventType; |
20 | +import org.thingsboard.server.common.data.yunteng.id.SceneId; | |
20 | 21 | |
21 | 22 | import java.util.UUID; |
22 | 23 | |
... | ... | @@ -77,7 +78,9 @@ public class EntityIdFactory { |
77 | 78 | return new EdgeId(uuid); |
78 | 79 | case RPC: |
79 | 80 | return new RpcId(uuid); |
80 | - } | |
81 | + case SCENE_ACT: | |
82 | + return new SceneId(uuid); | |
83 | + } | |
81 | 84 | throw new IllegalArgumentException("EntityType " + type + " is not supported!"); |
82 | 85 | } |
83 | 86 | ... | ... |
... | ... | @@ -242,7 +242,9 @@ public class TkSceneLinkageServiceImpl extends AbstractBaseService<SceneLinkageM |
242 | 242 | JsonNode inputContext = doActionDTO.getDoContext().get(FastIotConstants.Rpc.PARAMS_NAME); |
243 | 243 | ObjectNode outputContext = JacksonUtil.newObjectNode(); |
244 | 244 | outputContext.put(FastIotConstants.Rpc.METHOD_NAME, "methodThingskit"); |
245 | - if(inputContext.isTextual()){ | |
245 | + if(inputContext == null){ | |
246 | + outputContext.put(FastIotConstants.Rpc.PARAMS_NAME,""); | |
247 | + }else if(inputContext.isTextual()){ | |
246 | 248 | outputContext.put(FastIotConstants.Rpc.PARAMS_NAME,inputContext.asText()); |
247 | 249 | }else{ |
248 | 250 | outputContext.set(FastIotConstants.Rpc.PARAMS_NAME, inputContext); | ... | ... |