Ver código fonte

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

JiangChongBo 2 anos atrás
pai
commit
ea8fd6e7bc

+ 10 - 0
src/main/java/com/caimei/www/pojo/baike/BaikeImageVo.java

@@ -13,4 +13,14 @@ public class BaikeImageVo {
      * 图片
      */
     private String image;
+
+    /**
+     * 视频
+     */
+    private String videoUrl;
+
+    /**
+     * 类型 1 图片  2 视频
+     */
+    private Integer type;
 }

+ 15 - 2
src/main/java/com/caimei/www/service/page/impl/ProductServiceImpl.java

@@ -387,10 +387,23 @@ public class ProductServiceImpl implements ProductService {
         BaikeProductVo entryInfo = baikeDao.getEntryInfoById(id);
         //概述图册
         List<BaikeImageVo>  imageListById = baikeDao.getImageListById(id);
-        entryInfo.setImageList(imageListById);
+        if(null!=imageListById&&imageListById.size()>0){
+            for (BaikeImageVo baikeImageVo:imageListById) {
+                baikeImageVo.setType(1);
+            }
+        }
         //视频列表
         List<BaikeVideoVo> videoList = baikeDao.getVideoListById(id);
-        entryInfo.setVideoList(videoList);
+        if(null!=videoList&&videoList.size()>0){
+            for (BaikeVideoVo baikevideo:videoList) {
+                BaikeImageVo img=new BaikeImageVo();
+                img.setType(2);
+                img.setVideoUrl(baikevideo.getOssUrl());
+                imageListById.add(img);
+            }
+        }
+        entryInfo.setImageList(imageListById);
+//        entryInfo.setVideoList(videoList);
         //信息栏
         List<BaikeInfoVo> infoList = baikeDao.getInfoListById(id);
         entryInfo.setInfoList(infoList);