彭雪彬
2025-07-14 c1d20b425b10e8ba59f102dd1ab413055883eed0
oying-system/src/main/java/com/oying/modules/sh/domain/Order.java
New file
@@ -0,0 +1,176 @@
package com.oying.modules.sh.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.oying.base.BaseEntity;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;
import java.util.Set;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
/**
* @description /
* @author lixin
* @date 2025-06-11
**/
@Getter
@Setter
@TableName("sh_order")
public class Order extends BaseEntity implements Serializable {
    @TableId(value = "order_id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long orderId;
    @TableField(exist = false)
    @ApiModelProperty(value = "商品")
    private Set<OrderProductSnapshot> productSnapshots;
    @NotBlank
    @ApiModelProperty(value = "订单号")
    private String orderNum;
    @NotBlank
    @ApiModelProperty(value = "取单号")
    private String orderStoreNum;
    @NotNull
    @ApiModelProperty(value = "订单状态")
    private Integer orderStatus = 0;
    @NotBlank
    @ApiModelProperty(value = "订单状态描述")
    private String orderStatusDescribe;
    @ApiModelProperty(value = "订单备注")
    private String orderRemark;
    @NotBlank
    @ApiModelProperty(value = "预计送达时间")
    private String orderTime;
    @NotNull
    @ApiModelProperty(value = "配送费")
    private BigDecimal sendPrice;
    @NotBlank
    @ApiModelProperty(value = "配送类型")
    private String sendType;
    @ApiModelProperty(value = "骑手Id")
    private Long riderId;
    @ApiModelProperty(value = "骑手手机号")
    private String riderPhone;
    @ApiModelProperty(value = "骑手名称")
    private String riderName;
    @NotNull
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @NotBlank
    @ApiModelProperty(value = "用户账号")
    private String username;
    @NotNull
    @ApiModelProperty(value = "门店ID")
    private Long storeId;
    @NotBlank
    @ApiModelProperty(value = "门店名称")
    private String storeName;
    @NotBlank
    @ApiModelProperty(value = "门店LOGO")
    private String storeLogo;
    @NotBlank
    @ApiModelProperty(value = "描述")
    private String orderDescribe;
    @NotNull
    @ApiModelProperty(value = "原金额")
    private BigDecimal originalPrice;
    @NotNull
    @ApiModelProperty(value = "折扣价")
    private BigDecimal paidPrice;
    @NotNull
    @ApiModelProperty(value = "实付金额")
    private BigDecimal actuallyPayPrice;
    @NotBlank
    @ApiModelProperty(value = "支付状态")
    private String payState;
    @ApiModelProperty(value = "消息")
    private String payMessage;
    @NotBlank
    @ApiModelProperty(value = "支付类型")
    private String payType;
    @ApiModelProperty(value = "支付时间")
    private String payTime;
    @NotBlank
    @ApiModelProperty(value = "订单失效时间")
    private String expireTime;
    @NotBlank
    @ApiModelProperty(value = "openid")
    private String openid;
    @ApiModelProperty(value = "APPID")
    private String appId;
    @ApiModelProperty(value = "时间戳")
    private String timestamp;
    @ApiModelProperty(value = "nonceStr")
    private String nonceStr;
    @ApiModelProperty(value = "packageVal")
    private String packageVal;
    @ApiModelProperty(value = "signType")
    private String signType;
    @ApiModelProperty(value = "签名")
    private String paySign;
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Order order = (Order) o;
        return Objects.equals(orderId, order.orderId) &&
                Objects.equals(orderNum, order.orderNum);
    }
    @Override
    public int hashCode() {
        return Objects.hash(orderId, orderNum);
    }
    public void copy(Order source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}