main
周文涛 2 years ago
parent 60e8fcdc90
commit 93c9e064d5

@ -47,9 +47,9 @@ public class GatewayController {
JSONObject requestBody = JSONObject.parseObject(format);
JSONObject responseBody = IotUtils.postApi(IotApiEnum.getPathByText("向设备发送方法"), requestBody);
JSONObject data = requestBody.getJSONObject("data");
if (!data.isEmpty()) {
if (data!=null) {
JSONObject outputData = data.getJSONObject("outputData");
if (!outputData.isEmpty()) {
if (outputData!=null) {
List<JSONObject> list = outputData.getJSONArray("list").toJavaList(JSONObject.class);
List<JSONObject> subList = list.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
outputData.put("list",subList);

Loading…
Cancel
Save