/**
  * 增加虚拟评论
  *
  * @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";
 }
  /**
   * 更新模板文件和系统内容设定
   *
   * @return
   */
  @Action(
      value = "updateTemplatesetT",
      results = {@Result(name = "json", type = "json")})
  public String updateTemplatesetT() {

    TemplatesetT tst = new TemplatesetT();
    tst.setTsid(this.getTsid());
    tst.setTemplateurl(this.getTemplateurl());
    tst.setSystemcontent(this.getSystemcontent().trim());
    tst.setBuildhtmlpath(this.getBuildhtmlpath());
    tst.setCreatetime(BaseTools.systemtime());
    tst.setCreatorid(BaseTools.adminCreateId());
    tst.setSign(this.getSign());
    // 获取模板主题和状态
    TemplateT tt = new TemplateT();
    tt = this.getTemplateTService().findTemplateBysign(this.getSign(), "1");
    if (tt != null) {
      tst.setThemeid(tt.getThemeid());
      tst.setThemename(tt.getThemename());
      tst.setStatus(tt.getStatus());
    }
    if (this.getTemplatesetTService().updateTemplatesetT(tst) > 0) {
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
 public void findDefaultAllTemplateset() {
   int currentPage = page;
   int lineSize = rp;
   total = this.getTemplatesetTService().countfindAllTemplatesetT(BaseTools.adminCreateId());
   List<TemplatesetT> list =
       this.getTemplatesetTService()
           .findAllTemplatesetT(currentPage, lineSize, BaseTools.adminCreateId());
   if (!list.isEmpty()) {
     this.ProcessTemplatesetTlist(list);
   }
 }
 /**
  * 更新商品类型
  *
  * @return
  */
 @Action(
     value = "updateGoodsTypeTN",
     results = {@Result(name = "json", type = "json")})
 public String updateGoodsTypeTN() {
   GoodsTypeTN gtn = new GoodsTypeTN();
   gtn.setGoodsTypeId(this.getGoodsTypeId().trim());
   gtn.setName(this.getName());
   gtn.setCreatetime(BaseTools.systemtime());
   gtn.setCreatorid(BaseTools.adminCreateId());
   gtn.setGoodsParameter(this.getGoodsParameter());
   @SuppressWarnings("unused")
   int i = this.getGoodsTypeTNService().updateGoodsTypeTN(gtn);
   this.setSucflag(true);
   return "json";
 }
 /**
  * 单个商品评论
  *
  * @param gct
  */
 public void ProcessGoodsCommentListByGoodsid(List<GoodsCommentT> gct) {
   total = this.getGoodsCommentTService().countfindAllGoodsComment();
   for (Iterator<GoodsCommentT> it = gct.iterator(); it.hasNext(); ) {
     GoodsCommentT gctt = (GoodsCommentT) it.next();
     gctt.setState(StaticKey.DataShowState.getName(gctt.getState()));
     if (gctt.getVirtualadd().equals(StaticKey.COMMENT_VIRTUALADD_ONE_NUM)) {
       gctt.setVirtualadd(StaticKey.COMMENT_VIRTULADD);
     } else {
       gctt.setVirtualadd(StaticKey.COMMENT_NOTVIRTULADD);
     }
     if (gctt.getReplyorcomment().equals(StaticKey.COMMENT_REPLY_ONE_NUM)) {
       gctt.setReplyorcomment(StaticKey.COMMENT_REPLY_ONE);
     } else {
       gctt.setReplyorcomment(StaticKey.COMMENT_REPLY_TWO);
     }
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", gctt.getCommentid());
     cellMap.put(
         "cell",
         new Object[] {
           gctt.getCommentcontent(),
           gctt.getReplyorcommentusername(),
           gctt.getScore(),
           gctt.getReplyorcomment(),
           gctt.getVirtualadd(),
           gctt.getState(),
           BaseTools.formateDbDate(gctt.getPosttime()),
           "<a id='goodscommentdetail' href='goodscommentdetail.jsp?operate=editdetail&commentid="
               + gctt.getCommentid()
               + "' name='goodscommentdetail'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
 public void findDefaultAllSiteNavigation() {
   int currentPage = page;
   int lineSize = rp;
   total = this.getSiteNavigationTService().countfindAllSiteNavigationT(BaseTools.adminCreateId());
   if (Validate.StrNotNull(getSortname()) && Validate.StrNotNull(getSortorder())) {
     String queryString =
         "from SiteNavigationT as st where st.creatorid=:creatorid order by "
             + getSortname()
             + " "
             + getSortorder()
             + "";
     List<SiteNavigationT> list =
         this.getSiteNavigationTService()
             .sortAllSiteNavigationT(
                 currentPage, lineSize, BaseTools.adminCreateId(), queryString);
     if (list != null) {
       this.ProcessSiteNavigationList(list);
     }
   }
 }
  /**
   * 增加导航
   *
   * @return
   */
  @Action(
      value = "addSiteNavigationT",
      results = {@Result(name = "json", type = "json")})
  public String addSiteNavigationT() {

    SiteNavigationT sn = new SiteNavigationT();
    sn.setSnid(this.getSerial().Serialid(Serial.SITENAVIGATION));
    sn.setIsTargetBlank(this.getIsTargetBlank());
    sn.setIsVisible(this.getIsVisible());
    sn.setName(this.getName());
    sn.setPosition(this.getPosition());
    sn.setCreatetime(BaseTools.systemtime());
    sn.setCreatorid(BaseTools.adminCreateId());
    sn.setHtmlPath(this.getHtmlPath());
    sn.setSort(Integer.parseInt(this.getSort()));
    sn.setSign(this.getSign());
    this.getSiteNavigationTService().save(sn);
    // 这里需要对应模板生成静态页面
    this.setSucflag(true);
    return "json";
  }
 /**
  * 增加商品类型
  *
  * @return
  */
 @Action(
     value = "addGoodsTypeTN",
     results = {@Result(name = "json", type = "json")})
 public String addGoodsTypeTN() {
   if (Validate.StrisNull(this.getName())) {
     this.setSucflag(true);
     return "json";
   }
   List<GoodsTypeTN> list = this.getGoodsTypeTNService().findGoodsTypeTNByName(this.getName());
   if (list.isEmpty()) {
     GoodsTypeTN gtn = new GoodsTypeTN();
     gtn.setGoodsTypeId(this.getSerial().Serialid(Serial.GOODSTYPE));
     gtn.setName(this.getName().trim());
     gtn.setCreatetime(BaseTools.systemtime());
     gtn.setCreatorid(BaseTools.adminCreateId());
     gtn.setGoodsParameter(this.getGoodsParameter());
     this.getGoodsTypeTNService().save(gtn);
     this.setSucflag(true);
     return "json";
   }
   return "json";
 }
示例#9
0
 /**
  * 增加角色
  *
  * @return
  */
 @Action(
     value = "addRoleM",
     results = {@Result(name = "json", type = "json")})
 public String addRoleM() {
   RoleM rm = new RoleM();
   rm.setId(this.getSerial().Serialid(Serial.ROLE));
   rm.setRolename(this.getRolename());
   rm.setNote(this.getNote());
   rm.setCreatetime(BaseTools.systemtime());
   this.getRoleMService().save(rm);
   this.getRoleFunctionMService().addRoleFunctionM(rm, this.getFunctionid().trim());
   this.setSucflag(true);
   return "json";
 }
示例#10
0
 /**
  * 更新功能
  *
  * @return
  */
 @Action(
     value = "updateFunctionM",
     results = {@Result(name = "json", type = "json")})
 public String updateFunctionM() {
   bean.setId(this.getId());
   bean.setFunctionname(this.getFunctionname());
   bean.setVisitmethodname(this.getVisitmethodname());
   bean.setVisiturl(this.getVisiturl());
   bean.setModuleid(this.getModuleid());
   bean.setCreatetime(BaseTools.systemtime());
   this.getFunctionMService().updateFunctionM(bean);
   this.setSucflag(true);
   return "json";
 }
 /**
  * 更新导航
  *
  * @return
  */
 @Action(
     value = "updateSiteNavigationT",
     results = {@Result(name = "json", type = "json")})
 public String updateSiteNavigationT() {
   SiteNavigationT sn = new SiteNavigationT();
   sn.setSnid(this.getSnid());
   sn.setIsTargetBlank(this.getIsTargetBlank());
   sn.setIsVisible(this.getIsVisible());
   sn.setName(this.getName());
   sn.setPosition(this.getPosition());
   sn.setCreatetime(BaseTools.systemtime());
   sn.setCreatorid(BaseTools.adminCreateId());
   sn.setHtmlPath(this.getHtmlPath());
   sn.setSort(Integer.parseInt(this.getSort()));
   sn.setSign(this.getSign());
   if (this.getSiteNavigationTService().updateSiteNavigationT(sn) > 0) {
     // 更新模板页面数据
     this.setSucflag(true);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
示例#12
0
 /**
  * 增加新用户
  *
  * @return
  */
 @Action(
     value = "register",
     results = {
       @Result(name = "register_success", type = "redirect", location = "/index.html"),
       @Result(
           name = "register_error",
           type = "redirect",
           location = "/html/default/shop/user/register.html?msg=${msg}"),
       @Result(
           name = "useractivates",
           type = "redirect",
           location = "/html/default/shop/user/register.html?msg=${msg}")
     })
 public String register() {
   if (registervalidation()) {
     String rand = (String) ActionContext.getContext().getSession().get("rand");
     String userstate = (String) ActionContext.getContext().getSession().get("userstate");
     if (rand.equals(this.getRand())) {
       List<MemberT> m1 = this.getMemberTService().findMemberTByloginname(this.getLoginname());
       if (m1 != null && m1.size() == 0) {
         this.setMsg("4");
         return "register_error";
       }
       List<MemberT> m2 =
           this.getMemberTService().findMemberTByemail(this.getEmail().trim()); // 新增根据邮箱差信息
       if (m2 != null && m2.size() == 0) {
         this.setMsg("7");
         return "register_error";
       }
       MD5Code md5 = new MD5Code();
       MemberT m = new MemberT();
       m.setId(this.getSerial().Serialid(Serial.MEMBER));
       m.setMid(md5.getMD5ofStr(m.getId()));
       m.setLoginname(this.getLoginname().trim());
       m.setLoginpwd(md5.getMD5ofStr(this.getLoginpwd().trim()));
       m.setNick(this.getNick().trim());
       m.setMemberstate(StaticKey.MEMBERSTATE_ZERO_NUM);
       m.setHeadpath("#");
       m.setCreatetime(BaseTools.systemtime());
       m.setVersiont(1);
       m.setUpdatetime(m.getCreatetime());
       this.getMemberTService().save(m);
       return "register_success";
     }
   } else {
     return "register_error";
   }
   return "register_error";
 }
示例#13
0
 /**
  * 增加可访问的功能路径或方法
  *
  * @return
  */
 @Action(
     value = "addFunctionM",
     results = {@Result(name = "json", type = "json")})
 public String addFunctionM() {
   FunctionM fm = new FunctionM();
   fm.setId(this.getSerial().Serialid(Serial.FUNCTION));
   fm.setFunctionname(this.getFunctionname());
   fm.setVisitmethodname(this.getVisitmethodname());
   fm.setVisiturl(this.getVisiturl());
   fm.setModuleid(this.getModuleid());
   fm.setCreatetime(BaseTools.systemtime());
   this.getFunctionMService().save(fm);
   this.setSucflag(true);
   return "json";
 }
  /**
   * 更新商品参数
   *
   * @return
   */
  @Action(
      value = "updateGoodsAttributeT",
      results = {@Result(name = "json", type = "json")})
  public String updateGoodsAttributeT() {
    JSONArray ja = (JSONArray) JSONValue.parse(this.getRjson());
    int jsonsize = ja.size();
    GoodsAttributeT gat = new GoodsAttributeT();
    for (int i = 0; i < jsonsize; i++) {
      gat.setCreatetime(BaseTools.systemtime());
      gat.setState(StaticKey.ONE);
      gat.setCreatorid(BaseTools.adminCreateId());
      gat.setGoodsTypeId(this.getGoodsTypeId());
      gat.setGoodsTypeName(this.getGoodsTypeName());
      gat.setAttributeIndex(this.getAttributeIndex());
      JSONObject jo = (JSONObject) ja.get(i);

      gat.setGoodsattributename(jo.get(StaticKey.GOODSATTRIBUTENAME).toString());

      gat.setAttributeType(jo.get(StaticKey.ATTRIBUTETYPE).toString());

      gat.setAttributelist(jo.get(StaticKey.ATTRIBUTELIST).toString());

      gat.setSort(jo.get(StaticKey.SORT).toString());

      gat.setGoodsattributeid(jo.get(StaticKey.GOODSATTRIBUTEID).toString());

      if (gat.getGoodsattributeid().length() == 0) {
        gat.setGoodsattributeid(this.getSerial().Serialid(Serial.GOODSATTRIBUTE));
        this.getGoodsAttributeTService().save(gat);
      } else {
        this.getGoodsAttributeTService().updateGoodsAttributeT(gat);
      }
    }
    this.setSucflag(true);
    return "json";
  }
 /**
  * 更新商品评论
  *
  * @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";
 }
示例#16
0
 public void ProcessGoodsTypeTNList(List<GoodsTypeTN> list) {
   for (Iterator<GoodsTypeTN> it = list.iterator(); it.hasNext(); ) {
     GoodsTypeTN gtn = (GoodsTypeTN) it.next();
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", gtn.getGoodsTypeId());
     cellMap.put(
         "cell",
         new Object[] {
           gtn.getName(),
           BaseTools.formateDbDate(gtn.getCreatetime()),
           "<a id='editegoodstypetn' name='editegoodstypetn' href='goodstypetn.jsp?operate=edit&folder=goods&goodsTypeId="
               + gtn.getGoodsTypeId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
 public void ProcessSiteNavigationList(List<SiteNavigationT> list) {
   rows.clear();
   for (Iterator<SiteNavigationT> it = list.iterator(); it.hasNext(); ) {
     SiteNavigationT sn = (SiteNavigationT) it.next();
     if (sn.getIsTargetBlank().equals("1")) {
       sn.setIsTargetBlank(
           "<span class='truestatue'><img width='20px' height='20px' src='../ui/assets/img/header/icon-48-apply.png'/></span>");
     } else {
       sn.setIsTargetBlank(
           "<span class='falsestatue'><img width='20px' height='20px' src='../ui/assets/img/header/icon-48-deny.png'/></span>");
     }
     if (sn.getIsVisible().equals(StaticKey.ONE)) {
       sn.setIsVisible(
           "<span class='truestatue'><img width='20px' height='20px' src='../ui/assets/img/header/icon-48-apply.png'/></span>");
     } else {
       sn.setIsVisible(
           "<span class='falsestatue'><img width='20px' height='20px' src='../ui/assets/img/header/icon-48-deny.png'/></span>");
     }
     if (sn.getPosition().equals(StaticKey.ONE)) {
       sn.setPosition("页面上部");
     } else if (sn.getPosition().equals(StaticKey.TWO)) {
       sn.setPosition("页面中部");
     } else {
       sn.setPosition("页面下部");
     }
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", sn.getSnid());
     cellMap.put(
         "cell",
         new Object[] {
           sn.getName(),
           sn.getPosition(),
           sn.getSign(),
           sn.getSort(),
           sn.getIsTargetBlank(),
           sn.getIsVisible(),
           BaseTools.formateDbDate(sn.getCreatetime()),
           sn.getCreatorid(),
           "<a id='editsitenavigation' href='sitenavigation.jsp?operate=edit&folder=pagecontent&snid="
               + sn.getSnid()
               + "' name='editsitenavigation'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
示例#18
0
 public void ProcessRoleMList(List<RoleM> list) {
   for (Iterator<RoleM> it = list.iterator(); it.hasNext(); ) {
     RoleM rm = (RoleM) it.next();
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", rm.getId());
     cellMap.put(
         "cell",
         new Object[] {
           rm.getRolename(),
           rm.getNote(),
           BaseTools.formateDbDate(rm.getCreatetime()),
           "<a id='editrole' name='editrole' href='role.jsp?operate=edit&folder=setting&id="
               + rm.getId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
示例#19
0
 public void ProcessFunctionMList(List<FunctionM> list) {
   for (Iterator<FunctionM> it = list.iterator(); it.hasNext(); ) {
     FunctionM fm = (FunctionM) it.next();
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", fm.getId());
     cellMap.put(
         "cell",
         new Object[] {
           fm.getFunctionname(),
           fm.getVisiturl(),
           fm.getVisitmethodname(),
           BaseTools.formateDbDate(fm.getCreatetime()),
           "<a id='editfunction' name='editfunction' href='function.jsp?operate=edit&folder=setting&id="
               + fm.getId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
 /** 获取所有模板文件路径 */
 @Action(
     value = "getAllTemplate",
     results = {@Result(name = "json", type = "json")})
 public String getAllTemplate() {
   List<TemplateT> list =
       this.getTemplateTService().findAllTemplateWithNoParam(BaseTools.adminCreateId(), "1");
   if (list != null) {
     this.setTemplatestrs("");
     this.setTemplatestrs("<option value='-1'>---请选择---</option>");
     for (Iterator<TemplateT> it = list.iterator(); it.hasNext(); ) {
       TemplateT tt = (TemplateT) it.next();
       this.templatestrs +=
           "<option value='" + tt.getUrl() + "," + tt.getSign() + "'>" + tt.getUrl() + "</option>";
     }
     this.setSucflag(true);
     return "json";
   }
   this.setSucflag(false);
   return "json";
 }
 public void ProcessGoodsAttributeTList(List<GoodsAttributeT> list) {
   rows.clear();
   for (Iterator<GoodsAttributeT> it = list.iterator(); it.hasNext(); ) {
     GoodsAttributeT gat = (GoodsAttributeT) it.next();
     if (StaticKey.ZERO.equals(gat.getAttributeType())) {
       gat.setAttributeType(StaticKey.SELECTITEM);
     } else {
       gat.setAttributeType(StaticKey.INPUTITEM);
     }
     if (StaticKey.ONE.equals(gat.getIssearch())) {
       gat.setIssearch(StaticKey.SUPPORT);
     } else {
       gat.setIssearch(StaticKey.UNSUPPORT);
     }
     if (StaticKey.ONE.equals(gat.getIssametolink())) {
       gat.setIssametolink(StaticKey.SUPPORT);
     } else {
       gat.setIssametolink(StaticKey.UNSUPPORT);
     }
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", gat.getGoodsattributeid());
     cellMap.put(
         "cell",
         new Object[] {
           gat.getGoodsattributename(),
           gat.getAttributeType(),
           gat.getAttributelist(),
           gat.getSort(),
           gat.getGoodsTypeName(),
           gat.getIssearch(),
           gat.getIssametolink(),
           BaseTools.formateDbDate(gat.getCreatetime()),
           "<a id='editgoodsattribute' name='editgoodsattribute' href='goodsattribute.jsp?operate=edit&folder=goods&goodsTypeName="
               + gat.getGoodsTypeName()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
 public void ProcessTemplatesetTlist(List<TemplatesetT> list) {
   rows.clear();
   for (Iterator<TemplatesetT> it = list.iterator(); it.hasNext(); ) {
     TemplatesetT tst = (TemplatesetT) it.next();
     tst.setStatus(StaticKey.DataUsingState.getName(tst.getStatus()));
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", tst.getTsid());
     cellMap.put(
         "cell",
         new Object[] {
           tst.getThemename(),
           tst.getSystemcontent(),
           tst.getSign(),
           tst.getStatus(),
           tst.getTemplateurl(),
           tst.getBuildhtmlpath(),
           BaseTools.formateDbDate(tst.getCreatetime()),
           "<a  id='edittemplateset' href='templateset.jsp?operate=edit&folder=setting&tsid="
               + tst.getTsid()
               + "' name='edittemplateset'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
  /**
   * 获取模板文件和系统内容的输出路径
   *
   * @return
   */
  @Action(
      value = "getTemplateOutHtmlPath",
      results = {@Result(name = "json", type = "json")})
  public String getTemplateOutHtmlPath() {

    List<TemplatesetT> list =
        this.getTemplatesetTService().findAllTemplatesetWithNoParam(BaseTools.adminCreateId());
    if (list != null) {
      this.setTemplatesetstrs("<option value='-1'>---请选择---</option>");
      for (Iterator<TemplatesetT> it = list.iterator(); it.hasNext(); ) {
        TemplatesetT tst = (TemplatesetT) it.next();
        this.templatesetstrs +=
            "<option value='"
                + tst.getBuildhtmlpath()
                + "'>"
                + tst.getSystemcontent()
                + "</option>";
      }
      this.setSucflag(true);
      return "json";
    }
    this.setSucflag(false);
    return "json";
  }
示例#24
0
  /**
   * 增加商品到购物车
   *
   * @return
   */
  @Action(
      value = "addGroupCart",
      results = {@Result(name = "json", type = "json")})
  public String addGroupCart() {
    UserT user = (UserT) ActionContext.getContext().getSession().get(StaticKey.MEMBER_SESSION_KEY);
    if (user != null) {

      GoodsGroupT ggt = this.GetGoodsGroupTForGroupCart();
      GroupCartT gct = new GroupCartT();
      gct.setId(this.getSerial().Serialid(serial.GROUPCARTINFO));
      gct.setCartid(this.getSerial().Serialid(serial.GROUPCART));
      gct.setOrderid(null);
      gct.setGoodsid(ggt.getGroupid());
      gct.setUserid(user.getUserid());
      gct.setUsername(user.getUsername());
      gct.setUsersetnum("0");
      gct.setNeedquantity(1);
      gct.setPrice(ggt.getMemberprice());
      gct.setGroupprice(ggt.getGroupprice());
      gct.setChangeprice(0.0);
      gct.setPoints(ggt.getSendpoint());
      gct.setSubtotal(this.getNeedquantity() * ggt.getGroupprice());
      gct.setAddtime(BaseTools.systemtime());
      gct.setQuantity(ggt.getSalequantity());
      gct.setPicture(ggt.getPictureurl());
      gct.setWeight("0");
      gct.setState("1");
      gct.setHtmlpath(ggt.getHtmlpath());
      gct.setProductid("0");
      gct.setGoodsname(ggt.getGoodsname());
      this.getGroupCartService().save(gct);
      this.setSucflag(true);
      return "json";
    }
    return "json";
  }
 /**
  * 获取系统内容,包含文章分类,和商品分类的预先读取,可能还有更多的内容,或许会做一个更加多选的页面来描述系统内容,让后绑定模板
  *
  * @return
  */
 @Action(
     value = "findSystemcontent",
     results = {@Result(name = "json", type = "json")})
 public String findSystemcontent() {
   List<GoodsCategoryT> gclist =
       this.getGoodsCategoryTService().findAllGoodsCategoryBycreatorid(BaseTools.adminCreateId());
   List<ArticleCategoryT> aclist =
       this.getArticleCategoryTService()
           .findAllArticleCategoryBycreatorid(BaseTools.adminCreateId());
   // 组织商品分类的所有信息
   this.setSyscontentstrs("");
   this.setSyscontentstrs(
       "<option value='-1'>---请选择---</option><option value='0'>--自定义系统内容--</option><option value='1'>--以下是所创建的商品分类--</option>");
   if (!gclist.isEmpty()) {
     for (Iterator<GoodsCategoryT> it = gclist.iterator(); it.hasNext(); ) {
       GoodsCategoryT gct = (GoodsCategoryT) it.next();
       if (gct.getGrade().equals("0")) {
         this.syscontentstrs +=
             "<option value='"
                 + gct.getGoodsCategoryTid()
                 + ","
                 + gct.getSign()
                 + "'>"
                 + gct.getName()
                 + "</option>";
       } else if (gct.getGrade().equals("1")) {
         this.syscontentstrs +=
             "<option value='"
                 + gct.getGoodsCategoryTid()
                 + ","
                 + gct.getSign()
                 + "'>&nbsp;&nbsp;"
                 + gct.getName()
                 + "</option>";
       } else {
         this.syscontentstrs +=
             "<option value='"
                 + gct.getGoodsCategoryTid()
                 + ","
                 + gct.getSign()
                 + "'>&nbsp;&nbsp;&nbsp;"
                 + gct.getName()
                 + "</option>";
       }
     }
   }
   if (!aclist.isEmpty()) {
     this.syscontentstrs += "<option value='2'>--以下是所创建的文章分类--</option>";
     for (Iterator<ArticleCategoryT> it = aclist.iterator(); it.hasNext(); ) {
       ArticleCategoryT act = (ArticleCategoryT) it.next();
       if (act.getGrade().equals("0")) {
         this.syscontentstrs +=
             "<option value='"
                 + act.getArticleCategoryTid()
                 + ","
                 + act.getSign()
                 + "'>"
                 + act.getName()
                 + "</option>";
       } else if (act.getGrade().equals("1")) {
         this.syscontentstrs +=
             "<option value='"
                 + act.getArticleCategoryTid()
                 + ","
                 + act.getSign()
                 + "'>&nbsp;&nbsp;"
                 + act.getName()
                 + "</option>";
       } else {
         this.syscontentstrs +=
             "<option value='"
                 + act.getArticleCategoryTid()
                 + ","
                 + act.getSign()
                 + "'>&nbsp;&nbsp;&nbsp;"
                 + act.getName()
                 + "</option>";
       }
     }
   }
   this.setSucflag(true);
   return "json";
 }