/** * 方法描述:修改会员级别配置信息 * * @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(); }