From ad9751046d07546724ca76447898895b19d63158 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 10 十月 2025 14:59:04 +0800
Subject: [PATCH] 处理es

---
 framework/src/main/java/cn/lili/modules/goods/entity/dos/GoodsSku.java      |    2 +-
 framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java |   10 ++++++++++
 framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java |    9 +++++++++
 3 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java b/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java
index c9fed7c..120f05c 100644
--- a/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java
+++ b/framework/src/main/java/cn/lili/elasticsearch/BaseElasticsearchService.java
@@ -277,6 +277,15 @@
                         "          }\n" +
                         "        }\n" +
                         "      },\n" +
+                        "      \"customizeFlag\": {\n" +
+                        "        \"type\": \"text\",\n" +
+                        "        \"fields\": {\n" +
+                        "          \"keyword\": {\n" +
+                        "            \"type\": \"keyword\",\n" +
+                        "            \"ignore_above\": 256\n" +
+                        "          }\n" +
+                        "        }\n" +
+                        "      },\n" +
                         "      \"point\": {\n" +
                         "        \"type\": \"long\"\n" +
                         "      },\n" +
diff --git a/framework/src/main/java/cn/lili/modules/goods/entity/dos/GoodsSku.java b/framework/src/main/java/cn/lili/modules/goods/entity/dos/GoodsSku.java
index 7a45978..90c602d 100644
--- a/framework/src/main/java/cn/lili/modules/goods/entity/dos/GoodsSku.java
+++ b/framework/src/main/java/cn/lili/modules/goods/entity/dos/GoodsSku.java
@@ -183,7 +183,7 @@
     @ApiModelProperty(value ="瀹氬埗妯℃澘鍚嶇О")
     private String customizeTemplateName;
 
-    @ApiModelProperty(value ="琛ㄧず铏氭嫙瀹氬埗鍟嗗搧绫诲瀷 鐜版湁绫诲瀷锛氬畾鍒跺晢鍝�")
+    @ApiModelProperty(value ="瀹氬埗鍟嗗搧")
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     /**
      * @see CustomizeFlagEnum
diff --git a/framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java b/framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java
index 5b925ee..a2cf7b6 100644
--- a/framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java
+++ b/framework/src/main/java/cn/lili/modules/search/entity/dos/EsGoodsIndex.java
@@ -5,6 +5,7 @@
 import cn.lili.elasticsearch.EsSuffix;
 import cn.lili.modules.goods.entity.dos.GoodsSku;
 import cn.lili.modules.goods.entity.dto.GoodsParamsDTO;
+import cn.lili.modules.order.order.entity.enums.CustomizeFlagEnum;
 import cn.lili.modules.promotion.tools.PromotionTools;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -299,6 +300,13 @@
     @Field(type = FieldType.Long)
     private Integer goodsSort;
 
+    @ApiModelProperty(value = "瀹氬埗鍟嗗搧")
+    @Field(type = FieldType.Text)
+    /**
+     * @see CustomizeFlagEnum
+     */
+    private String customizeFlag;
+
     public EsGoodsIndex(GoodsSku sku) {
         if (sku != null) {
             this.id = sku.getId();
@@ -327,6 +335,7 @@
             this.recommend = sku.getRecommend();
             this.goodsType = sku.getGoodsType();
             this.releaseTime = new Date().getTime();
+            this.customizeFlag = sku.getCustomizeFlag();
         }
     }
 
@@ -397,6 +406,7 @@
             this.intro = sku.getIntro();
             this.grade = sku.getGrade();
             this.releaseTime = new Date().getTime();
+            this.customizeFlag = sku.getCustomizeFlag();
         }
     }
 

--
Gitblit v1.8.0