@@ -159,4 +159,8 @@ public class BaikeProductVo implements Serializable {
private String shopLogo;
private Integer authUserId;
+ /**
+ * 关联标签库字符串
+ */
+ private String relatedLabels;
}
@@ -80,6 +80,10 @@ public class Article implements Serializable {
* 点赞数量
*/
private Integer likes;
private static final long serialVersionUID = 1L;
@@ -187,6 +187,7 @@ public class ArticleServiceImpl implements ArticleService {
List<Article> relateds = articleDao.getArticleRelatedLimit(id, strings);
relateds.forEach(item -> {
item.setImage(ImageUtil.getImageURL("", item.getImage(), 0, domain));
+ item.setRelatedLabels(item.getRelatedLabels().replaceAll("##",","));
});
return relateds;
@@ -471,6 +471,7 @@ public class ProductServiceImpl implements ProductService {
};
entryInfo.setReferenceList(referenceList);
+ entryInfo.setRelatedLabels(entryInfo.getRelatedLabels().replaceAll("##",","));
return entryInfo;
@@ -151,7 +151,8 @@
a.infoContent as content,
(IFNULL(c.pv, 0) + IFNULL(a.basePv, 0) + IFNULL((c.num + a.basePraise), 0)) as pv,
a.label as label,
- a.typeId as typeId
+ a.typeId as typeId,
+ a.relatedLabels
from info as a
left join info_praise c on a.id = c.infoId
<where>
@@ -158,7 +158,8 @@
p.publishSource,
p.shopId,
p.basePv,
- p.seoKeyword
+ p.seoKeyword,
+ p.relatedLabels
from cm_baike_product p
left join cm_baike_type t on p.typeId=t.id
LEFT JOIN shop s ON p.shopId = s.shopID