|
|
@@ -391,8 +391,14 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- List<Hotel> lh = RandomSelection.getList(iPage.getPageList(), 6);
|
|
|
+ List<Hotel> lh = new ArrayList<>();
|
|
|
+ if (iPage.getPageList()!=null ){
|
|
|
+ if (iPage.getPageList().size()>=6){
|
|
|
+ lh = RandomSelection.getList(iPage.getPageList(), 6);
|
|
|
+ } else {
|
|
|
+ lh = iPage.getPageList();
|
|
|
+ }
|
|
|
+ }
|
|
|
iPage.setPageList(lh);
|
|
|
// 用户访问量数据
|
|
|
userVisitsDao.add(userId);
|