需要一个userId 我在Dao层this.getSqlSession().selectOne("userManage.retrieveUserDetail", input);执行前
syso了 input 里面是有userId的 为什么执行的时候userId 是null??
<select id="retrieveUserDetail" parameterType="cdata" resultType="cdata">
<![CDATA[
SELECT u.user_id "userId",
u.user_name "userName",
u.password "password",
u.email "email",
u.phone_no "phoneNo",
u.fax_no "faxNo",
u.create_by "createBy",
u.create_date "createDate",
u.use_flag "useFlag",
u.address "address",
u.dept_id "deptId",
d.DEPT_NAME "deptname",
u.position "position",
u.mobile_no "mobileNo",
u.notes "notes",
u.sub_dept_id "subDeptId",
a.auth_code as "code"
FROM T_user_m u ,t_auth_user a,t_dept_m d
WHERE u.user_id = #{userId} and u.user_id=a.user_id and u.DEPT_ID=d.DEPT_ID
]]>
</select>
syso了 input 里面是有userId的 为什么执行的时候userId 是null??
<select id="retrieveUserDetail" parameterType="cdata" resultType="cdata">
<![CDATA[
SELECT u.user_id "userId",
u.user_name "userName",
u.password "password",
u.email "email",
u.phone_no "phoneNo",
u.fax_no "faxNo",
u.create_by "createBy",
u.create_date "createDate",
u.use_flag "useFlag",
u.address "address",
u.dept_id "deptId",
d.DEPT_NAME "deptname",
u.position "position",
u.mobile_no "mobileNo",
u.notes "notes",
u.sub_dept_id "subDeptId",
a.auth_code as "code"
FROM T_user_m u ,t_auth_user a,t_dept_m d
WHERE u.user_id = #{userId} and u.user_id=a.user_id and u.DEPT_ID=d.DEPT_ID
]]>
</select>
解决方案 »
- 巴巴运动网15集Spring2.5+JPA整合最后去掉DataSoruce配置还是出错!。在线等解决方案
- struts2、Spring3.0、mybatis整合问题,求助~~~~~~~~~求助~~~~~~~~~
- java net url 问题
- struts2参数传递问题
- 请问学习struts2,要学习什么内容,怎么学习比较好上手,有没有什么好的书籍?
- hibernate新手问个简单问题。。。急。。。在线等
- 菜鸟提问拉,快来拿分啊
- eclips+tomcat编写Jsp文件的时候出现这样的错误,请大家帮忙看看啊!!谢谢
- 我想学ofbiz 那位大哥能提供中文资料,我感激不尽
- 想跟大家推荐一本比较不错的书《EJB锦囊妙技》!!!!
- linux下定时自动运行JAVA程序
- spring hibernate BeanNameAutoProxyCreator 没效果
建议参数用Map代替
parameterType="java.util.Map"
该
WHERE u.user_id = #userId# and u.user_id=a.user_id and u.DEPT_ID=d.DEPT_ID
别的地方都是用#{} 或者${}获取的 为什么这就不行了呢。