parent
fe6807bca9
commit
c2ad6dc971
@ -1,7 +0,0 @@
|
|||||||
package com.taxi;
|
|
||||||
|
|
||||||
public class Main {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println("Hello world!");
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.taxi.serviceprice;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ServicePriceApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServicePriceApplication.class);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.taxi.serviceprice.controller;
|
||||||
|
|
||||||
|
import com.internal.dto.ResponseResult;
|
||||||
|
import com.internal.request.ForecastPriceDTO;
|
||||||
|
import com.taxi.serviceprice.service.ForecastPriceService;
|
||||||
|
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
|
||||||
|
public class ForecastPriceController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ForecastPriceService forecastPriceService;
|
||||||
|
|
||||||
|
@PostMapping("/forecast-price")
|
||||||
|
public ResponseResult forecastPrice(@RequestBody ForecastPriceDTO forecastPriceDTO){
|
||||||
|
String depLongitude = forecastPriceDTO.getDepLongitude();
|
||||||
|
String depLatitude = forecastPriceDTO.getDestLatitude();
|
||||||
|
|
||||||
|
String destLongitude = forecastPriceDTO.getDestLongitude();
|
||||||
|
String destLatitude = forecastPriceDTO.getDestLatitude();
|
||||||
|
|
||||||
|
return forecastPriceService.forecastPrice(depLongitude,depLatitude,
|
||||||
|
destLongitude,destLatitude);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
server:
|
||||||
|
port: 8084
|
@ -0,0 +1,2 @@
|
|||||||
|
server:
|
||||||
|
port: 8084
|
Loading…
Reference in new issue