索引字段问题处理

This commit is contained in:
Chopper 2021-06-22 09:23:50 +08:00
parent 5fc1e7b30f
commit cfd8bceb10
2 changed files with 4 additions and 5 deletions

View File

@ -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<EsGoodsAttribute> 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());

View File

@ -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;