|
|
@ -1,10 +1,10 @@
|
|
|
|
package com.example.zxweb.controller;
|
|
|
|
package com.example.zxweb.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.example.zxweb.common.api.vo.Result;
|
|
|
|
import com.example.zxweb.common.api.vo.Result;
|
|
|
|
import com.example.zxweb.common.constant.enums.IotApiPathsEnum;
|
|
|
|
import com.example.zxweb.common.constant.enums.IotApiEnum;
|
|
|
|
import com.example.zxweb.utils.AssertUtils;
|
|
|
|
import com.example.zxweb.utils.AssertUtils;
|
|
|
|
import com.example.zxweb.utils.IotUtils;
|
|
|
|
import com.example.zxweb.utils.IotUtils;
|
|
|
|
import com.example.zxweb.utils.RestUtil;
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@ -31,10 +31,10 @@ public class IotController {
|
|
|
|
@GetMapping(value = "/devices")
|
|
|
|
@GetMapping(value = "/devices")
|
|
|
|
public Result<?> devices(@RequestParam(value = "serial",defaultValue = "")String serial,@RequestParam(value = "productId",defaultValue = "")String productId){
|
|
|
|
public Result<?> devices(@RequestParam(value = "serial",defaultValue = "")String serial,@RequestParam(value = "productId",defaultValue = "")String productId){
|
|
|
|
AssertUtils.notEmpty(serial,"请输入-[serial]");AssertUtils.notEmpty(productId,"请输入-[productId]");
|
|
|
|
AssertUtils.notEmpty(serial,"请输入-[serial]");AssertUtils.notEmpty(productId,"请输入-[productId]");
|
|
|
|
Map<String,Object> queryData=new LinkedHashMap<>();
|
|
|
|
JSONObject requestBody=new JSONObject();
|
|
|
|
queryData.put("serial",serial);
|
|
|
|
requestBody.put("serial",serial);
|
|
|
|
queryData.put("productId",productId);
|
|
|
|
requestBody.put("productId",productId);
|
|
|
|
//请求数据
|
|
|
|
//请求数据
|
|
|
|
return Result.OK(IotUtils.getApi(IotApiPathsEnum.getPathByText("获取单个设备信息"),queryData));
|
|
|
|
return Result.OK(IotUtils.getApi(IotApiEnum.getPathByText("获取单个设备信息"),requestBody));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|