DeliveryOrderCreateDTO.java
2.56 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package com.diligrp.rider.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 外部系统推单请求 DTO
* 对应 POST /api/open/delivery/order/create
*/
@Data
public class DeliveryOrderCreateDTO {
/** 城市ID */
private Long cityId;
/**
* 接入方门店编号(对应 merchant_store.out_store_id)
* 传入后中台自动查找门店,填充名称/地址/经纬度,无需重复传 storeName/storeLng/storeLat
*/
private String outStoreId;
/** 发货门店名称(outStoreId 为空时必填) */
private String storeName;
/** 发货门店地址 */
private String storeAddr;
/** 发货门店经度(extStoreId 为空时必填) */
private String storeLng;
/** 发货门店纬度(extStoreId 为空时必填) */
private String storeLat;
/** 收件人姓名 */
@NotBlank(message = "收件人姓名不能为空")
private String recipName;
/** 收件人电话 */
@NotBlank(message = "收件人电话不能为空")
private String recipPhone;
/** 收件人地址 */
@NotBlank(message = "收件人地址不能为空")
private String recipAddr;
/** 收件人经度 */
@NotBlank(message = "收件人经度不能为空")
private String recipLng;
/** 收件人纬度 */
@NotBlank(message = "收件人纬度不能为空")
private String recipLat;
/** 外部系统订单号(用于回调对账,需唯一) */
@NotBlank(message = "外部订单号不能为空")
private String outOrderNo;
/** 货物重量(kg),用于重量计费,0=不计重 */
private BigDecimal weight = BigDecimal.ZERO;
/** 期望配送时间戳(秒),0=立即配送 */
private Long serviceTime = 0L;
/** 状态变更回调地址(可覆盖应用级配置) */
private String callbackUrl;
/** 整单备注 */
private String remark;
/**
* 货物清单(骑手端可见)
* 配送中台不解析具体业务含义,只做透传快照
*/
private List<DeliveryItemDTO> items;
/** 整单货物备注(如:放门口、不要辣等) */
private String itemRemark;
@Data
public static class DeliveryItemDTO {
/** 货物名称 */
private String name;
/** 数量 */
private Integer quantity = 1;
/** 规格/型号(如大份、500ml等) */
private String spec;
/** 单项备注 */
private String remark;
}
}