WashOrder.java 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. package com.kym.entity;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.baomidou.mybatisplus.annotation.TableName;
  4. import com.fasterxml.jackson.annotation.JsonFormat;
  5. import com.kym.entity.awoara.Detail;
  6. import com.kym.entity.typehandle.WashOrderDetailTypeHandle;
  7. import lombok.Getter;
  8. import lombok.Setter;
  9. import lombok.experimental.Accessors;
  10. import java.time.LocalDateTime;
  11. import java.util.List;
  12. /**
  13. * <p>
  14. * 洗车订单表
  15. * </p>
  16. *
  17. * @author skyline
  18. * @since 2024-09-11
  19. */
  20. @Getter
  21. @Setter
  22. @TableName(value = "t_wash_order", autoResultMap = true)
  23. @Accessors(chain = true)
  24. public class WashOrder extends BaseEntity {
  25. public static final int ORDER_STATUS_未知 = -1;
  26. public static final int ORDER_STATUS_开机 = 0;
  27. public static final int ORDER_STATUS_成功 = 1;
  28. public static final int ORDER_STATUS_失败 = 2;
  29. public static final int ORDER_STATUS_取消 = 3;
  30. public static final int PAY_STATUS_未支付 = 0;
  31. public static final int PAY_STATUS_已支付 = 1;
  32. public static final String START_CLOSE_TYPE_网络 = "network";
  33. public static final String START_CLOSE_TYPE_按键 = "button";
  34. /**
  35. * 领取停车券最低消费金额6元
  36. */
  37. public static final int PARKING_COUPON_MIN_AMOUNT = 600;
  38. private static final long serialVersionUID = 1L;
  39. private Long userId;
  40. private String stationId;
  41. /**
  42. * 产品key
  43. */
  44. private String productKey;
  45. /**
  46. * 设备名称
  47. */
  48. private String deviceName;
  49. /**
  50. * 设备编号
  51. */
  52. private String shortId;
  53. /**
  54. * 开机方式:button维护按钮,network网络命令,coin投币,card刷卡
  55. */
  56. private String openType;
  57. /**
  58. * 关机方式:button维护按钮,network网络命令,no_balance超过预设金额,idle_timeout设备空闲超时,operation_timeout操作超时,card刷卡。注意:为空表示还没有关机,正在使用
  59. */
  60. private String closeType;
  61. /**
  62. * 订单号,和开机命令的order_id相同,如果使用按钮快速开机,order_id是空字符串
  63. */
  64. private String orderId;
  65. /**
  66. * 本机订单号
  67. */
  68. private String orderIdLocal;
  69. /**
  70. * 会员折扣比例(0-100,100表示不享受折扣,95表示9.5折优惠)
  71. */
  72. private Integer memberDiscount;
  73. /**
  74. * 本次开机的预付金额(单位分,本次开机最大消费金额限制)
  75. */
  76. private Integer prepayMoney;
  77. /**
  78. * 消费总额,等于各单项费用之和(单位分)
  79. */
  80. private Integer amount;
  81. /**
  82. * 应收金额,如果大于预付金额,则限制为预付金额并关机,否则等于消费总金额(单位分)
  83. */
  84. private Integer amountReceivable;
  85. /**
  86. * 实收金额等于应收金额乘会员折扣(单位分)
  87. */
  88. private Integer amountReceived;
  89. /**
  90. * 优惠金额等于消费总额减去实收金额(单位分)
  91. */
  92. private Integer discountMoney;
  93. /**
  94. * 订单操作剩余操作时间(单位秒),开机后从operation_timeout开始每秒减1,减到0关机,关机原因close_type=operation_timeout
  95. */
  96. private Integer operationRemainTime;
  97. /**
  98. * 设备空闲关机倒计时剩余时间(单位秒),开机后从idle_timeout开始每秒减1,见到0关机,关机原因close_type=idle_time(递减过程中按任意功能键,重新开始从idle_timeout递减)
  99. */
  100. private Integer idleRemainTime;
  101. /**
  102. * 费用明细:name 名称 price 单价(单位分) seconds 时长(单位秒) amount 费用(单位分) space⻋位或场地,water清水,foam泡沫,cleaner吸尘,tap水龙头,user_ext用户扩展,消毒或吹干等功能,coat镀膜,blow吹气
  103. */
  104. @TableField(typeHandler = WashOrderDetailTypeHandle.class)
  105. private List<Detail> detail;
  106. /**
  107. * 开始时间
  108. */
  109. @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  110. private LocalDateTime startTime;
  111. /**
  112. * 结束时间
  113. */
  114. @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  115. private LocalDateTime endTime;
  116. /**
  117. * 洗车总时长(秒)
  118. */
  119. private Integer totalSeconds;
  120. /**
  121. * 优惠方式:RechargeRights-充值权益 Coupon-优惠券
  122. */
  123. private String discountType;
  124. /**
  125. * 优惠金额(分)
  126. */
  127. private Integer discountAmount;
  128. /**
  129. * 订单状态:0:未知,1:成功,2:失败,3:取消
  130. */
  131. private Integer orderStatus;
  132. /**
  133. * 支付状态:0:未支付,1:已支付
  134. */
  135. private Integer payStatus;
  136. /**
  137. * 充值款支付金额(分)
  138. */
  139. private Integer rechargePayment;
  140. /**
  141. * 赠款支付金额(分)
  142. */
  143. private Integer grantsPayment;
  144. /**
  145. * 停止原因
  146. */
  147. private String stopReason;
  148. /**
  149. * 发票状态:0-待开票 1-已开票 2-已作废(用不上) 3-开票中
  150. */
  151. private Integer invoiceStatus;
  152. /**
  153. * 发票id
  154. */
  155. private Long invoiceId;
  156. /**
  157. * 是否跨店:0-否,1-是
  158. */
  159. private Boolean isCross;
  160. }