IPath.java
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.dituhui.pea.dispatch;
import com.dituhui.pea.common.Result;
import com.dituhui.pea.pojo.DistanceDTO;
import com.dituhui.pea.pojo.DistanceParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 道路相关接口
*
* @author
*/
@FeignClient(value = "project-dispatch", contextId = "dispatch")
public interface IPath {
/**
* 获取2个订单之间的道路距离
*
* @param fromOrderId 出发订单id
* @param toOrderId 到达订单id
* @param vehicleType 交通工具:1汽车;2电动车;3自行车;4步行 默认是汽车
* @return
*/
@RequestMapping(value = "/pea-dispatch/getRoadDistance", method = RequestMethod.POST)
public Result<DistanceDTO> getRoadDistance(@RequestParam("fromOrderId") String fromOrderId,
@RequestParam("toOrderId") String toOrderId,
@RequestParam(name = "vehicleType", required = false) Integer vehicleType);
/**
* 根据交通方式计算两点间距离
*
* @param distanceParam 参数, 包含起始点, 交通方式
* @return 返回两点距离以及所需时间
*/
@PostMapping("/pea-dispatch/locationDistance")
DistanceDTO getLocationDistance(@RequestBody DistanceParam distanceParam);
}