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 productSnapshots; @NotBlank @ApiModelProperty(value = "订单号") private String orderNum; @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 = "用户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 user = (Order) o; return Objects.equals(orderId, user.orderId) && Objects.equals(orderNum, user.orderNum); } @Override public int hashCode() { return Objects.hash(orderId, username); } public void copy(Order source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } }