日期:2014-05-18 浏览次数:20751 次
@RequestMapping(value = { "indexInfo" }, method = { RequestMethod.GET,
RequestMethod.POST })
public ModelAndView indexInfo(HttpServletRequest request,
HttpServletResponse response, HttpSession session, ModelMap modelMap)
throws Exception {
List<Map<String, Object>> maps = browseByPicNewsType(7);
StringBuffer sb = new StringBuffer();
StringBuffer sb1 = new StringBuffer();
StringBuffer sb2 = new StringBuffer();
for (Map<String, Object> map : maps) {
sb.append("../");
sb.append(map.get("IMAGEPATH"));
sb.append("|");
sb1.append("../news_pic/picInfo.do?id=");
sb1.append(map.get("ID"));
sb1.append("|");
sb2.append(map.get("TITLE"));
sb2.append("|");
}
modelMap.put("news_pic_imgpath", sb.substring(0, sb.length() - 1));
modelMap.put("news_pic_url", sb1.substring(0, sb1.length() - 1));
modelMap.put("news_pic_title", sb2.substring(0, sb2.length() - 1));
objList = new ArrayList();
HashMap optionMap = new HashMap();
optionMap.put("value", "content");
optionMap.put("text", "文章");
objList.add(optionMap);
optionMap = new HashMap();
optionMap.put("value", "pics");
optionMap.put("text", "图片");
objList.add(optionMap);
// 经信动态
List<Map<String, Object>> jingxindongtai = getAdminService()
.select(
" jxw_news",
"Id, title, content,newType,userName,hints, issueDate,createdate",
"newType=9 order by createdate desc limit 0,9");
modelMap.put("jingxindongtai", jingxindongtai);
// 领导讲话
List<Map<String, Object>> lingdaojianghua = getAdminService()