| | |
| | | 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; |
| | | |
| | | /** |
| | | * å
æ¶æ§å¶å¨ |
| | |
| | | * @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; |
| | | } |
| | | } |