} 修改Ibatis源码: 在SqlMapExecutor接口中增加如下代码: public abstract SqlMapExecutorDelegate getDelegate();
调用示例: XML:返回一个List<HashMap>类型 <select id="queryBusiTypeBySettleDateAsList" parameterClass="spBalance" resultClass="java.util.HashMap"> select s.applicationtypeid as applicationtypeid,d.pname as busitypename from (select ApplicationTypeID from tb_spbalance where settledate=#settleDate# group by ApplicationTypeID) s,tb_datadict_collection d where d.spbusitype='Mobile' and d.property='BusiType' and s.ApplicationTypeID=d.pvalue order by d.seq asc </select> 代码: @SuppressWarnings("unchecked") public List<List<String>> queryBusiTypeBySettleDateAsList( SPBalance spBalance) { //必须先执行查询方法 List<Map<?, ?>> listMap = sqlClient.queryForList( "queryBusiTypeBySettleDateAsList", spBalance); //然后调用此方法才能获得SQL及字段信息 IbatisSql ibatisSql = IbatisUtil.getIbatisSql("queryBusiTypeBySettleDateAsList", this .getSqlMapClient(), spBalance); return CommonCovert.listMapToList(listMap, ibatisSql); }