Session session = getSession();
ProcedureCall procedureCall = session.createStoredProcedureCall("lingqu");
procedureCall.registerParameter("coupon_id", Integer.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsCoupon().getCouponId()) ;
procedureCall.registerParameter("recipients_name", String.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsName()) ;
procedureCall.registerParameter("recipients_phone", String.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsPhone());
procedureCall.registerParameter("recipients_id", Integer.class, ParameterMode.OUT);
Integer recipients_id = (Integer)procedureCall.getOutputs().getOutputParameterValue("recipients_id");
ProcedureCall procedureCall = session.createStoredProcedureCall("lingqu");
procedureCall.registerParameter("coupon_id", Integer.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsCoupon().getCouponId()) ;
procedureCall.registerParameter("recipients_name", String.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsName()) ;
procedureCall.registerParameter("recipients_phone", String.class, ParameterMode.IN)
.bindValue(recipients.getRecipientsPhone());
procedureCall.registerParameter("recipients_id", Integer.class, ParameterMode.OUT);
Integer recipients_id = (Integer)procedureCall.getOutputs().getOutputParameterValue("recipients_id");