|
@@ -406,9 +406,24 @@ public class ProductServiceImpl implements ProductService {
|
|
|
// entryInfo.setVideoList(videoList);
|
|
|
//信息栏
|
|
|
List<BaikeInfoVo> infoList = baikeDao.getInfoListById(id);
|
|
|
-// for(int i=0;i<infoList.size();i++){
|
|
|
-//
|
|
|
-// }
|
|
|
+ List<List<BaikeInfoVo>> listAll=new ArrayList<>();
|
|
|
+ List<BaikeInfoVo> list=new ArrayList<>();
|
|
|
+ if(null!=infoList&& infoList.size()>0){
|
|
|
+ for(int i=0;i<infoList.size();i++){
|
|
|
+ if(i==infoList.size()-1 && i%2==0){
|
|
|
+ List<BaikeInfoVo> finalList=new ArrayList<>();
|
|
|
+ finalList.add(infoList.get(i));
|
|
|
+ listAll.add(finalList);
|
|
|
+ }else if(i%2==1){
|
|
|
+ list.add(infoList.get(i));
|
|
|
+ listAll.add(list);
|
|
|
+ list=new ArrayList<>();
|
|
|
+ }else if(i==0 || i%2==0){
|
|
|
+ list.add(infoList.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ entryInfo.setInfoListPC(listAll);
|
|
|
entryInfo.setInfoList(infoList);
|
|
|
//正文
|
|
|
List<BaikeTextInfoVo> textInfoListList = baikeDao.getTextInfoListById(id);
|