
Mybaits 中调用数据库函数的方法
配置文件中 <select id="getObjectId" statementType="CALLABLE" parameterType="java.util.Map"> {#{dalsh,mode=OUT,jdbcType=VARCHAR} = call BUSINESS.getdalsh(#{glbm,mode=IN,jdbcType=VARCHAR})} </select> 方法中这样写 @SuppressWarnings("unchecked") public String getObjectId(String glbm) { // TODO Auto-generated method stub Map map = new HashMap(); map.put("dalsh", ""); map.put("glbm", glbm); this.getObject(map, NewArchivesWhat.getObjectId);//我的方法是经过封装的 如果您未封装 就直接把map写未参数 return (String)map.get("dalsh"); }
👁️ 阅读量:0
© 版权声明:本文《Mybaits 中调用数据库函数的方法》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686493469a269265.html。