From cfd8bceb10e2271209e510389015f5eee90fb47a Mon Sep 17 00:00:00 2001 From: Chopper Date: Tue, 22 Jun 2021 09:23:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A2=E5=BC=95=E5=AD=97=E6=AE=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/modules/search/entity/dos/EsGoodsIndex.java | 6 +----- update-sql/version4.0to4.1.sql | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) 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 07e5d6c2..e8388bd1 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 @@ -1,10 +1,6 @@ package cn.lili.modules.search.entity.dos; -import cn.hutool.core.text.CharSequenceUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; import cn.lili.common.elasticsearch.EsSuffix; -import cn.lili.common.utils.StringUtils; import cn.lili.modules.goods.entity.dos.GoodsParams; import cn.lili.modules.goods.entity.dos.GoodsSku; import com.fasterxml.jackson.annotation.JsonFormat; @@ -300,7 +296,7 @@ public class EsGoodsIndex implements Serializable { List attributes = new ArrayList<>(); for (GoodsParams goodsParam : goodsParams) { EsGoodsAttribute attribute = new EsGoodsAttribute(); - if (goodsParam.getIsIndex() == 1) { + if (goodsParam.getIsIndex() != null && goodsParam.getIsIndex() == 1) { attribute.setType(1); attribute.setName(goodsParam.getParamName()); attribute.setValue(goodsParam.getParamValue()); diff --git a/update-sql/version4.0to4.1.sql b/update-sql/version4.0to4.1.sql index d853abbf..b7eef5fb 100644 --- a/update-sql/version4.0to4.1.sql +++ b/update-sql/version4.0to4.1.sql @@ -12,3 +12,6 @@ ALTER TABLE li_coupon ADD range_day_type VARCHAR ( 32 ); ALTER TABLE li_coupon ADD effective_days INT; /**秒杀增加显示商品数量**/ ALTER TABLE li_seckill ADD goods_num INT; + +/**商品参数增加字段**/ +ALTER TABLE li_goods_params ADD is_index INT;