创建
CREATE OR REPLACE
PROCEDURE P_PRICE_METHOD_ADG(IN_ID IN VARCHAR2,
IN_NAME IN VARCHAR2
) IS
BEGIN
update T_FOMF_SUPPER_PRICE_METHOD_AD set FORMULA = IN_NAME where ID = IN_ID;
COMMIT;
END P_PRICE_METHOD_ADG;
调用
call P_PRICE_METHOD_ADG('99ae32c08af549818cf7d9be71bd3b95','w*910030');
exec P_PRICE_METHOD_ADG('99ae32c08af549818cf7d9be71bd3b95','w*900');
java代码
@Override
public void callProcedure() throws Exception {
Map<String, String> params = ListAndTimeUtil.getTimeDay();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date accountTime = sdf.parse(params.get("firstDay"));
params.put("billTable", FinCollectCancelConfirmCommonUtil.getTableBillName(accountTime));
params .put("finTable",FinCollectCancelConfirmCommonUtil.getConfirmTableName(accountTime));
finCollectCancelConfirmDao.callProcedure(params);
}
void callProcedure(Map<String, String> params);
<select id="callProcedure" statementType="CALLABLE" parameterType="hashmap">
<![CDATA[
{ call P_FIN_COLLECT_CANCEL_BILL_IMMI(#{finTable,jdbcType=VARCHAR},
#{billTable,jdbcType=VARCHAR},
to_date(#{firstDay,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss'),
to_date(#{lastDay,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss')
) }
]]>
</select>
jobs
declare
MOVE03 number;
begin
dbms_job.submit(MOVE03,what => 'begin P_PRICE_METHOD_ADD(1,2); end;', next_date => to_date('20180914 21:54:01', 'yyyymmdd hh24:mi:ss'), interval => 'SYSDATE + 1');
commit;
end;