From 8f5416a1e507fe24c151648982e391fead13ffdd Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 02 Nov 2021 15:57:22 +0800
Subject: [PATCH] 省内倒数排名增加time字段
---
screen-api/src/main/java/com/moral/api/controller/AqiController.java | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/AqiController.java b/screen-api/src/main/java/com/moral/api/controller/AqiController.java
index 6024e57..640f34f 100644
--- a/screen-api/src/main/java/com/moral/api/controller/AqiController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/AqiController.java
@@ -5,6 +5,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -34,7 +35,7 @@
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "regionCode", value = "������", required = true, paramType = "query", dataType = "String")
})
- public ResultMessage MeasuredCompareForecast(HttpServletRequest request) {
+ public ResultMessage measuredCompareForecast(HttpServletRequest request) {
Map<String, Object> params = WebUtils.getParametersStartingWith(request, null);
if (!params.containsKey("regionCode") || !params.containsKey("time")) {
return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
@@ -65,7 +66,33 @@
*/
@GetMapping("query24HoursAQI")
public ResultMessage query24HoursAQIByRegionCode(Integer regionCode){
- Map<String, Object> stringObjectMap = cityAqiService.query24HoursAqiByRegionCode(regionCode);
- return ResultMessage.ok(stringObjectMap);
+ Map<String, Object> datas = cityAqiService.query24HoursAqiByRegionCode(regionCode);
+ return ResultMessage.ok(datas);
+ }
+
+ /**
+ * @Description: ���������������������aqi���������������������
+ * @Param: [RegionCode]
+ * @return: com.moral.constant.ResultMessage
+ * @Author: ���������
+ * @Date: 2021/11/2
+ */
+ @GetMapping("queryTodayAqiAndPollutant")
+ public ResultMessage queryTodayAqiAndPollutant(Integer regionCode){
+ Map<String, Object> datas = cityAqiService.queryTodayAqiAndPollutant(regionCode);
+ return ResultMessage.ok(datas);
+ }
+
+ @GetMapping("provincialRanking")
+ @ApiOperation(value = "������������", notes = "������������")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "organizationId", value = "������id", required = true, paramType = "query", dataType = "Integer")
+ })
+ public ResultMessage provincialRanking(Integer organizationId) {
+ if (ObjectUtils.isEmpty(organizationId)) {
+ return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
+ }
+ Map<String, Object> response = cityAqiService.provincialRanking(organizationId);
+ return ResultMessage.ok(response);
}
}
--
Gitblit v1.8.0