simpleJdbcCall调用函数语法

前端之家收集整理的这篇文章主要介绍了simpleJdbcCall调用函数语法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


@H_301_2@

@Bean@H_301_2@

publicSimpleJdbcCallsaveServiceRecord(JdbcTemplatejdbcTemplate){@H_301_2@

@H_301_2@

SimpleJdbcCalljdbcCall=newSimpleJdbcCall(jdbcTemplate).withSchemaName("CRMII")@H_301_2@

.withFunctionName("FUNC_700212").withReturnValue(); 这样子声明,就会把函数返回值放到mapLli@H_301_2@

jdbcCall.addDeclaredParameter(newsqlOutParameter("P_CURSOR",OracleTypes.CURSOR));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_YWLB",Types.BIGINT));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_FWLB",Types.BIGINT));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_FWLBXF",Types.BIGINT));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_ZT",Types.VARCHAR));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_XXNR",Types.VARCHAR));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_FWRY",Types.VARCHAR));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_KHH",Types.VARCHAR));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_CZLX",Types.BIGINT));@H_301_2@

jdbcCall.addDeclaredParameter(newsqlParameter("P_WJDANR",Types.VARCHAR));@H_301_2@

returnjdbcCall;@H_301_2@


@H_301_2@

}@H_301_2@


@H_301_2@

@Override@H_301_2@

publicResponseEntityqueryQuestionOrAnswer(Longywlb,Longfwlb,Longfwlbxf,LongqueryType,Longwjtmid){@H_301_2@

//TODOAuto-generatedmethodstub@H_301_2@

intreturnValue=-1;@H_301_2@

Map<String,Object>returnMap=queryQuestion.execute(ywlb,fwlb,fwlbxf,queryType,wjtmid);@H_301_2@

if(returnMap!=null){@H_301_2@

returnValue=(int)returnMap.get("return"); 获取函数返回值@H_301_2@

if(returnValue==1){@H_301_2@

returnsuccess(returnMap.get("P_CURSOR"));@H_301_2@

}else{@H_301_2@

returnfail("获取问题失败");@H_301_2@

}@H_301_2@

}@H_301_2@

returnnull;@H_301_2@

}@H_301_2@

@H_301_2@

}@H_301_2@ 原文链接:https://www.f2er.com/oracle/211697.html

猜你在找的Oracle相关文章