营销模块中退款保证

dev
zld 9 months ago
parent 3ba3d75988
commit 5b98ad8b77

@ -13,39 +13,58 @@ import java.math.BigDecimal;
import java.util.List;
/**
*
*
* Elasticsearch便
* Created by macro on 2018/6/19.
*/
@Data
@EqualsAndHashCode
@Document(indexName = "pms")
@Setting(shards = 1,replicas = 0)
@Document(indexName = "pms") // 指定Elasticsearch索引名称
@Setting(shards = 1, replicas = 0) // 设置索引的分片数和副本数
public class EsProduct implements Serializable {
private static final long serialVersionUID = -1L;
@Id
private Long id;
@Field(type = FieldType.Keyword)
private String productSn;
private Long brandId;
@Field(type = FieldType.Keyword)
private String brandName;
private Long productCategoryId;
@Field(type = FieldType.Keyword)
private String productCategoryName;
private String pic;
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String name;
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String subTitle;
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String keywords;
private BigDecimal price;
private Integer sale;
private Integer newStatus;
private Integer recommandStatus;
private Integer stock;
private Integer promotionType;
private Integer sort;
@Field(type = FieldType.Nested, fielddata = true)
private List<EsProductAttributeValue> attrValueList;
}
@Id // 标记为Elasticsearch的文档ID
private Long id; // 商品ID
@Field(type = FieldType.Keyword) // 指定字段类型为Keyword不分词
private String productSn; // 商品编号
private Long brandId; // 品牌ID
@Field(type = FieldType.Keyword) // 指定字段类型为Keyword不分词
private String brandName; // 品牌名称
private Long productCategoryId; // 产品分类ID
@Field(type = FieldType.Keyword) // 指定字段类型为Keyword不分词
private String productCategoryName; // 产品分类名称
private String pic; // 商品图片
@Field(analyzer = "ik_max_word", type = FieldType.Text) // 使用ik_max_word分析器进行分词
private String name; // 商品名称
@Field(analyzer = "ik_max_word", type = FieldType.Text) // 使用ik_max_word分析器进行分词
private String subTitle; // 商品副标题
@Field(analyzer = "ik_max_word", type = FieldType.Text) // 使用ik_max_word分析器进行分词
private String keywords; // 商品关键词
private BigDecimal price; // 商品价格
private Integer sale; // 商品销量
private Integer newStatus; // 是否为新品
private Integer recommandStatus; // 是否推荐
private Integer stock; // 库存
private Integer promotionType; // 促销类型
private Integer sort; // 排序
@Field(type = FieldType.Nested, fielddata = true) // 指定字段类型为Nested支持嵌套查询
private List<EsProductAttributeValue> attrValueList; // 商品属性值列表
}

@ -8,21 +8,36 @@ import org.springframework.data.elasticsearch.annotations.FieldType;
import java.io.Serializable;
/**
*
*
* Elasticsearch便
* Created by macro on 2018/6/27.
*/
@Data
@EqualsAndHashCode
public class EsProductAttributeValue implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private Long productAttributeId;
//属性值
private Long id; // 属性值ID
private Long productAttributeId; // 商品属性ID
/**
*
* 使 FieldType.Keyword
*/
@Field(type = FieldType.Keyword)
private String value; // 属性值
/**
*
* 0 -> 1 ->
*/
private Integer type; // 属性参数类型
/**
*
* 使 FieldType.Keyword
*/
@Field(type = FieldType.Keyword)
private String value;
//属性参数0->规格1->参数
private Integer type;
//属性名称
@Field(type=FieldType.Keyword)
private String name;
}
private String name; // 属性名称
}

@ -6,21 +6,27 @@ import lombok.EqualsAndHashCode;
import java.util.List;
/**
*
*
*
* 便
* Created by macro on 2018/6/27.
*/
@Data
@EqualsAndHashCode
public class EsProductRelatedInfo {
private List<String> brandNames;
private List<String> productCategoryNames;
private List<ProductAttr> productAttrs;
private List<String> brandNames; // 品牌名称列表
private List<String> productCategoryNames; // 产品分类名称列表
private List<ProductAttr> productAttrs; // 产品属性列表
/**
*
* ID
*/
@Data
@EqualsAndHashCode
public static class ProductAttr {
private Long attrId;
private String attrName;
private List<String> attrValues;
private Long attrId; // 属性ID
private String attrName; // 属性名称
private List<String> attrValues; // 属性值列表
}
}
}
Loading…
Cancel
Save