优化
This commit is contained in:
parent
8da950c803
commit
e5f6e16d8c
@ -13,7 +13,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|||||||
public class CommandUtil {
|
public class CommandUtil {
|
||||||
private static final ObjectMapper mapper = new ObjectMapper();
|
private static final ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
private static final String prefix = "ecu/rsp/cdzybms/";
|
private static final String prefix = "ecu/cmd/cdzybms/";
|
||||||
|
|
||||||
|
|
||||||
public static String guang_he_tong(String ecuSn, String taskId, String code) throws JsonProcessingException {
|
public static String guang_he_tong(String ecuSn, String taskId, String code) throws JsonProcessingException {
|
||||||
@ -23,7 +23,7 @@ public class CommandUtil {
|
|||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case CommandType.FIND_BIKE:
|
case CommandType.FIND_BIKE:
|
||||||
String json = "{\"c\":14,\"tid\":\"e8957e7dde5a487895b22286d5046ffc\",\"param\":{\"volume\":50,\"idx\":5}}";
|
String json = "{\"c\":14,\"tid\":\""+ taskId+"\",\"param\":{\"volume\":50,\"idx\":5}}";
|
||||||
ObjectNode objectNode = mapper.readValue(json,ObjectNode.class);
|
ObjectNode objectNode = mapper.readValue(json,ObjectNode.class);
|
||||||
objectNode.put("tid",taskId);
|
objectNode.put("tid",taskId);
|
||||||
jsonNode.put("command",objectNode.toString());
|
jsonNode.put("command",objectNode.toString());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user