123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- 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<String, Status> 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<String, Status> 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;
- }
- }
|