Package com.thinkgem.jeesite.modules.cms.entity

Examples of com.thinkgem.jeesite.modules.cms.entity.Comment


   * 内容评论
   */
  @RequestMapping(value = "comment", method=RequestMethod.GET)
  public String comment(String theme, Comment comment, HttpServletRequest request, HttpServletResponse response, Model model) {
    Page<Comment> page = new Page<Comment>(request, response);
    Comment c = new Comment();
    c.setCategory(comment.getCategory());
    c.setContentId(comment.getContentId());
    c.setDelFlag(Comment.DEL_FLAG_NORMAL);
    page = commentService.find(page, c);
    model.addAttribute("page", page);
    model.addAttribute("comment", comment);
    return "modules/cms/front/themes/"+theme+"/frontComment";
  }
View Full Code Here


  @RequestMapping(value = "comment", method=RequestMethod.POST)
  public String commentSave(Comment comment, String validateCode,@RequestParam(required=false) String replyId, HttpServletRequest request) {
    if (StringUtils.isNotBlank(validateCode)){
      if (ValidateCodeServlet.validate(request, validateCode)){
        if (StringUtils.isNotBlank(replyId)){
          Comment replyComment = commentService.get(replyId);
          if (replyComment != null){
            comment.setContent("<div class=\"reply\">"+replyComment.getName()+":<br/>"
                +replyComment.getContent()+"</div>"+comment.getContent());
          }
        }
        comment.setIp(request.getRemoteAddr());
        comment.setCreateDate(new Date());
        comment.setDelFlag(Comment.DEL_FLAG_AUDIT);
View Full Code Here

  @ModelAttribute
  public Comment get(@RequestParam(required=false) String id) {
    if (StringUtils.isNotBlank(id)){
      return commentService.get(id);
    }else{
      return new Comment();
    }
  }
View Full Code Here

TOP

Related Classes of com.thinkgem.jeesite.modules.cms.entity.Comment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.