管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-10 014639637a80b0549cc0aee00b9a9670fb57827c
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);
        }
    }
}