CarAuctionRequest.java
6.37 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package com.glsx.usedcar.gsc;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@Schema(description = "拍卖数据推送请求")
@Data
public class CarAuctionRequest {
@Schema(description = "核心标识", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "核心标识不能为空")
private CoreIdentity coreIdentity;
@Schema(description = "核心状态信息", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "核心状态信息不能为空")
private StatusInfo statusInfo;
//
@Schema(description = "拍卖参数", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拍卖参数不能为空")
private AuctionParams auctionParams;
//
@Schema(description = "撮合信息,仅在 IN_NEGOTIATION 及后续状态下有值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "撮合信息不能为空")
private NegotiationInfo negotiationInfo;
//
@Schema(description = "最终成交结果", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "最终成交结果不能为空")
private FinalResult finalResult;
@Schema(description = "核心标识")
@Data
public static class CoreIdentity {
@Schema(description = "车辆在系统中的唯一ID", example = "VEH-202310-1001")
@NotEmpty(message = "车源号不能为空")
private String sourceNo;
@Schema(description = "车辆当前参与或已完成的拍卖场次ID", example = "AUC-20231025-01", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "拍卖场次ID不能为空")
private String auctionId;
@Schema(description = "车辆在本场拍卖中的编号(拍品号)", example = "88", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拍品号不能为空")
private Integer lotNumber;
}
@Schema(description = "核心状态信息")
@Data
public static class StatusInfo {
@Schema(description = "车辆的全局拍卖状态,这是控制业务逻辑的核心字段", example = "IN_AUCTION", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "拍卖状态不能为空")
private String status;
@Schema(description = "对当前状态的简要文字描述", example = "流拍,正在与意向买家沟通", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "状态描述不能为空")
private String statusDescription;
@Schema(description = "该状态的最后更新时间", example = "2023-10-25 16:10:00", type = "string", format = "date-time", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@NotNull(message = "最后更新时间不能为空")
private String updatedDate;
}
//
@Schema(description = "拍卖参数")
@Data
public static class AuctionParams {
@Schema(description = "拍卖的预定开始时间", example = "2023-10-25 14:00:00", type = "string", format = "date-time", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@NotNull(message = "拍卖开始时间不能为空")
private String auctionStartTime;
@Schema(description = "拍卖的预定结束时间", example = "2023-10-25 16:00:00", type = "string", format = "date-time", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@NotNull(message = "拍卖结束时间不能为空")
private String auctionEndTime;
@Schema(description = "拍卖剩余时间的秒数", example = "120", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "剩余时间不能为空")
private Integer timeRemainingSeconds;
}
//
@Schema(description = "撮合信息,仅在 IN_NEGOTIATION 及后续状态下有值")
@Data
public static class NegotiationInfo {
@Schema(description = "拍卖结束时的最高出价,作为撮合起点", example = "178000.00", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "最高出价不能为空")
private String highestAuctionBid;
@Schema(description = "撮合过程中,当前买家给出的最优报价", example = "179000.00", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "当前报价不能为空")
private String currentOfferPrice;
@Schema(description = "负责该车辆撮合工作的销售或客服专员ID", example = "EMP-007", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "撮合专员ID不能为空")
private String negotiatorId;
@Schema(description = "撮合议价的截止时间", example = "2023-10-27 18:00:00", type = "string", format = "date-time", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@NotNull(message = "撮合截止时间不能为空")
private String negotiationDeadline;
}
//
@Schema(description = "最终成交结果")
@Data
public static class FinalResult {
@Schema(description = "最终中标者或购买者的用户ID", example = "USER-****-9527", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "中标者ID不能为空")
private String winnerId;
@Schema(description = "最终确认成交的时间", example = "2023-10-26 11:30:00", type = "string", format = "date-time", requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@NotNull(message = "成交时间不能为空")
private String transactionTime;
@Schema(description = "成交方式", example = "AUCTION", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "成交方式不能为空")
private String transactionType;
@Schema(description = "最终成交价格(售价)", example = "179000.00", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "最终成交价格不能为空")
private String sellingPrice;
}
}