From a06e2ee872f15d747069645243341bd81c36e236 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 17 七月 2024 09:42:45 +0800 Subject: [PATCH] 1 --- src/main/java/com/se/simu/controller/WaterController.java | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/se/simu/controller/WaterController.java b/src/main/java/com/se/simu/controller/WaterController.java index 32a55a3..c40b73b 100644 --- a/src/main/java/com/se/simu/controller/WaterController.java +++ b/src/main/java/com/se/simu/controller/WaterController.java @@ -1,11 +1,8 @@ package com.se.simu.controller; import com.se.simu.domain.LayerVo; -import com.se.simu.helper.StringHelper; import com.se.simu.helper.WebHelper; import com.se.simu.service.WaterService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; @@ -23,7 +20,6 @@ * @author WWW * @date 2024-07-16 */ -@Api(tags = "鍐呮稘绠$悊") @Slf4j @RestController @RequestMapping("/waterlogging") @@ -37,13 +33,11 @@ private final static long Y2000 = 949334400000L; - @ApiOperation(value = "鑾峰彇褰撳墠鏃堕棿") @GetMapping("/getTime") public Object getTime() { return System.currentTimeMillis(); } - @ApiOperation(value = "鑾峰彇鍏冩暟鎹俊鎭�") @GetMapping("/{serviceName}/layer.json") public void getLayer(@PathVariable String serviceName, HttpServletResponse res) { try { @@ -60,7 +54,6 @@ } } - @ApiOperation(value = "鑾峰彇鍦板舰楂樺害鍥�") @GetMapping("/{serviceName}/terrain") public void getTerraMap(@PathVariable String serviceName, Integer width, Integer height, HttpServletResponse res) { try { @@ -76,7 +69,6 @@ } } - @ApiOperation(value = "鑾峰彇姘撮潰楂樺害鍥�") @GetMapping("/{serviceName}/waterMap") public void getWaterMap(@PathVariable String serviceName, Integer width, Integer height, Long timestamp, HttpServletResponse res) { try { @@ -92,7 +84,6 @@ } } - @ApiOperation(value = "鑾峰彇姘存祦鍚戞祦閫熷浘") @GetMapping("/{serviceName}/flowMap") public void getFlowMap(@PathVariable String serviceName, Integer width, Integer height, Long timestamp, HttpServletResponse res) { try { @@ -109,7 +100,7 @@ } private boolean validate(String serviceName, HttpServletResponse res) { - if (StringHelper.isEmpty(serviceName)) { + if (WebHelper.isEmpty(serviceName)) { return WebHelper.writeJson2Page(res, HttpStatus.BAD_REQUEST, "鏈嶅姟鍚嶄笉鑳戒负绌�"); } @@ -124,7 +115,7 @@ * 楠岃瘉 */ private boolean validate(String serviceName, Integer width, Integer height, Long timestamp, HttpServletResponse res) { - if (StringHelper.isEmpty(serviceName)) { + if (WebHelper.isEmpty(serviceName)) { return WebHelper.writeJson2Page(res, HttpStatus.BAD_REQUEST, "鏈嶅姟鍚嶄笉鑳戒负绌�"); } if (null == width || width < MIN_SIZE || width > MAX_SIZE) { @@ -144,7 +135,7 @@ * 鍐欐枃浠� */ private boolean writeFile(String path, HttpServletResponse res) throws Exception { - if (StringHelper.isEmpty(path)) { + if (WebHelper.isEmpty(path)) { return WebHelper.writeJson2Page(res, HttpStatus.INTERNAL_SERVER_ERROR, "鐢熸垚PNG澶辫触"); } File file = new File(path); -- Gitblit v1.9.3