/** * 添加 * * @param info 信息值 * @return ? > 0 : success; ? < 0 : fail */ public void create(ErrorInfo error) { error.clear(); t_products product = new t_products(); product.is_use = Constants.ENABLE; product.is_agency = Constants.NOT_IS_AGENCY; // product.fee_description = this.feeDescription; // 手续费描述(常量值读取拼接,无需编辑) /* 添加基本信息 */ error.code = this.addOrEdit(product); if (error.code < 0) { error.code = -1; error.msg = error.FRIEND_INFO + "添加基本信息失败!"; return; } /* 添加对应的审核资料 */ error.code = this.addProductAudit(product.id, product.mark); if (error.code < 0) { error.code = -2; error.msg = error.FRIEND_INFO + "添加审核资料失败!"; return; } /* 添加标签和字段 */ error.code = this.addProductLableAndFiled(product.id, error); if (error.code < 0) { error.code = -3; error.msg = error.FRIEND_INFO + "添加产品标签/字段失败!"; return; } /* 添加事件 */ DealDetail.supervisorEvent( Supervisor.currSupervisor().id, SupervisorEvent.CREATE_PRODUCT, "添加产品", error); if (error.code < 0) { JPA.setRollbackOnly(); error.msg = "保存失败!"; return; } }