From 4f97850c9cc2098f460124a66266bdf6157319dd Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 26 六月 2025 15:46:29 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java
new file mode 100644
index 0000000..5ed8380
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java
@@ -0,0 +1,102 @@
+package com.dy.pipIrrRemote.mqttSd1.weather;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.voRm.VoWeather;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/26 09:33
+ * @Description
+ */
+@Slf4j
+@Tag(name = "姘旇薄鏁版嵁鏌ヨ", description = "姘旇薄鏁版嵁鏌ヨ")
+@RestController("rmWeatherCtrl")
+@RequestMapping(path = "weather")
+@RequiredArgsConstructor
+public class WeatherCtrl {
+
+    private WeatherSv sv;
+
+    @Autowired
+    public void setSv(WeatherSv sv){
+        this.sv = sv ;
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鏈�鏂拌褰�
+     * @param weatherId
+     * @return
+     */
+    @GetMapping(path = "oneLast")
+    @SsoAop()
+    public BaseResponse<VoWeather> oneLast(Long weatherId){
+        try {
+            if(weatherId == null){
+                return BaseResponseUtils.buildFail("姘旇薄绔檌d涓嶈兘涓虹┖") ;
+            }
+            return BaseResponseUtils.buildSuccess(sv.oneLast(weatherId));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鍘嗗彶璁板綍
+     * @param weatherId
+     * @return
+     */
+    @GetMapping(path = "oneHistory")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoWeather>>> oneHistory(Long weatherId){
+        try {
+            if(weatherId == null){
+                return BaseResponseUtils.buildFail("姘旇薄绔檌d涓嶈兘涓虹┖") ;
+            }
+           return BaseResponseUtils.buildSuccess(sv.oneHistory(weatherId));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鏈�鏂拌褰�
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "someLast")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoWeather>>> someLast(WeatherQo qo){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.someLast(qo));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鍘嗗彶璁板綍
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "someHistory")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoWeather>>> someHistory(WeatherQo qo){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.someHistory(qo));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+}

--
Gitblit v1.8.0