diff --git a/src/main/java/com/example/zxweb/controller/IotController.java b/src/main/java/com/example/zxweb/controller/IotController.java index 3486997..c8bf048 100644 --- a/src/main/java/com/example/zxweb/controller/IotController.java +++ b/src/main/java/com/example/zxweb/controller/IotController.java @@ -135,11 +135,11 @@ public class IotController { @RequestParam(value = "startTime",defaultValue = "")String startTime,@RequestParam(value = "endTime",defaultValue = "")String endTime, @RequestParam(value = "sort",defaultValue = "")String sort){ AssertUtils.notEmpty(serial,"请输入设备序列号-[serial]"); - AssertUtils.notEmpty(methodName,"请输入方法名称-[methodName]"); + //AssertUtils.notEmpty(methodName,"请输入方法名称-[methodName]"); JSONObject requestBody=new JSONObject(); requestBody.put("serial",serial); requestBody.put("productId",productId); - requestBody.put("dataStreamName",methodName); + requestBody.put("methodName",methodName); requestBody.put("pageNo",pageNo); requestBody.put("pageSize",pageSize); requestBody.put("startTime",startTime); diff --git a/src/main/java/com/example/zxweb/utils/IotUtils.java b/src/main/java/com/example/zxweb/utils/IotUtils.java index 737c807..ec96330 100644 --- a/src/main/java/com/example/zxweb/utils/IotUtils.java +++ b/src/main/java/com/example/zxweb/utils/IotUtils.java @@ -29,8 +29,7 @@ public class IotUtils { sb.append(field).append("=").append(value); i++; } - JSONObject responseBody = RestUtil.get(API_PREFIX+apiUrl+sb,null,null,headers); - return responseBody; + return RestUtil.get(API_PREFIX+apiUrl+sb,null,null,headers); } public static JSONObject postApi(String apiUrl,JSONObject requestBody){