时间:2021-07-01 10:21:17 帮助过:38人阅读
ibatis调用sqlserver存储过程: order.xml ?xml version=1.0 encoding=UTF-8?!DOCTYPE sqlMapPUBLIC -//iBATIS.com//DTD SQL Map 2.0//ENhttp://www.ibatis.com/dtd/sql-map-2.dtdsqlMaptypeAlias alias=order type=com.xinrui.pojo.Order /parameterMap id=
ibatis调用sqlserver存储过程:
order.xml
public String submit_orders() { HttpServletRequest request = ServletActionContext.getRequest(); Order o = new Order(); o.setPid(10000); o.setNotes("aaaaaaaaaaaaaaa"); o.setNums(121); o.setPrice(123.123); o.setUnit("bbbbbbbbbbbbbb"); o.setProid(10000); orderService.addOrders(o); return new Constant().SUBMITING; }
备注:
1.order.xml中,中的?与parameterMap中的parameter顺序相同;
2.javaType为pojo中的变量属性,jdbcType为数据库中对应字段属性;