You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
927 B

package com.kelp.business;
import com.kelp.base.Page;
import com.kelp.business.dao.NewsDao;
import com.kelp.business.entity.News;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
@Controller
public class XinWenZhongXin2Controller {
private final String prefix = "business/xinwenzhongxin2";
@Resource
private NewsDao newsDao;
/**
* 新闻中心-安全微服务
*/
@RequestMapping({"/" + prefix})
public String index(Model model, Integer pageNum) {
model.addAttribute("prefix", "/" + prefix);
if (null == pageNum || pageNum < 0) {
pageNum = 1;
}
String type = "2";
Page<News> page = newsDao.getPage(pageNum, 10, type);
model.addAttribute("page", page);
return prefix + "/index";
}
}