彭雪彬
2025-07-15 46f7c2ef3abc235e44c59be9b3c5396befc64888
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
package com.oying.modules.sh.domain;
 
import com.baomidou.mybatisplus.annotation.TableField;
import com.oying.base.BaseEntity;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;
import java.util.Set;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
 
/**
* @description /
* @author lixin
* @date 2025-06-11
**/
@Getter
@Setter
@TableName("sh_order")
public class Order extends BaseEntity implements Serializable {
 
    @TableId(value = "order_id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long orderId;
 
    @TableField(exist = false)
    @ApiModelProperty(value = "商品")
    private Set<OrderProductSnapshot> productSnapshots;
 
    @NotBlank
    @ApiModelProperty(value = "订单号")
    private String orderNum;
 
    @NotBlank
    @ApiModelProperty(value = "取单号")
    private String orderStoreNum;
 
    @NotNull
    @ApiModelProperty(value = "订单状态")
    private Integer orderStatus = 0;
 
    @NotBlank
    @ApiModelProperty(value = "订单状态描述")
    private String orderStatusDescribe;
 
    @ApiModelProperty(value = "订单备注")
    private String orderRemark;
 
    @NotBlank
    @ApiModelProperty(value = "预计送达时间")
    private String orderTime;
 
    @NotNull
    @ApiModelProperty(value = "配送费")
    private BigDecimal sendPrice;
 
    @NotBlank
    @ApiModelProperty(value = "配送类型")
    private String sendType;
 
    @ApiModelProperty(value = "骑手Id")
    private Long riderId;
 
    @ApiModelProperty(value = "骑手手机号")
    private String riderPhone;
 
    @ApiModelProperty(value = "骑手名称")
    private String riderName;
 
    @NotNull
    @ApiModelProperty(value = "用户id")
    private Long userId;
 
    @NotBlank
    @ApiModelProperty(value = "用户账号")
    private String username;
 
    @NotNull
    @ApiModelProperty(value = "门店ID")
    private Long storeId;
 
    @NotBlank
    @ApiModelProperty(value = "门店名称")
    private String storeName;
 
    @NotBlank
    @ApiModelProperty(value = "门店LOGO")
    private String storeLogo;
 
    @NotBlank
    @ApiModelProperty(value = "门店详细地址")
    private String storeAddress;
 
    @NotNull
    @ApiModelProperty(value = "门店经度")
    private BigDecimal storeLongitude;
 
    @NotNull
    @ApiModelProperty(value = "门店纬度")
    private BigDecimal storeLatitude;
 
    @NotBlank
    @ApiModelProperty(value = "描述")
    private String orderDescribe;
 
    @NotNull
    @ApiModelProperty(value = "原金额")
    private BigDecimal originalPrice;
 
    @NotNull
    @ApiModelProperty(value = "折扣价")
    private BigDecimal paidPrice;
 
    @NotNull
    @ApiModelProperty(value = "实付金额")
    private BigDecimal actuallyPayPrice;
 
    @NotBlank
    @ApiModelProperty(value = "支付状态")
    private String payState;
 
    @ApiModelProperty(value = "消息")
    private String payMessage;
 
    @NotBlank
    @ApiModelProperty(value = "支付类型")
    private String payType;
 
    @ApiModelProperty(value = "支付时间")
    private String payTime;
 
    @NotBlank
    @ApiModelProperty(value = "订单失效时间")
    private String expireTime;
 
    @NotBlank
    @ApiModelProperty(value = "openid")
    private String openid;
 
    @ApiModelProperty(value = "APPID")
    private String appId;
 
    @ApiModelProperty(value = "时间戳")
    private String timestamp;
 
    @ApiModelProperty(value = "nonceStr")
    private String nonceStr;
 
    @ApiModelProperty(value = "packageVal")
    private String packageVal;
 
    @ApiModelProperty(value = "signType")
    private String signType;
 
    @ApiModelProperty(value = "签名")
    private String paySign;
 
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Order order = (Order) o;
        return Objects.equals(orderId, order.orderId) &&
                Objects.equals(orderNum, order.orderNum);
    }
 
    @Override
    public int hashCode() {
        return Objects.hash(orderId, orderNum);
    }
 
    public void copy(Order source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}