ibatis调用数据库oracle9i存储过程(带结果集的)出错
我的xml配置是:<sqlMapnamespace="user"><resultMapclass="vo.xt.UserVo"id="uservo"><resultpro...
我的xml配置是:
<sqlMap namespace="user">
<resultMap class="vo.xt.UserVo" id="uservo">
<result property="deptid" column="DEPTID" nullValue="0"/>
<result property="nsrsbh" column="NSRSBH" />
<result property="pass" column="PASS"/>
<result property="postid" column="POSTID" />
<result property="roleid" column="ROLEID" />
<result property="userid" column="USERID" />
<result property="username" column="USERNAME" />
<result property="usertype" column="USERTYPE" />
<result property="swjgdm" column="swjgdm" />
</resultMap>
<parameterMap id="user.selectMenu" class="java.util.HashMap" >
<parameter property="userid" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" />
</parameterMap>
<procedure id="user.selectMenuByRoleIds" parameterMap="user.selectMenu" resultMap="uservo">
{call P_SELECT_MENU_N(?,?)}
</procedure>
</sqlMap>
java代码是
HashMap paras=new HashMap();
para.put("userid", userid);
para.put("userType", "1");
para.put("pass", pass);
return getSqlMapClientTemplate().queryForList("user.selectMenuByRoleIds",paras);
缺啥我还可以传 展开
<sqlMap namespace="user">
<resultMap class="vo.xt.UserVo" id="uservo">
<result property="deptid" column="DEPTID" nullValue="0"/>
<result property="nsrsbh" column="NSRSBH" />
<result property="pass" column="PASS"/>
<result property="postid" column="POSTID" />
<result property="roleid" column="ROLEID" />
<result property="userid" column="USERID" />
<result property="username" column="USERNAME" />
<result property="usertype" column="USERTYPE" />
<result property="swjgdm" column="swjgdm" />
</resultMap>
<parameterMap id="user.selectMenu" class="java.util.HashMap" >
<parameter property="userid" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" />
</parameterMap>
<procedure id="user.selectMenuByRoleIds" parameterMap="user.selectMenu" resultMap="uservo">
{call P_SELECT_MENU_N(?,?)}
</procedure>
</sqlMap>
java代码是
HashMap paras=new HashMap();
para.put("userid", userid);
para.put("userType", "1");
para.put("pass", pass);
return getSqlMapClientTemplate().queryForList("user.selectMenuByRoleIds",paras);
缺啥我还可以传 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询