OrderVo.java 2.7 KB

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