Browse Source

标签库的阿里云搜索关联

zhijiezhao 2 years ago
parent
commit
7c43e9cf6d

+ 2 - 0
src/main/java/com/caimei365/commodity/model/search/ArticleDO.java

@@ -43,6 +43,8 @@ public class ArticleDO implements Serializable {
     private Integer[] a_label_ids;
     /** 标签 文本数组 */
     private String[] a_label_text;
+    /** 文章关联标签库标签 */
+    private String a_labels;
 
     private static final long serialVersionUID = 1L;
 }

+ 3 - 3
src/main/java/com/caimei365/commodity/model/search/ProductDO.java

@@ -76,10 +76,10 @@ public class ProductDO implements Serializable {
     private Integer p_promotions_id;
     /**商品类型:0其它类型(默认),1妆字号,2械字号 */
     private Integer p_product_type;
-    /**
-     * 新品状态1.新品
-     */
+    /** 新品状态1.新品 */
     private Integer p_newvalidflag;
+    /** 商品关联标签库标签 */
+    private String p_labels;
 
     private static final long serialVersionUID = 1L;
 }

+ 3 - 1
src/main/resources/mapper/SearchMapper.xml

@@ -27,6 +27,7 @@
         IFNULL(p.visibility,3) as p_visibility,
         ifnull(p.newvalidflag,0) as p_newvalidflag,
         p.productType as p_product_type,
+        p.relatedLabels as p_labels,
         (select unit from cm_sku where productID=#{productId} order by price asc LIMIT 1) as p_unit,
         (select price from cm_sku where productID=#{productId} order by price asc LIMIT 1) as p_price
     </sql>
@@ -225,7 +226,8 @@
         a.label as a_label,
         a.typeId as a_type_id,
         b.name as a_type_text,
-        a.priorityIndex as a_sort
+        a.priorityIndex as a_sort,
+        a.relatedLabels as a_labels
     </sql>
     <sql id="Article_Joins">
         left join info_type b on a.typeId = b.id