Exemplo n.º 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";
 }