| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- package com.cyksj.model.entity;
- import lombok.*;
- import java.io.Serializable;
- import java.math.BigDecimal;
- import java.util.Arrays;
- import java.util.Date;
- /**
- * @author chan
- * @date 2021/10/11 下午4:04
- */
- @Getter
- @Setter
- public class OrderDon extends BaseEntity implements Serializable {
- /**
- * 座位id
- */
- private Long relationId;
- /**
- * 商品id
- */
- private Long skuId;
- /** 订单号 */
- private String orderNo ;
- private Long goodsId;
- /**
- * 微信订单号
- */
- private String transactionId;
- /** 用户id */
- private Long userId ;
- /**
- * openId
- */
- private String openId;
- /** 金额 */
- private BigDecimal money ;
- /**
- * 退款金额
- */
- private BigDecimal refundMoney;
- /**
- * 优惠金额
- */
- private BigDecimal realMoney;
- /**
- * 优惠金额
- */
- private BigDecimal couponMoney;
- /**
- * 优惠券用户领取id
- */
- private Long couponUserId;
- /**
- * 购买数量
- */
- private Integer num;
- /** 支付状态 */
- private Status status ;
- /**
- * 支付类型
- */
- private Type type;
- /**
- * 订单类型 1普通订单、2续费订单
- * 默认值为1
- */
- private Integer orderType;
- /**
- * 支付时间
- */
- private Date payTime;
- /**
- * 是否是分销订单
- */
- private Boolean isDistribute;
- /**
- * 是否是固定推广者分销
- */
- private Boolean isFixedDistribute;
- /**
- * 商户id
- */
- private String shopId;
- /**
- * 渠道链接id
- */
- private Long popularizeId;
- /**
- * 是否是推广未登录用户购买订单
- */
- private Boolean isNoLogin;
- /**
- * 关联兑换码
- */
- private String exCode;
- /**
- * 自定义订阅节点
- */
- private String subNode;
- public enum Status {
- /**
- * 订单状态
- */
- close("已关闭"),
- noPayment("待付款"),
- hasPayment("已付款"),
- transport("已发货"),
- received("已签收"),
- complete("已完成"),
- refund("已退款"),
- ;
- private String desc;
- Status(String desc) {
- this.desc = desc;
- }
- public String getDesc() {
- return desc;
- }
- }
- @Getter
- @AllArgsConstructor
- public enum Type{
- WeChat("wechat","微信"),
- ALI_PAY("zfb","支付宝"),
- EX_CODE("exchange_code","兑换码"),
- LOTTERY("lottery","抽奖"),
- ;
- String type;
- String desc;
- public static Type getType(String type) {
- return Arrays.stream(Type.values()).filter(tp -> tp.getType().equals(type)).findFirst().orElse(WeChat);
- }
- }
- }
|