package com.huaao.news.action.client; import java.util.Date; import java.util.List; import com.huaao.news.bean.Comments; import com.huaao.news.service.ICommentsService; import com.huaao.news.util.WiterUtil; public class CommentsClientAction { private Comments comments; private ICommentsService commentsService; private List<Comments> list; public void select(){ list = commentsService.selectComments(comments); WiterUtil.witer(list, "comments"); } public void add(){ comments.setCommentsData(new Date()); WiterUtil.response(commentsService.add(comments)+""); } public Comments getComments() { return comments; } public void setComments(Comments comments) { this.comments = comments; } public ICommentsService getCommentsService() { return commentsService; } public void setCommentsService(ICommentsService commentsService) { this.commentsService = commentsService; } }
最近下载更多