Dowemo
0 0 0 0

Java code call stored procedure

A stored procedure exists

//调用存储过程执行消费操作
 Map<String, Object> params = new HashMap<String, Object> (); params.put("p_retCode", null); params.put("p_retMsg", null); params.put("p_ORDERNO", null); params.put("P_CARDNO", request.getCardNo().trim()); params.put("P_TRADENO", request.getTradeNo().trim()); params.put("P_CONSUME_TYPE", request.getConsumeType().trim()); params.put("P_CARD_TRADE_NO", "0000"); params.put("P_ICCARD_PARTITION_ID", "2210"); params.put("P_TRADE_CHARGE", request.getTradeMoney()); params.put("P_SAMNO", request.getSamNo().trim()); params.put("P_POSNO", request.getPosNo().trim()); params.put("P_POSTRADENO", request.getPosTradeNo().trim()); params.put("P_ACCT_ID", acctId.trim()); params.put("P_ACCTTYPE", request.getAcctType().trim()); params.put("P_ACCT_ID_PAY", acctId.trim()); params.put("P_PAY_TYPE", 0); tfFCustAcctMapper.custacctConsume(params);
<select id="custacctConsume" statementType="CALLABLE" parameterType="java.util.Map">
{call SP_WS_CreateAcctItemOwe (
 #{p_retCode, mode=OUT,jdbcType=INTEGER},
 #{p_retMsg, mode=OUT,jdbcType=VARCHAR},
 #{p_ORDERNO, mode=OUT,jdbcType=VARCHAR},
 #{P_CARDNO, mode=IN, jdbcType=VARCHAR},
 #{P_TRADENO, mode=IN, jdbcType=VARCHAR},
 #{P_CONSUME_TYPE, mode=IN, jdbcType=VARCHAR},
 #{P_CARD_TRADE_NO, mode=IN, jdbcType=VARCHAR},
 #{P_ICCARD_PARTITION_ID,mode=IN, jdbcType=VARCHAR},
 #{P_TRADE_CHARGE, mode=IN, jdbcType=INTEGER},
 #{P_SAMNO, mode=IN, jdbcType=VARCHAR},
 #{P_POSNO, mode=IN, jdbcType=VARCHAR},
 #{P_POSTRADENO, mode=IN, jdbcType=VARCHAR},
 #{P_ACCT_ID, mode=IN, jdbcType=VARCHAR},
 #{P_ACCTTYPE, mode=IN, jdbcType=VARCHAR},
 #{P_ACCT_ID_PAY, mode=IN, jdbcType=VARCHAR},
 #{P_PAY_TYPE, mode=IN, jdbcType=VARCHAR})}
 </select>

A sp_ws_createacctitemowe is a stored procedure that exists in a database, which calls the relevant stored procedures and performs data queries.
How a specific stored procedure is written, and it isn't a good idea.




Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs