瀏覽代碼

1.3.3采美百科与词条详情功能优化

JiangChongBo 2 年之前
父節點
當前提交
909ab4b2d8

+ 9 - 1
src/main/java/com/caimei/www/pojo/baike/BaikeProductVo.java

@@ -114,7 +114,7 @@ public class BaikeProductVo implements Serializable {
     /**
      * 正文集合
      */
-    private List<BaikeTextInfoVo> textInfoListList;
+    private List<BaikeTextInfoVo> textInfoList;
     /**
      * 参考资料集合
      */
@@ -139,6 +139,14 @@ public class BaikeProductVo implements Serializable {
      * 供应商id,publishSource为2时才有值
      */
     private Integer shopId;
+    /**
+     * 供应商名称,publishSource为2时才有值
+     */
+    private  String shopName;
+    /**
+     * 供应商Log,publishSource为2时才有值
+     */
+    private String shopLogo;
 
     private Integer authUserId;
 }

+ 4 - 1
src/main/java/com/caimei/www/service/page/impl/ProductServiceImpl.java

@@ -406,10 +406,13 @@ public class ProductServiceImpl implements ProductService {
 //        entryInfo.setVideoList(videoList);
         //信息栏
         List<BaikeInfoVo> infoList = baikeDao.getInfoListById(id);
+//        for(int i=0;i<infoList.size();i++){
+//
+//        }
         entryInfo.setInfoList(infoList);
         //正文
         List<BaikeTextInfoVo> textInfoListList = baikeDao.getTextInfoListById(id);
-        entryInfo.setTextInfoListList(textInfoListList);
+        entryInfo.setTextInfoList(textInfoListList);
         //参考资料
         List<CmBaikeReferenceInfo> referenceList = baikeDao.getReferenceListById(id);
         if(referenceList!=null&&referenceList.size()>0){

+ 4 - 0
src/main/resources/mapper/BaikeMapper.xml

@@ -147,12 +147,16 @@
 			p.addTime,
 			p.alias,
 			p.image,
+		    s.name as shopName,
+			p.shopId as shopId,
+			s.logo as shopLogo,
 			t.name as typeName,
 			p.publishSource,
 			p.shopId,
 			p.seoKeyword
 		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
 		where p.id=#{id}
 	</select>