From 084fcff73e6858862544c3901361adfe5742016c Mon Sep 17 00:00:00 2001
From: cjl <909710561@qq.com>
Date: Wed, 09 Sep 2026 15:32:15 +0800
Subject: [PATCH] fix:雷达调整

---
 screen-job/src/main/java/com/moral/api/controller/RadarProcessController.java |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/screen-job/src/main/java/com/moral/api/controller/RadarProcessController.java b/screen-job/src/main/java/com/moral/api/controller/RadarProcessController.java
index bb8e51f..b3266fb 100644
--- a/screen-job/src/main/java/com/moral/api/controller/RadarProcessController.java
+++ b/screen-job/src/main/java/com/moral/api/controller/RadarProcessController.java
@@ -1,8 +1,12 @@
 package com.moral.api.controller;
 
 import com.moral.api.service.RadarHourlySummaryService;
+import com.moral.api.vo.ComparisonResponse;
+import com.moral.api.vo.HourlyResponse;
 import com.moral.constant.ResultMessage;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -46,8 +50,8 @@
      */
     @GetMapping("/process")
     public ResultMessage processHour() {
-        String startStr = "2026-05-31 23:00:00";
-        String endStr = "2026-09-08 14:00:00";
+        String startStr = "2026-09-08 14:00:00";
+        String endStr = "2026-09-09 13:00:00";
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         LocalDateTime startTime = LocalDateTime.parse(startStr, formatter);
         LocalDateTime endTime = LocalDateTime.parse(endStr, formatter);
@@ -68,4 +72,46 @@
         hourlySummaryService.processHour(startStr);
         return new ResultMessage();
     }
+
+    /**
+     * ���������������������������
+     * GET /radar/comparison?location=������&amp;time=2026-09-09 09:00:00
+     *
+     * @param location ������������
+     * @param time     ������������������������������������ current
+     */
+    @GetMapping("/comparison")
+    @ApiOperation("���������������������������")
+    public ResultMessage getComparison(@RequestParam @ApiParam(value = "location",name = "������") String location,
+                                            @RequestParam @ApiParam(value = "time",name = "������ yyyy-MM-dd HH:mm:ss") String time) {
+        if(!location.equals("������")){
+            return ResultMessage.ok("���������������������������");
+        }
+        ComparisonResponse comparisonResponse = hourlySummaryService.getComparison(location, time);
+
+        return ResultMessage.ok(comparisonResponse);
+    }
+
+    /**
+     * ���������������������������������������������������
+     * GET /radar/hourly?location=������&amp;startTime=2026-09-04 09:00:00&amp;endTime=2026-09-09 09:00:00
+     *
+     * @param location  ������������
+     * @param startTime ������������������������
+     * @param endTime   ���������������������������
+     */
+    @GetMapping("/hourly")
+    @ApiOperation("���������5���������������������������")
+    public ResultMessage getHourly5Days(@RequestParam  @ApiParam(value = "location",name = "������")  String location,
+                                         @RequestParam  @ApiParam(value = "startTime",name = "������������")  String startTime,
+                                         @RequestParam  @ApiParam(value = "endTime",name = "������������")  String endTime) {
+        if(!location.equals("������")){
+            return ResultMessage.ok("���������������������������");
+        }
+
+        HourlyResponse getHourly5Days =  hourlySummaryService.getHourly5Days(location, startTime, endTime);
+
+        return ResultMessage.ok(getHourly5Days);
+    }
+
 }

--
Gitblit v1.8.0