首页添加 我的订单;订单添加各个步骤的事件字段
This commit is contained in:
@@ -17,4 +17,7 @@ public class Order {
|
||||
private String orderStatus;
|
||||
private BigDecimal orderPrice;
|
||||
private LocalDateTime payDate;
|
||||
private LocalDateTime cancelDate;
|
||||
private LocalDateTime shipDate;
|
||||
private LocalDateTime deliverDate;
|
||||
}
|
||||
|
@@ -26,7 +26,10 @@ public class OrderVO implements Serializable {
|
||||
private String orderStatus;
|
||||
private String orderStatusCode;
|
||||
private String orderPrice;
|
||||
private LocalDateTime payDate;
|
||||
private String payDate;
|
||||
private String cancelDate;
|
||||
private String shipDate;
|
||||
private String deliverDate;
|
||||
|
||||
public static OrderVO convertFrom(Order order) {
|
||||
if (order == null) {
|
||||
@@ -41,6 +44,19 @@ public class OrderVO implements Serializable {
|
||||
orderVO.setOrderStatusCode(order.getOrderStatus());
|
||||
String price = order.getOrderPrice().setScale(2, RoundingMode.FLOOR).toPlainString();
|
||||
orderVO.setOrderPrice(price);
|
||||
|
||||
if (order.getOrderDate() != null) {
|
||||
orderVO.setPayDate(order.getOrderDate().toString().replace("T", " "));
|
||||
}
|
||||
if (order.getCancelDate() != null) {
|
||||
orderVO.setCancelDate(order.getCancelDate().toString().replace("T", " "));
|
||||
}
|
||||
if (order.getShipDate() != null) {
|
||||
orderVO.setShipDate(order.getShipDate().toString().replace("T", " "));
|
||||
}
|
||||
if (order.getDeliverDate() != null) {
|
||||
orderVO.setDeliverDate(order.getDeliverDate().toString().replace("T", " "));
|
||||
}
|
||||
return orderVO;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user