|
|
@@ -132,7 +132,8 @@ public class PortalNewsController extends BaseController {
|
|
|
if(type ==1) {
|
|
|
Pagination<NewsPortalList> newsList = newsService.portalNewsList(6, 1, 5, null, null, null,2);
|
|
|
News newsDetail = newsService.findNewsDetail(id);
|
|
|
- Object news = newsList.getList().get(0);
|
|
|
+ Object news =null;
|
|
|
+ if(newsList!=null && newsList.getList().size()>0)news= newsList.getList().get(0);
|
|
|
if (null != newsDetail) {
|
|
|
newsDetail.setCreateTimeS(newsDetail.getCreateTime() != null
|
|
|
? DateFormatUtils.format(newsDetail.getCreateTime(), AFTConstants.MMDDYYYY) : "");
|
|
|
@@ -158,6 +159,7 @@ public class PortalNewsController extends BaseController {
|
|
|
}
|
|
|
modelview.addObject("newsDetail", newsDetail);
|
|
|
modelview.addObject("newsList", newsList.getList());
|
|
|
+ if(news!=null)
|
|
|
modelview.addObject("news", news);
|
|
|
|
|
|
}
|