From 9a8d9ef43c70fe6d70b494f49b19e5ca6ef01d4b Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期五, 14 三月 2025 17:52:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/ProductMix.java |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/ProductMix.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/ProductMix.java
index d205a13..d49a1f1 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/ProductMix.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/ProductMix.java
@@ -2,10 +2,13 @@
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import lombok.Data;
 import lombok.Getter;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -13,31 +16,39 @@
 @Data
 @NoArgsConstructor
 @TableName(value = "nc_product_mix")
-public class ProductMix {
+public class ProductMix implements Serializable {
+    private static final long serialVersionUID = 1529244980533421687L;
     // id
-    private long id;
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
     // 鐖剁骇 id
+    @JsonSerialize(using = ToStringSerializer.class)
     @TableField(value = "parent_id")
-    private long parentId;
+    private Long parentId;
     // 鍚嶇О
     @TableField(value = "name")
     private String name;
     // code
-    @TableField(value = "code")
+    @TableField(value = "tree_code")
     private String code;
     // 绫诲瀷
-    @TableField(value = "type")
-    private String type;
+    @TableField(value = "tree_type")
+    private Integer type;
+
+    //灞曠ず鍚嶇О
+    private transient String label;
+
 
     private transient List<ProductMix> children = new ArrayList<>();
 
-    public ProductMix(long id, long parentId, String name, String code, String type) {
+    public ProductMix(Long id, Long parentId, String name, String code, Integer type) {
         this.id = id;
         this.parentId = parentId;
         this.name = name;
         this.code = code;
         this.type = type;
         this.children = new ArrayList<>();
+        this.label="["+code+"]"+name;
     }
 
     public void addChild(ProductMix child) {

--
Gitblit v1.9.3