好文档 - 专业文书写作范文服务资料分享网站

基于MVC的美食点评网站管理系统

天下 分享 时间: 加入收藏 我要投稿 点赞

}

return allUsers;

public void setAllUsers(List allUsers) { this.allUsers = allUsers;

}

public List getAllNewsType() { return allNewsType; }

public void setAllNewsType(List allNewsType) { this.allNewsType = allNewsType; }

public int getNewsID() { return newsID;

}

public void setNewsID(int newsID) { this.newsID = newsID; }

public String getTitle() { return title; }

public void setTitle(String title) { this.title = title; }

public String getContent() { }

return content;

public void setContent(String content) { this.content = content; }

public java.sql.Date getReleaseDate() { return releaseDate; }

public void setReleaseDate(java.sql.Date releaseDate) { this.releaseDate = releaseDate; }

public int getUserID() { return userID;

}

public void setUserID(int userID) { this.userID = userID; }

public int getNewsTypeID() { return newsTypeID; }

public void setNewsTypeID(int newsTypeID) {

this.newsTypeID = newsTypeID;

}

public List getAllNews() { return allNews;

}

public void setAllNews(List allNews) { this.allNews = allNews; }

public int getPageSize() { return pageSize; }

public void setPageSize(int pageSize) { this.pageSize = pageSize; }

public int getPageNow() { return pageNow;

}

public void setPageNow(int pageNow) { this.pageNow = pageNow; }

public int getTotalCount() {

}

return totalCount;

public void setTotalCount(int totalCount) { }

public String createNews(){

HttpSession

session

=

this.totalCount = totalCount;

ServletActionContext.getRequest().getSession();

User user = (User)session.getAttribute(\News news = new News(); news.setTitle(this.title); news.setContent(this.content); news.setReleaseDate(this.releaseDate); news.setUserID(user.getId()); news.setNewsTypeID(this.newsTypeID);

NewsService newsService = new NewsServiceImpl(); newsService.createNews(news); this.allNews

=

newsService.queryAllNews(this.pageSize,

this.pageNow);

for(Iterator it = allNews.iterator();it.hasNext();){

News n = it.next();

User u1 = new UserServiceImpl().queryUser(n.getUserID()); n.setUser(u1); NewsType

newsType

=

new

NewsTypeServiceImpl().queryNewsType(n.getNewsTypeID());

}

public String showNews(){

NewsService newService = new NewsServiceImpl(); News news = newService.queryNews(this.newsID);

User user = new UserServiceImpl().queryUser(news.getUserID()); news.setUser(user); NewsType

newsType

=

new

}

this.totalCount = newsService.queryAllNews().size(); return SUCCESS;

n.setNewsType(newsType);

NewsTypeServiceImpl().queryNewsType(news.getNewsTypeID());

news.setNewsType(newsType);

HttpServletRequest request = ServletActionContext.getRequest(); request.setAttribute(\

this.allUsers = new UserServiceImpl().queryAllUsers(); this.allNewsType

=

new

NewsTypeServiceImpl().queryAllNewsTypes();

}

public String showAllNews(){

return SUCCESS;

基于MVC的美食点评网站管理系统

}returnallUsers;publicvoidsetAllUsers(ListallUsers){this.allUsers=allUsers;}publicListgetAllNewsType(){returnallNewsType;}
推荐度:
点击下载文档文档为doc格式
036w37fgfg0mq5e7e8io
领取福利

微信扫码领取福利

微信扫码分享