zhaowenxuan
2025-02-06 06c12d2b42c343798d9476be66031b48967df639
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
package com.ltkj.mall.domain;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ltkj.common.annotation.Excel;
import com.ltkj.common.core.domain.BaseEntity;
import com.ltkj.mall.mallOrderUtils.OrderHandleOption;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
 
/**
 * 订单对象 mall_order
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-07-12
 */
@Data
public class MallOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;
 
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
 
    /**
     * 用户表的用户ID
     */
    @Excel(name = "用户表的用户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
 
    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderSn;
 
    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private Long orderStatus;
 
    /**
     * 售后状态,0是可申请,1是用户已申请,2是管理员审核通过,3是管理员退款成功,4是管理员审核拒绝,5是用户已取消
     */
    @Excel(name = "售后状态,0是可申请,1是用户已申请,2是管理员审核通过,3是管理员退款成功,4是管理员审核拒绝,5是用户已取消")
    private Integer aftersaleStatus;
 
    /**
     * 收货人名称
     */
    @Excel(name = "收货人名称")
    private String consignee;
 
    /**
     * 收货人手机号
     */
    @Excel(name = "收货人手机号")
    private String mobile;
 
    @Excel(name = "收货人身份证号")
    private String idCard;
 
    /**
     * 收货具体地址
     */
    @Excel(name = "收货具体地址")
    private String address;
 
    /**
     * 用户订单留言
     */
    @Excel(name = "用户订单留言")
    private String message;
 
    /**
     * 商品总费用
     */
    @Excel(name = "商品总费用")
    private BigDecimal goodsPrice;
 
    /**
     * 配送费用
     */
    @Excel(name = "配送费用")
    private BigDecimal freightPrice;
 
    /**
     * 优惠券减免
     */
    @Excel(name = "优惠券减免")
    private BigDecimal couponPrice;
 
    /**
     * 用户积分减免
     */
    @Excel(name = "用户积分减免")
    private BigDecimal integralPrice;
 
    /**
     * 团购优惠价减免
     */
    @Excel(name = "团购优惠价减免")
    private BigDecimal grouponPrice;
 
    /**
     * 订单费用, = goods_price + freight_price - coupon_price
     */
    @Excel(name = "订单费用, = goods_price + freight_price - coupon_price")
    private BigDecimal orderPrice;
 
    /**
     * 实付费用, = order_price - integral_price
     */
    @Excel(name = "实付费用, = order_price - integral_price")
    private BigDecimal actualPrice;
 
    /**
     * 微信付款编号
     */
    @Excel(name = "微信付款编号")
    private String payId;
 
    /**
     * 微信付款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "微信付款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;
 
    /**
     * 发货编号
     */
    @Excel(name = "发货编号")
    private String shipSn;
 
    /**
     * 发货快递公司
     */
    @Excel(name = "发货快递公司")
    private String shipChannel;
 
    /**
     * 发货开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shipTime;
 
    /**
     * 实际退款金额,(有可能退款金额小于实际支付金额)
     */
    @Excel(name = "实际退款金额,", readConverterExp = "有=可能退款金额小于实际支付金额")
    private BigDecimal refundAmount;
 
    /**
     * 退款方式
     */
    @Excel(name = "退款方式")
    private Integer refundType;
 
    /**
     * 退款备注
     */
    @Excel(name = "退款备注")
    private String refundContent;
 
    /**
     * 退款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;
 
    /**
     * 用户确认收货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户确认收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date confirmTime;
 
    /**
     * 待评价订单商品数量
     */
    @Excel(name = "待评价订单商品数量")
    private Long comments;
 
    /**
     * 订单关闭时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单关闭时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date closeTime;
 
    /**
     * 代理结算金额
     */
    @Excel(name = "代理结算金额")
    private BigDecimal settlementMoney;
 
    /**
     * 结算状态
     */
    @Excel(name = "结算状态")
    private Integer settlementStatus;
 
    /**
     * 配送方式 :0 快递, 1 自提
     */
    @Excel(name = "配送方式 :0 快递, 1 自提")
    private Long freightType;
 
    /**
     * 推广用户
     */
    @Excel(name = "推广用户")
    private Long shareUserId;
 
    /**
     * 提货码
     */
    @Excel(name = "提货码")
    private String fetchCode;
 
    /**
     * 原始创建人
     */
    @Excel(name = "原始创建人")
    private Long createUserId;
 
    /**
     * 转赠发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "转赠发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date giftSendTime;
 
    /**
     * 转赠接收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "转赠接收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date giftReceiveTime;
 
    /**
     * $column.columnComment
     */
    private Long deptId;
 
    /**
     * 是否赊账
     */
    private String isSz;
 
    private String reservationId;
 
    /**
     * 订单商品信息
     */
    @TableField(exist = false)
    private List<MallOrderGoods> mallOrderGoodsList;
 
    @TableField(exist = false)
    private List<MallOrderGoods> goodsVoList;
 
    /**用户昵称*/
    @TableField(exist = false)
    private String memberNickname;
 
    /**用户头像*/
    @TableField(exist = false)
    private String memberPic;
 
    /**状态可操作选项*/
    @TableField(exist = false)
    private OrderHandleOption orderHandleOption;
 
    @ApiModelProperty("预约时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date reservationTime;
 
    @ApiModelProperty(value = "套餐名称")
    @TableField(exist = false)
    private String pacName;
 
    @ApiModelProperty(value = "套餐id")
    @TableField(exist = false)
    private String pacId;
 
    @TableField(exist = false)
    private String startTime;
 
 
    @TableField(exist = false)
    private String endTime;
 
 
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("orderSn", getOrderSn())
                .append("orderStatus", getOrderStatus())
                .append("aftersaleStatus", getAftersaleStatus())
                .append("consignee", getConsignee())
                .append("mobile", getMobile())
                .append("address", getAddress())
                .append("message", getMessage())
                .append("goodsPrice", getGoodsPrice())
                .append("freightPrice", getFreightPrice())
                .append("couponPrice", getCouponPrice())
                .append("integralPrice", getIntegralPrice())
                .append("grouponPrice", getGrouponPrice())
                .append("orderPrice", getOrderPrice())
                .append("actualPrice", getActualPrice())
                .append("payId", getPayId())
                .append("payTime", getPayTime())
                .append("shipSn", getShipSn())
                .append("shipChannel", getShipChannel())
                .append("shipTime", getShipTime())
                .append("refundAmount", getRefundAmount())
                .append("refundType", getRefundType())
                .append("refundContent", getRefundContent())
                .append("refundTime", getRefundTime())
                .append("confirmTime", getConfirmTime())
                .append("comments", getComments())
                .append("closeTime", getCloseTime())
                .append("settlementMoney", getSettlementMoney())
                .append("settlementStatus", getSettlementStatus())
                .append("freightType", getFreightType())
                .append("shareUserId", getShareUserId())
                .append("fetchCode", getFetchCode())
                .append("createUserId", getCreateUserId())
                .append("giftSendTime", getGiftSendTime())
                .append("giftReceiveTime", getGiftReceiveTime())
                .append("deptId", getDeptId())
                .append("isSz", getIsSz())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("deleted", getDeleted())
                .append("mallOrderGoodsList", getMallOrderGoodsList())
                .toString();
    }
}