package com.szwl.model.bean; import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.Date; import java.util.HashMap; import java.util.Map; public class OrderVo { /** * 订单编号 */ private String sn; /** * 花型名称 */ private String productName; /** * 价格 */ private BigDecimal price; /** * 支付时间 */ private Date payDate; /** * 退款时间 */ private Date refundDate; /** * 支付流水号 */ private String trxNo; /** * 退款流水号 */ private String refundTrxNo; /** * 退款金额 */ private BigDecimal refundAmount; /** * 支付方式 */ private String frp_code; public enum Status { /** * 未支付 */ unpay, /** * 已支付 */ pay, /** * 退款中:短暂状态 */ applyRefund, /** * 已退款 */ refund; private static Map map = new HashMap<>(); static { map.put("未支付", unpay); map.put("已支付", pay); map.put("退款中", applyRefund); map.put("已退款", refund); } public static Status forValue(String value) { return map.get(value); } @JsonValue public String toValue() { for (Map.Entry entry : map.entrySet()) { if (entry.getValue() == this) { return entry.getKey(); } } return ""; } } /** * 状态 */ private Status status; private Date createDate; public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public String getSn() { return sn; } public void setSn(String sn) { this.sn = sn; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public Date getPayDate() { return payDate; } public void setPayDate(Date payDate) { this.payDate = payDate; } public Date getRefundDate() { return refundDate; } public void setRefundDate(Date refundDate) { this.refundDate = refundDate; } public String getTrxNo() { return trxNo; } public void setTrxNo(String trxNo) { this.trxNo = trxNo; } public String getRefundTrxNo() { return refundTrxNo; } public void setRefundTrxNo(String refundTrxNo) { this.refundTrxNo = refundTrxNo; } public BigDecimal getRefundAmount() { return refundAmount; } public void setRefundAmount(BigDecimal refundAmount) { this.refundAmount = refundAmount; } public Status getStatus() { return status; } public void setStatus(Status status) { this.status = status; } public String getFrp_code() { return frp_code; } public void setFrp_code(String frp_code) { this.frp_code = frp_code; } }