|
|
@@ -16,6 +16,8 @@ import javax.persistence.EnumType;
|
|
|
import javax.persistence.Enumerated;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Optional;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Data
|
|
|
@@ -89,7 +91,8 @@ public class MintOrderDTO {
|
|
|
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.material = Optional.ofNullable(mintOrder.getMaterial()).orElse(new ArrayList<>())
|
|
|
+ .stream().map(MintMaterial::getName).collect(Collectors.joining(","));
|
|
|
this.airDrop = mintOrder.isAirDrop() ? "空投" : "实物";
|
|
|
this.payMethod = mintOrder.getPayMethod() == null ? "" : mintOrder.getPayMethod().getDescription();
|
|
|
}
|