Пример #1
0
 /**
  * 增加虚拟评论
  *
  * @return
  */
 @Action(
     value = "addvirtualGoodsComment",
     results = {@Result(name = "json", type = "json")})
 public String addvirtualGoodsComment() {
   if (StringUtils.isBlank(this.getGoodsid())) {
     return "json";
   }
   GoodsCommentT gct = new GoodsCommentT();
   gct.setCommentid(this.getSerial().Serialid(Serial.GOODSCOMMENT));
   gct.setGoodsid(this.getGoodsid().trim());
   gct.setGoodsname(this.getGoodsname().trim());
   gct.setReplyorcommentusername(this.getReplyorcommentusername());
   gct.setReplyorcommentuserid(BaseTools.adminCreateId());
   gct.setPosttime(BaseTools.systemtime());
   gct.setCommentcontent(this.getCommentcontent());
   gct.setScore(this.getScore());
   gct.setState(StaticKey.COMMENT_STATE_ONE_NUM);
   gct.setReplyorcomment(StaticKey.COMMENT_REPLY_TWO_NUM);
   gct.setReplyid(StaticKey.COMMENT_DEFAULT_REPLYID);
   gct.setEmailable(StaticKey.COMMENT_EMAILABLE_ONE_NUM);
   gct.setVirtualadd(StaticKey.COMMENT_VIRTUALADD_ONE_NUM);
   this.getGoodsCommentTService().save(gct);
   this.setSucflag(true);
   return "json";
 }
Пример #2
0
 /**
  * 更新商品评论
  *
  * @return
  */
 @Action(
     value = "updateGoodsComment",
     results = {@Result(name = "json", type = "json")})
 public String updateGoodsComment() {
   if (StringUtils.isBlank(this.getCommentid())) {
     return "json";
   }
   bean = this.getGoodsCommentTService().findGoodsCommentById(this.getCommentid());
   bean.setReplyorcommentusername(this.getReplyorcommentusername());
   bean.setReplyorcommentuserid(BaseTools.adminCreateId());
   bean.setCommentcontent(this.getCommentcontent());
   bean.setScore(this.getScore());
   this.getGoodsCommentTService().updateGoodsComment(bean);
   // this.setSucflag(true);
   return "json";
 }