From b8aebfe8bcb9ce03a45f151078f565a00a02036f Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 16 七月 2024 11:14:15 +0800
Subject: [PATCH] 添加服务类

---
 src/main/java/com/se/simu/controller/WaterController.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/se/simu/controller/WaterController.java b/src/main/java/com/se/simu/controller/WaterController.java
index 03e3a8f..50b6b1f 100644
--- a/src/main/java/com/se/simu/controller/WaterController.java
+++ b/src/main/java/com/se/simu/controller/WaterController.java
@@ -1,10 +1,15 @@
 package com.se.simu.controller;
 
+import com.se.simu.service.WaterService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
 
 /**
  * 鍐呮稘鎺у埗鍣�
@@ -13,13 +18,40 @@
  * @date   2024-07-16
  */
 @Api(tags = "鍐呮稘绠$悊")
+@Slf4j
 @RestController
 @RequestMapping("/waterlogging")
 public class WaterController {
+    @Resource
+    WaterService waterService;
+
     @ApiOperation(value = "鑾峰彇褰撳墠鏃堕棿")
     @GetMapping("/getTime")
     public Object getTime() {
         return System.currentTimeMillis();
     }
 
+    @ApiOperation(value = "鑾峰彇鍏冩暟鎹俊鎭�")
+    @GetMapping("/{serviceName}/layer.json")
+    public Object getLayer(@PathVariable String serviceName) {
+        return serviceName;
+    }
+
+    @ApiOperation(value = "鑾峰彇鍦板舰楂樺害鍥�")
+    @GetMapping("/{serviceName}/terrain?width={width}&height={height}")
+    public Object getTerraMap(@PathVariable String serviceName, @PathVariable Integer width, @PathVariable Integer height) {
+        return serviceName + "," + width + "," + height;
+    }
+
+    @ApiOperation(value = "鑾峰彇姘撮潰楂樺害鍥�")
+    @GetMapping("/{serviceName}/waterMap?width={width}&height={height}&time={timestamp}")
+    public Object getWaterMap(@PathVariable String serviceName, @PathVariable Integer width, @PathVariable Integer height, @PathVariable Long timestamp) {
+        return serviceName + "," + width + "," + height + "," + timestamp;
+    }
+
+    @ApiOperation(value = "鑾峰彇姘存祦鍚戞祦閫熷浘")
+    @GetMapping("/{serviceName}/flowMap?width={width}&height={height}&time={timestamp}")
+    public Object getFlowMap(@PathVariable String serviceName, @PathVariable Integer width, @PathVariable Integer height, @PathVariable Long timestamp) {
+        return serviceName + "," + width + "," + height + "," + timestamp;
+    }
 }

--
Gitblit v1.9.3