From aa1bdb548aa6a6371a8953efacc3986300eee576 Mon Sep 17 00:00:00 2001
From: swb <jpy123456>
Date: Fri, 15 Nov 2024 08:50:23 +0800
Subject: [PATCH] fix:补充提交
---
screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java b/screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java
index 615fe10..34499af 100644
--- a/screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/HistoryFiveMinutelyController.java
@@ -1,10 +1,12 @@
package com.moral.api.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.moral.api.pojo.dto.historyAqi.HistoryAqiDto;
import com.moral.api.pojo.dto.historyFiveMinutely.DeviceAndFiveMinuteDataDTO;
import com.moral.api.pojo.form.historyFiveMinutely.QueryDeviceAndFiveMinuteDataForm;
import com.moral.api.pojo.vo.historyFiveMinutely.DeviceAndFiveMinuteDataVO;
import com.moral.api.pojo.vo.historyFiveMinutely.QueryFiveDataByMacVO;
+import com.moral.api.service.HistoryAqiService;
import com.moral.api.service.HistoryFiveMinutelyService;
import com.moral.constant.ResponseCodeEnum;
import com.moral.constant.ResultMessage;
@@ -45,6 +47,8 @@
@Autowired
HistoryFiveMinutelyService historyFiveMinutelyService;
+ @Autowired
+ private HistoryAqiService historyAqiService;
/**
* @Description: ���������������������������������������������������������������������
@@ -94,8 +98,22 @@
@RequestParam @ApiParam(value = "chooseTime",name = "������������������") String chooseTime,
@RequestParam @ApiParam(value = "time",name = "������") String time){
QueryFiveDataByMacVO queryFiveDataByMacVO = historyFiveMinutelyService.queryFiveDataByMac(mac, chooseTime, time);
- return ResultMessage.ok(ObjectUtils.isEmpty(queryFiveDataByMacVO)?"0":queryFiveDataByMacVO);
+ if (ObjectUtils.isEmpty(queryFiveDataByMacVO)){
+ return ResultMessage.fail(ResponseCodeEnum.TARGET_IS_NULL.getCode(), ResponseCodeEnum.TARGET_IS_NULL.getMsg());
+ }
+ return ResultMessage.ok(queryFiveDataByMacVO);
}
+
+
+ @GetMapping("historyAqi")
+ @ApiOperation("���������������������")
+ public ResultMessage historyAqiQuery(String guid){
+ List<HistoryAqiDto> reveal = historyAqiService.reveal(guid);
+ return ResultMessage.ok(reveal);
+ }
+
+
}
+
--
Gitblit v1.8.0