From 9bce48a9f30f7d80c43f43f46d40df20fcb00e15 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 03 二月 2023 09:39:59 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/show/ComprehensiveController.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/controller/show/ComprehensiveController.java b/src/main/java/com/lf/server/controller/show/ComprehensiveController.java new file mode 100644 index 0000000..8843aa0 --- /dev/null +++ b/src/main/java/com/lf/server/controller/show/ComprehensiveController.java @@ -0,0 +1,45 @@ +package com.lf.server.controller.show; + +import com.lf.server.annotation.SysLog; +import com.lf.server.controller.all.BaseController; +import com.lf.server.entity.all.ResponseMsg; +import com.lf.server.service.all.BaseQueryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +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; + +/** + * 缁煎悎灞曠ず + * @author WWW + */ +@Api(tags = "缁煎悎灞曠ず\\缁煎悎灞曠ず") +@RestController +@RequestMapping("/comprehensive") +public class ComprehensiveController extends BaseController { + @Autowired + BaseQueryService baseQueryService; + + @SysLog() + @ApiOperation(value = "鏌ヨ璺綉") + @ApiImplicitParams({ + @ApiImplicitParam(name = "x1", value = "X1", dataType = "Double", paramType = "query", example = "116.78999"), + @ApiImplicitParam(name = "y1", value = "Y1", dataType = "Double", paramType = "query", example = "39.9468"), + @ApiImplicitParam(name = "x2", value = "X2", dataType = "Double", paramType = "query", example = "116.80458"), + @ApiImplicitParam(name = "y2", value = "Y2", dataType = "Double", paramType = "query", example = "39.94758") + }) + @GetMapping(value = "/selectRoute") + public ResponseMsg<Object> selectRoute(double x1, double y1, double x2, double y2) { + try { + String route = baseQueryService.selectRoute(x1, y1, x2, y2); + + return success(route); + } catch (Exception ex) { + return fail(ex.getMessage(), null); + } + } +} -- Gitblit v1.9.3