xin
2025-07-11 138e3641fbe49a114a399323aa145774f310627e
oying-system/src/main/java/com/oying/modules/sh/domain/OrderProductSnapshot.java
@@ -1,6 +1,5 @@
package com.oying.modules.sh.domain;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
@@ -8,16 +7,21 @@
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;
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
**/
@Data
@Getter
@Setter
@TableName("sh_order_product_snapshot")
public class OrderProductSnapshot implements Serializable {
@@ -37,7 +41,6 @@
    @ApiModelProperty(value = "商品ID")
    private Long productId;
    @NotBlank
    @ApiModelProperty(value = "商品编号")
    private String productCode;
@@ -57,7 +60,6 @@
    @ApiModelProperty(value = "主图片")
    private String productMainImage;
    @NotBlank
    @ApiModelProperty(value = "商品描述")
    private String productDescription;
@@ -84,9 +86,27 @@
    @ApiModelProperty(value = "实付金额")
    private BigDecimal actuallyPayPrice;
    @NotBlank
    @ApiModelProperty(value = "状态")
    private String payState;
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OrderProductSnapshot snapshot = (OrderProductSnapshot) o;
        return Objects.equals(snapshotId, snapshot.snapshotId);
    }
    @Override
    public int hashCode() {
        return Objects.hash(snapshotId);
    }
    public void copy(OrderProductSnapshot source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }