|
|
@@ -1,6 +1,7 @@
|
|
|
package com.izouma.nineth.dto;
|
|
|
|
|
|
import com.alibaba.excel.annotation.ExcelProperty;
|
|
|
+import com.izouma.nineth.annotations.Searchable;
|
|
|
import com.izouma.nineth.domain.MintMaterial;
|
|
|
import com.izouma.nineth.domain.MintOrder;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
@@ -10,6 +11,10 @@ import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
+import javax.persistence.Column;
|
|
|
+import javax.persistence.EnumType;
|
|
|
+import javax.persistence.Enumerated;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -29,23 +34,64 @@ public class MintOrderDTO {
|
|
|
@ExcelProperty("手机号")
|
|
|
private String phone;
|
|
|
|
|
|
- @ExcelProperty("铸造时间")
|
|
|
+ @ExcelProperty("下单时间")
|
|
|
private LocalDateTime createdAt;
|
|
|
|
|
|
+ @ExcelProperty("活动ID")
|
|
|
+ private Long mintActivityId;
|
|
|
+
|
|
|
+ @ExcelProperty("活动名称")
|
|
|
+ private String mintActivity;
|
|
|
+
|
|
|
@ExcelProperty("铸造材料")
|
|
|
private String material;
|
|
|
|
|
|
- @ExcelProperty("状态")
|
|
|
- private String status;
|
|
|
-
|
|
|
@ExcelProperty("是否消耗藏品")
|
|
|
private String consume;
|
|
|
|
|
|
+ @ExcelProperty("gas费")
|
|
|
+ @Column(precision = 10, scale = 2)
|
|
|
+ private BigDecimal gasPrice;
|
|
|
+
|
|
|
+ @ExcelProperty("支付方式")
|
|
|
+ @Enumerated(EnumType.STRING)
|
|
|
+ private String payMethod;
|
|
|
+
|
|
|
+ @ExcelProperty("交易ID")
|
|
|
+ @Searchable
|
|
|
+ private String transactionId;
|
|
|
+
|
|
|
+ @ExcelProperty("支付时间")
|
|
|
+ private LocalDateTime payAt;
|
|
|
+
|
|
|
+ @ExcelProperty("铸造类型")
|
|
|
+ private String airDrop;
|
|
|
+
|
|
|
+ @ExcelProperty("快递单号")
|
|
|
+ private String courierId;
|
|
|
+
|
|
|
+ @ExcelProperty("收货人")
|
|
|
+ private String contactName;
|
|
|
+
|
|
|
+ @ExcelProperty("收货电话")
|
|
|
+ private String contactPhone;
|
|
|
+
|
|
|
+ @ExcelProperty("收货地址")
|
|
|
+ private String address;
|
|
|
+
|
|
|
+ @ExcelProperty("取消时间")
|
|
|
+ private LocalDateTime cancelTime;
|
|
|
+
|
|
|
+ @ExcelProperty("状态")
|
|
|
+ private String status;
|
|
|
+
|
|
|
public MintOrderDTO(MintOrder mintOrder) {
|
|
|
BeanUtils.copyProperties(mintOrder, this);
|
|
|
this.status = mintOrder.getStatus().getDescription();
|
|
|
this.consume = mintOrder.isConsume() ? "是" : "否";
|
|
|
this.material = mintOrder.getMaterial().stream().map(MintMaterial::getName).collect(Collectors.joining(","));
|
|
|
+ this.airDrop = mintOrder.isAirDrop() ? "空投" : "实物";
|
|
|
+ this.payMethod = mintOrder.getPayMethod() == null ? "" : mintOrder.getPayMethod().getDescription();
|
|
|
}
|
|
|
|
|
|
}
|