Переглянути джерело

新闻分类BUG修复

Signed-off-by: anderx <312518615@qq.com>
anderx 6 роки тому
батько
коміт
5b25ba6b9a

+ 2 - 2
src/main/java/com/kede/common/controller/WebpageController.java

@@ -125,7 +125,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("clist1",customerCaseService.listCustomerCase(ic, 10, 1).getList());
 		modelview.addObject("clist2",customerCaseService.listCustomerCase(ic, 10, 2).getList());
 		//获取公司新闻1个与3个,获取行业新闻3个
-		InputNews in=new InputNews(0,1);
+		InputNews in=new InputNews(0,1,1);
 		List<OutNews>list=(List<OutNews>) newsService.listnewsDetails(in, 4, 1).getList();
 		OutNews gs1=new OutNews();
 		List<OutNews> gs2=new ArrayList<>();
@@ -138,9 +138,9 @@ public class WebpageController extends BaseController {
 				gs2.add(list.get(i));
 			}
 		}
-		in.setType(1);
 		modelview.addObject("gs1", gs1);
 		modelview.addObject("gs2", gs2);
+		in.setType(1);
 		List<OutNews>hy=(List<OutNews>) newsService.listnewsDetails(in, 3, 1).getList();
 		for (OutNews o : hy) {
 			o.setReleaseTimeConvert(DateUtils.formatDate(o.getReleaseTime(), AFTConstants.MMDD));

+ 8 - 2
src/main/java/com/kede/news/bo/InputNews.java

@@ -10,10 +10,16 @@ public class InputNews extends News{
 	public InputNews(Integer id) {
 		this.setId(id);
 	}
-
-	public InputNews(Integer type, Integer status) {
+	/**
+	 * 
+	 * @param type 类型 0公司新闻 1行业新闻
+	 * @param releaseStatus 发布 0否 1是
+	 * @param status 0正常 1首页
+	 */
+	public InputNews(Integer type, Integer releaseStatus, Integer status) {
 		this.setType(type);
 		this.setStatus(status);
+		this.setReleaseStatus(releaseStatus);
 	}
 	public String getReleaseTimes() {
 		return releaseTimes;