Connection con=MIFUWEBDB.jdbc.getConn(); //创建连接
CallableStatement cstmt=con.prepareCall("{call woread_rj_one(?,?,?,?,?,?)}"); //调用,存储过程
cstmt.setString(1,productid);
cstmt.setString(2,wayid); //将第2个参数的值设置成wayid
cstmt.setString(3,orderid);
cstmt.registerOutParameter(4,java.sql.Types.VARCHAR); //第4个占位符为输出,类型是varchar
cstmt.registerOutParameter(5,java.sql.Types.VARCHAR);
cstmt.registerOutParameter(6,java.sql.Types.VARCHAR);
cstmt.execute(); //执行
String status = cstmt.getString(4); //获取返回来的第4个参数,并赋值给status
String reason = cstmt.getString(5);
String mobile = cstmt.getString(6);
if(cstmt!=null){
cstmt.close();
cstmt=null;
}
if(con!=null){
con.close();
con=null;
}