Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 008b5b48
authored
Oct 19, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DOC: 数据返回示例
1 parent
afc69207
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
13 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseDistance.java
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseDistanceParam.java
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseLocation.java
project-order/src/main/java/com/dituhui/pea/order/controller/PeaApiController.java
View file @
008b5b4
package
com
.
dituhui
.
pea
.
order
.
controller
;
import
cn.hutool.core.date.LocalDateTimeUtil
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.jackson.DateUtil
;
import
com.dituhui.pea.order.common.jackson.JsonUtil
;
...
...
@@ -232,7 +231,11 @@ public class PeaApiController {
@PostMapping
(
"/order/increase/confirm"
)
public
Result
<
OrderConfirmResult
>
orderConfirm
(
@Validated
@RequestBody
OrderConfirmParam
requestParam
)
{
return
Result
.
success
(
new
OrderConfirmResult
());
OrderConfirmResult
result
=
new
OrderConfirmResult
();
result
.
setEngineerCode
(
requestParam
.
getEngineerCode
());
result
.
setOrderId
(
requestParam
.
getOrderId
());
result
.
setAppointmentStatus
(
requestParam
.
getAppointmentResult
());
return
Result
.
success
(
result
);
}
...
...
@@ -258,19 +261,17 @@ public class PeaApiController {
/**
* 9.1GET 两点间里程和耗时查询
*
* @param origin 出发点经纬度
* @param destination 目的地
* @param vehicle 交通工具:1汽车;2电动车;3自行车;4步行;默认是汽车
* @return 两点间里程和耗时
* @apiNote 根据交通工具查询两个坐标点之间的里程和耗时
*/
@GetMapping
(
"/base/distance"
)
public
Result
<
BaseDistance
>
baseDistance
(
@NotBlank
@RequestParam
(
"origin"
)
String
origin
,
@NotBlank
@RequestParam
(
"destination"
)
String
destination
,
Integer
vehicle
)
{
@PostMapping
(
"/base/distance"
)
public
Result
<
BaseDistance
>
baseDistance
(
@RequestBody
BaseDistanceParam
param
)
{
return
Result
.
success
(
new
BaseDistance
());
BaseDistance
result
=
new
BaseDistance
();
result
.
setOrigin
(
param
.
getOrigin
());
result
.
setDestination
(
param
.
getDestination
());
result
.
setVehicle
(
param
.
getVehicle
());
return
Result
.
success
(
result
);
}
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseDistance.java
View file @
008b5b4
...
...
@@ -12,11 +12,11 @@ public class BaseDistance {
/**
* 出发点 经度,纬度
*/
private
String
origin
;
private
BaseLocation
origin
;
/**
* 目的地 经度,纬度
*/
private
String
destination
;
private
BaseLocation
destination
;
/**
* 交通工具,1汽车;2电动车;3骑车;4步行
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseDistanceParam.java
0 → 100644
View file @
008b5b4
package
com
.
dituhui
.
pea
.
order
.
dto
.
param
;
import
lombok.Getter
;
import
lombok.Setter
;
@Setter
@Getter
public
class
BaseDistanceParam
{
/**
* 出发点经纬度
*/
private
BaseLocation
origin
;
/**
* 出发点经纬度
*/
private
BaseLocation
destination
;
/**
* 交通工具:1汽车;2电动车;3自行车;默认是汽车
*/
private
Integer
vehicle
=
1
;
}
project-order/src/main/java/com/dituhui/pea/order/dto/param/BaseLocation.java
0 → 100644
View file @
008b5b4
package
com
.
dituhui
.
pea
.
order
.
dto
.
param
;
import
lombok.Getter
;
import
lombok.Setter
;
import
javax.validation.constraints.NotNull
;
@Setter
@Getter
public
class
BaseLocation
{
/**
* 地址纬度
*/
@NotNull
private
Double
latitude
;
/**
* 地址经度
*/
@NotNull
private
Double
longitude
;
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment