From e4ebf74baef4faab3fa794c042e2921437525e6e Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Thu, 12 Aug 2021 10:40:52 +0800
Subject: [PATCH] update
---
screen-api/src/main/java/com/moral/api/controller/WebController.java | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/WebController.java b/screen-api/src/main/java/com/moral/api/controller/WebController.java
index 0345043..7562116 100644
--- a/screen-api/src/main/java/com/moral/api/controller/WebController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/WebController.java
@@ -7,11 +7,11 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -100,7 +100,7 @@
@ApiOperation(value = "������������������", notes = "������������������")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
- @ApiImplicitParam(name = "monitorPointId", value = "������id", required = true, paramType = "query", dataType = "String")
+ @ApiImplicitParam(name = "monitorPointIds", value = "������id", required = true, paramType = "query", dataType = "String")
})
public ResultMessage getWindData(HttpServletRequest request) {
Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
@@ -114,17 +114,16 @@
}
/**
- * @param request ������������
+ * @param params ������������
* @return ������������������������������������
*/
- @GetMapping("getMacSensors")
+ @PostMapping("getMacSensors")
@ApiOperation(value = "������������mac������������������", notes = "������������mac������������������")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
- @ApiImplicitParam(name = "macs", value = "������mac���������������������", required = true, paramType = "query", dataType = "String")
+ @ApiImplicitParam(name = "macs", value = "������mac���������������������", required = true, paramType = "query", dataType = "List")
})
- public ResultMessage getMacSensors(HttpServletRequest request) {
- Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
+ public ResultMessage getMacSensors(@RequestBody Map<String,Object> params) {
if (!params.containsKey("macs")) {
return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
}
@@ -133,20 +132,19 @@
}
/**
- * @param request ������������
+ * @param params ������������
* @return ������������������������������������
*/
- @GetMapping("getTrendChartData")
+ @PostMapping("getTrendChartData")
@ApiOperation(value = "���������������������������������", notes = "���������������������������������.")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"),
- @ApiImplicitParam(name = "macs", value = "������mac���������������������", required = true, paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "sensorCode", value = "������code", required = true, paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "type", value = "���������������������day���,������month���,������year���", required = true, paramType = "query", dataType = "String"),
- @ApiImplicitParam(name = "times", value = "���������������������2021-07-29������������2021-07������������2021������������������������", required = true, paramType = "query", dataType = "String")
+ @ApiImplicitParam(name = "macs", value = "������mac���������������������", required = true, paramType = "body", dataType = "list"),
+ @ApiImplicitParam(name = "sensorCode", value = "������code", required = true, paramType = "body", dataType = "String"),
+ @ApiImplicitParam(name = "type", value = "���������������������day���,������month���,������year���", required = true, paramType = "body", dataType = "String"),
+ @ApiImplicitParam(name = "times", value = "���������������������2021-07-29������������2021-07������������2021������������������������", required = true, paramType = "body", dataType = "List")
})
- public ResultMessage getTrendChartData(HttpServletRequest request) {
- Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
+ public ResultMessage getTrendChartData(@RequestBody Map<String,Object> params) {
if (!params.containsKey("macs") || !params.containsKey("sensorCode") || !params.containsKey("type") || !params.containsKey("times")) {
return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
}
--
Gitblit v1.8.0