From e3a87a62ea0a19db84f7bbddb3bc2aa24f2d6aa6 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Wed, 16 Jul 2025 17:47:21 +0800
Subject: [PATCH] 用户取消订单

---
 oying-system/src/main/java/com/oying/modules/sh/domain/OrderProductSnapshot.java |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderProductSnapshot.java b/oying-system/src/main/java/com/oying/modules/sh/domain/OrderProductSnapshot.java
index c9e5c05..f3eb947 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/domain/OrderProductSnapshot.java
+++ b/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));
     }

--
Gitblit v1.9.3