diff --git a/online-taxi-public/.idea/compiler.xml b/online-taxi-public/.idea/compiler.xml
index fa03c76..3ebb946 100644
--- a/online-taxi-public/.idea/compiler.xml
+++ b/online-taxi-public/.idea/compiler.xml
@@ -8,6 +8,7 @@
+
@@ -19,6 +20,7 @@
diff --git a/online-taxi-public/.idea/encodings.xml b/online-taxi-public/.idea/encodings.xml
index e362245..6503bda 100644
--- a/online-taxi-public/.idea/encodings.xml
+++ b/online-taxi-public/.idea/encodings.xml
@@ -4,6 +4,7 @@
+
diff --git a/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/controller/ForecastPriceController.java b/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/controller/ForecastPriceController.java
new file mode 100644
index 0000000..705c52b
--- /dev/null
+++ b/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/controller/ForecastPriceController.java
@@ -0,0 +1,34 @@
+package com.taxi.apipassenger.controller;
+
+import com.internal.dto.ResponseResult;
+import com.internal.request.ForecastPriceDTO;
+import com.taxi.apipassenger.service.ForecastPriceServcie;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Slf4j
+public class ForecastPriceController {
+
+ @Autowired
+ private ForecastPriceServcie forecastPriceServcie;
+
+ @PostMapping("/forecast-price")
+ public ResponseResult forecastPrice(@RequestBody ForecastPriceDTO forecastPriceDTO) {
+ log.info("出发经度," + forecastPriceDTO.getDepLongitude());
+ log.info("出发纬度," + forecastPriceDTO.getDepLatitude());
+
+ String depLongitude = forecastPriceDTO.getDepLongitude();
+ String depLatitude = forecastPriceDTO.getDestLatitude();
+
+ String destLongitude = forecastPriceDTO.getDestLongitude();
+ String destLatitude = forecastPriceDTO.getDestLatitude();
+
+ log.info("目的地经度," + forecastPriceDTO.getDestLongitude());
+ log.info("目的地纬度," + forecastPriceDTO.getDestLatitude());
+ return forecastPriceServcie.forecastPrice(depLongitude,depLatitude,destLongitude,destLatitude);
+ }
+}
diff --git a/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/service/ForecastPriceServcie.java b/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/service/ForecastPriceServcie.java
new file mode 100644
index 0000000..94dbab2
--- /dev/null
+++ b/online-taxi-public/api-passenger/src/main/java/com/taxi/apipassenger/service/ForecastPriceServcie.java
@@ -0,0 +1,35 @@
+package com.taxi.apipassenger.service;
+
+import com.internal.dto.ResponseResult;
+import com.internal.response.ForecastPriceResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+@Service
+@Slf4j
+public class ForecastPriceServcie {
+
+ /**
+ * 根据 出发地和目的的经纬度,计算预估价格
+ * @param depLongitude
+ * @param depLatitude
+ * @param destLongitude
+ * @param destLatitude
+ * @return
+ */
+ public ResponseResult forecastPrice(String depLongitude,String depLatitude,
+ String destLongitude,String destLatitude){
+ log.info("出发经度," + depLongitude);
+ log.info("出发纬度," + depLatitude);
+ log.info("目的地经度," + destLongitude);
+ log.info("目的地纬度," + destLatitude);
+
+ log.info("调用计价服务,计算价格");
+
+ ForecastPriceResponse forecastPriceResponse = new ForecastPriceResponse();
+ forecastPriceResponse.setPrice(12.121);
+ return ResponseResult.success(forecastPriceResponse);
+ }
+
+
+}
diff --git a/online-taxi-public/internal-common/src/main/java/com/internal/request/ForecastPriceDTO.java b/online-taxi-public/internal-common/src/main/java/com/internal/request/ForecastPriceDTO.java
new file mode 100644
index 0000000..4b54286
--- /dev/null
+++ b/online-taxi-public/internal-common/src/main/java/com/internal/request/ForecastPriceDTO.java
@@ -0,0 +1,13 @@
+package com.internal.request;
+
+import lombok.Data;
+
+@Data
+public class ForecastPriceDTO {
+
+ private String depLongitude;
+ private String depLatitude;
+
+ private String destLongitude;
+ private String destLatitude;
+}
diff --git a/online-taxi-public/internal-common/src/main/java/com/internal/response/ForecastPriceResponse.java b/online-taxi-public/internal-common/src/main/java/com/internal/response/ForecastPriceResponse.java
new file mode 100644
index 0000000..80a765e
--- /dev/null
+++ b/online-taxi-public/internal-common/src/main/java/com/internal/response/ForecastPriceResponse.java
@@ -0,0 +1,9 @@
+package com.internal.response;
+
+import lombok.Data;
+
+@Data
+public class ForecastPriceResponse {
+
+ private double price;
+}
diff --git a/online-taxi-public/pom.xml b/online-taxi-public/pom.xml
index 7cae273..28c7530 100644
--- a/online-taxi-public/pom.xml
+++ b/online-taxi-public/pom.xml
@@ -19,6 +19,7 @@
service-verificationcode
internal-common
service-passenger-user
+ servcie-price
diff --git a/online-taxi-public/servcie-price/pom.xml b/online-taxi-public/servcie-price/pom.xml
new file mode 100644
index 0000000..a3a5bf4
--- /dev/null
+++ b/online-taxi-public/servcie-price/pom.xml
@@ -0,0 +1,19 @@
+
+
+ 4.0.0
+
+ com.taxi
+ online-taxi-public
+ 1.0-SNAPSHOT
+
+
+ servcie-price
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
\ No newline at end of file
diff --git a/online-taxi-public/servcie-price/src/main/java/com/taxi/Main.java b/online-taxi-public/servcie-price/src/main/java/com/taxi/Main.java
new file mode 100644
index 0000000..f3a4f31
--- /dev/null
+++ b/online-taxi-public/servcie-price/src/main/java/com/taxi/Main.java
@@ -0,0 +1,7 @@
+package com.taxi;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file