diff --git a/src/main/java/com/dispose/pojo/po/NewNodeInfo.java b/src/main/java/com/dispose/pojo/po/NewNodeInfo.java index dac99fd9..c0ad4cee 100644 --- a/src/main/java/com/dispose/pojo/po/NewNodeInfo.java +++ b/src/main/java/com/dispose/pojo/po/NewNodeInfo.java @@ -18,9 +18,9 @@ import lombok.NoArgsConstructor; @JsonInclude(JsonInclude.Include.NON_NULL) public class NewNodeInfo { private String id; - private int type; + private Integer type; private String ipAddr; - private int areaCode; + private Integer areaCode; private String name; private String manufacturer; private String model; diff --git a/src/test/java/com/dispose/test/controller/DeviceNodeManagerControllerQATest.java b/src/test/java/com/dispose/test/controller/DeviceNodeManagerControllerQATest.java index ab0f9f88..9c148e4a 100644 --- a/src/test/java/com/dispose/test/controller/DeviceNodeManagerControllerQATest.java +++ b/src/test/java/com/dispose/test/controller/DeviceNodeManagerControllerQATest.java @@ -182,9 +182,8 @@ public class DeviceNodeManagerControllerQATest extends InitTestEnvironment { public void a6_addDeviceNodeTypeNullExceptionTest() throws Exception { String reqData = "{\"ver\":2,\"cryptoType\":0,\"timeStamp\":1587628826908," + "\"msgContent\":\"{\\\"items\\\":[{\\\"areaCode\\\":0,\\\"ipAddr\\\":\\\"10.88.77.15\\\"," + - "\\\"manufacturer\\\":\\\"DPTech\\\",\\\"model\\\":\\\"UMC\\\"," + - "\\\"name\\\":\\\"中移杭研实验室清洗设备\\\",\\\"readme\\\":\\\"实验室测试设备\\\"," + - "\\\"type\\\":\\\"null\\\",\\\"version\\\":\\\"5.7.13\\\"}]}\"}"; + "\\\"manufacturer\\\":\\\"DPTech\\\",\\\"model\\\":\\\"UMC\\\",\\\"name\\\":\\\"中移杭研实验室清洗设备\\\"," + + "\\\"readme\\\":\\\"实验室测试设备\\\",\\\"type\\\":null,\\\"version\\\":\\\"5.7.13\\\"}]}\"}"; String ret = mockMvc.perform(MockMvcRequestBuilders .put("/manager/device") @@ -207,11 +206,7 @@ public class DeviceNodeManagerControllerQATest extends InitTestEnvironment { Assert.assertNotNull(v.getMessage()); Assert.assertNotNull(v.getStatus()); - if (v.getStatus() == 0) { - Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode())); - } else if (v.getStatus() == 20) { - Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_DEVICEEXISTS.getCode())); - } + Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode())); } }