Эх сурвалжийг харах

Update EsProductRelatedInfo.java

macro 4 жил өмнө
parent
commit
da5d742740

+ 9 - 50
mall-search/src/main/java/com/macro/mall/search/domain/EsProductRelatedInfo.java

@@ -1,67 +1,26 @@
 package com.macro.mall.search.domain;
 
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
 import java.util.List;
 
 /**
  * 搜索相关商品品牌名称,分类名称及属性
  * Created by macro on 2018/6/27.
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
 public class EsProductRelatedInfo {
     private List<String> brandNames;
     private List<String> productCategoryNames;
-    private List<ProductAttr>   productAttrs;
-
-    public List<String> getBrandNames() {
-        return brandNames;
-    }
-
-    public void setBrandNames(List<String> brandNames) {
-        this.brandNames = brandNames;
-    }
+    private List<ProductAttr> productAttrs;
 
-    public List<String> getProductCategoryNames() {
-        return productCategoryNames;
-    }
-
-    public void setProductCategoryNames(List<String> productCategoryNames) {
-        this.productCategoryNames = productCategoryNames;
-    }
-
-    public List<ProductAttr> getProductAttrs() {
-        return productAttrs;
-    }
-
-    public void setProductAttrs(List<ProductAttr> productAttrs) {
-        this.productAttrs = productAttrs;
-    }
-
-    public static class ProductAttr{
+    @Data
+    @EqualsAndHashCode(callSuper = false)
+    public static class ProductAttr {
         private Long attrId;
         private String attrName;
         private List<String> attrValues;
-
-        public Long getAttrId() {
-            return attrId;
-        }
-
-        public void setAttrId(Long attrId) {
-            this.attrId = attrId;
-        }
-
-        public List<String> getAttrValues() {
-            return attrValues;
-        }
-
-        public void setAttrValues(List<String> attrValues) {
-            this.attrValues = attrValues;
-        }
-
-        public String getAttrName() {
-            return attrName;
-        }
-
-        public void setAttrName(String attrName) {
-            this.attrName = attrName;
-        }
     }
 }