OrderVo.java 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package com.fdkankan.manage.vo.response;
  2. import com.alibaba.excel.annotation.ExcelIgnore;
  3. import com.alibaba.excel.annotation.ExcelProperty;
  4. import lombok.Data;
  5. import java.math.BigDecimal;
  6. @Data
  7. public class OrderVo {
  8. @ExcelIgnore
  9. private Long id;
  10. @ExcelProperty("下单时间")
  11. private String orderTime; //下单时间
  12. @ExcelProperty("订单号")
  13. private String orderSn; //订单号
  14. @ExcelProperty("用户账号")
  15. private String userName; //用户账号
  16. @ExcelProperty("订单金额")
  17. private BigDecimal goodsAmount; //订单金额
  18. @ExcelProperty("支付方式")
  19. private String paymentTypeName; //支付方式 付款方式,0表示微信,1表示支付宝,2表示paypal,3表示其他,4表示货到付款
  20. @ExcelProperty("交易号")
  21. private String tradeNum; //交易号
  22. // @ExcelProperty("订单状态")
  23. // private String orderStatus; // 订单状态(未处理unprocessed、已确认processed、已完成completed、已取消invalid、过期expire)
  24. @ExcelProperty("订单状态")
  25. private String paymentStatus; //付款状态(未付款unpaid、已付款paid、已取消cancel, 部分支付partPayment, 部分退款partRefund, 全额退款refunded)
  26. @ExcelIgnore
  27. private String shipAreaPath;
  28. @ExcelProperty("地址")
  29. private String shipAddress;
  30. @ExcelProperty("手机号码")
  31. private String shipMobile;
  32. @ExcelProperty("收件人")
  33. private String shipName;
  34. public String getShipAddress() {
  35. return shipAreaPath + shipAddress;
  36. }
  37. public String getShipAreaPath() {
  38. return null;
  39. }
  40. public String getPaymentTypeName() {
  41. switch (paymentTypeName){
  42. case "0" : return "微信";
  43. case "1" : return "支付宝";
  44. case "2" : return "paypal";
  45. case "3" : return "其他";
  46. case "4" : return "货到付款";
  47. default: return "";
  48. }
  49. }
  50. // public String getOrderStatus() {
  51. // switch (orderStatus){
  52. // case "unprocessed" : return "未处理";
  53. // case "processed" : return "已确认";
  54. // case "completed" : return "已完成";
  55. // case "invalid" : return "已取消";
  56. // case "expire" : return "过期";
  57. // default: return "";
  58. // }
  59. // }
  60. public String getPaymentStatus() {
  61. switch (paymentStatus){
  62. case "unpaid" : return "未付款";
  63. case "paid" : return "已付款";
  64. case "cancel" : return "已取消";
  65. case "partPayment" : return "部分支付";
  66. case "partRefund" : return "部分退款";
  67. case "refunded" : return "全额退款";
  68. default: return "";
  69. }
  70. }
  71. }