/**
  * 方法描述:修改会员级别配置信息
  *
  * @return
  * @throws Exception
  */
 public String update() throws Exception {
   String mlid = memberlevel.getLevel_id();
   if (ValidateUtil.isDigital(mlid)) {
     return list();
   }
   if (!ValidateUtil.isRequired(nameright)) {
     String menu_right = nameright;
     menu_right = menu_right.replace(" ", "");
     memberlevel.setMenu_right(menu_right);
   } else {
     memberlevel.setMenu_right("");
   }
   String oper_right = this.memberlevel.getOper_right();
   if (oper_right != null && !oper_right.equals("")) {
     oper_right = oper_right.replace(" ", "");
     memberlevel.setOper_right(oper_right);
   }
   if (memberlevel.getModule_attr() != null && !memberlevel.getModule_attr().equals("")) {
     String mod_attr = memberlevel.getModule_attr();
     mod_attr = mod_attr.replace(" ", "");
     memberlevel.setModule_attr(mod_attr);
   }
   // 发布条数信息控制串
   String troStr = backcontrolList();
   this.memberlevel.setNum_control(troStr);
   // 字段验证
   super.commonValidateField(memberlevel);
   if (super.ifvalidatepass) {
     return view();
   }
   this.memberlevelService.update(memberlevel);
   this.addActionMessage("修改会员级别成功");
   return list();
 }
 /**
  * 方法描述:新增会员级别配置
  *
  * @return
  * @throws Exception
  */
 public String insert() throws Exception {
   if (!ValidateUtil.isRequired(memberlevel.getMenu_right())) {
     String menu_right = this.memberlevel.getMenu_right();
     menu_right = menu_right.replace(" ", "");
     memberlevel.setMenu_right(menu_right);
   }
   if (memberlevel.getOper_right() != null && !memberlevel.getOper_right().equals("")) {
     String oper_right = this.memberlevel.getOper_right();
     oper_right = oper_right.replace(" ", "");
     memberlevel.setOper_right(oper_right);
   }
   if (memberlevel.getModule_attr() != null && !memberlevel.getModule_attr().equals("")) {
     String mod_attr = memberlevel.getModule_attr();
     mod_attr = mod_attr.replace(" ", "");
     memberlevel.setModule_attr(mod_attr);
   }
   memberlevel.setSyslevel("1"); // 1:会员自定义级别
   // 发布条数信息控制串
   String troStr = backcontrolList();
   this.memberlevel.setNum_control(troStr);
   // 字段验证
   super.commonValidateField(memberlevel);
   if (super.ifvalidatepass) {
     return add();
   }
   this.memberlevelService.insert(memberlevel);
   this.addActionMessage("新增会员级别成功");
   return add();
 }
  /**
   * 方法描述:新增团购商品表
   *
   * @return
   * @throws Exception
   */
  public String insert() throws Exception {
    // 用于所属分类的回选开始
    loadCategory();
    // 验证分类是选择
    validateCategoryIfSelect();
    // 将处理后的所属分类串注入到buy对象中
    groupgoods.setCat_attr(cat_attr);
    groupgoods.setCust_id(this.session_cust_id);
    groupgoods.setUser_id(this.session_user_id);

    if (groupgoods.getContact_way() != null && !groupgoods.equals("")) {
      String c_way = groupgoods.getContact_way();
      if (validate.isMobile(c_way) && validate.isTelephone(c_way)) {
        this.addFieldError("groupgoods.contact_way", "请输入正确的联系方式");
      }
    }
    // 发布信息数量控制
    if (this.session_cust_type.equals(Constants.MEMBER_TYPE)) {
      if (controlInfoNum()) {
        return add();
      }
    }

    super.commonValidateField(groupgoods);
    if (super.ifvalidatepass) {
      return add();
    }
    this.groupgoodsService.insert(groupgoods);
    this.addActionMessage("新增团购商品表成功!");
    this.groupgoods = null;
    is_crotorl = true;
    return INPUT;
  }
 public void prepare() throws Exception {
   super.saveRequestParameter();
   if (memberlevel == null) {
     memberlevel = new Memberlevel();
   }
   String id = this.memberlevel.getLevel_id();
   if (!ValidateUtil.isDigital(id)) {
     memberlevel = this.memberlevelService.get(id);
   }
 }
 public void prepare() throws Exception {
   super.saveRequestParameter();
   if (groupgoods == null) {
     groupgoods = new Groupgoods();
   }
   String id = this.groupgoods.getGroup_id();
   if (!this.validateFactory.isDigital(id)) {
     groupgoods = this.groupgoodsService.get(id);
   }
 }
  /**
   * 方法描述:修改团购商品表信息
   *
   * @return
   * @throws Exception
   */
  public String update() throws Exception {
    // 将处理后的所属分类串注入到buy对象中
    groupgoods.setCat_attr(cat_attr);
    groupgoods.setCust_id(this.session_cust_id);
    groupgoods.setUser_id(this.session_user_id);
    super.commonValidateField(groupgoods);
    if (super.ifvalidatepass) {
      return view();
    }

    this.groupgoodsService.update(groupgoods);
    this.addActionMessage("修改团购商品表成功!");
    return list();
  }