package com.ruituo.common; import java.util.List; import com.jfinal.core.Controller; import com.ruituo.model.Column; import com.ruituo.model.Theme; import com.ruituo.model.Web; public class WebController extends Controller { /** * 获得网页的基础数据 */ public void getWebData() { setAttr("path", getSession().getServletContext().getContextPath()); // 网站信息 Web web = Web.dao.getWeb(); setAttr("web", web); // 导航信息 List<Column> oneColList = Column.dao.getColumnOneContents( Constant.COLUMN_TYPE_NEWS, Constant.COLUMN_TYPE_PRODUCT); List<Column> twoColList = Column.dao.getColumnTwoContents( Constant.COLUMN_TYPE_NEWS, Constant.COLUMN_TYPE_PRODUCT); setAttr("oneColList", oneColList); setAttr("twoColList", twoColList); // 轮播图信息 List<Theme> topImgList = Theme.dao.getThemeListByColumnId(105); setAttr("topImgList", topImgList); // 手机轮播图信息 List<Theme> MbImgList = Theme.dao.getThemeListByColumnId(105); setAttr("MbImgList", MbImgList); // 微信轮播图信息 List<Theme> WxImgList = Theme.dao.getThemeListByColumnId(105); setAttr("WxImgList", WxImgList); } }
最近下载更多