List<Integer> listResult = cdao.getSQLManager().executeOnConnection(new OnConnection<List<Integer>>() {
@Override
public List<Integer> call(Connection conn) throws SQLException {
CallableStatement cstmt = conn.prepareCall("{call ntContractDelete(?,?)}");
cstmt.setInt(1, pmcIdParam);//第一个参数
cstmt.registerOutParameter(2, Types.INTEGER); //第二个输出参数,注册下
cstmt.execute();
int iResult = cstmt.getInt(2);
List<Integer> listResult2 = new ArrayList<>(10);
listResult2.add(iResult);
return listResult2;
}
});
返回必须是一个list,带有泛型。 嗯。。。 连接啥的应该不用管吧,嗯,不知道,不研究了,先不管-_-||