소스 검색

崩溃修复

liliang4869 7 년 전
부모
커밋
9e10583efe

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml

@@ -106,7 +106,7 @@
   	<if test="hot != null">
   		and hot = #{hot,jdbcType=INTEGER}
   	</if>
-  	order by release_time desc
+  	order by release_date desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1057,7 +1057,7 @@
 				group by  seller_id ) o on t.uid=o.seller_id
 	where expert=1
 	and u.status !=1
-	and t.expert_audit =2,
+	and t.expert_audit =2
 	and u.source=0
 	order by u.update_time desc
 	limit #{0}

+ 3 - 1
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -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);
 		
 		}