java大神速来解救

Error setting null for parameter #2 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111
; uncategorized SQLException for SQL []; SQL state [99999]; error code [17004]; 无效的列类型: 1111; nested exception is java.sql.SQLException: 无效的列类型: 1111
oracle数据库写的是select 语句
<select id="findUser" parameterType="swust.seclab.domain.User" resultMap="BaseResultUserMap">
SELECT
*
FROM
UserInfo
WHERE
Use_loginname = #{userLoginName}
OR
Use_usercode_fk=#{userCode}
OR
Use_id_pk=#{userId}
</select>
我传人的参数只有loginname有值其他都空,userinfo里面有很多不为空的字段,不过查询应该没影响吧,求大神搞定它

第1个回答  2013-10-08
or 貌似不对吧!应该是and 把 给你个参考!
SELECT COUNT(0)
FROM bi_rental_house tab1,
sm_grid tab2,
(SELECT grid_id
FROM sm_grid
CONNECT BY parent_id = PRIOR grid_id
START WITH grid_id = #{gridId}) gri
WHERE tab1.delete_flg = 0
AND tab1.grid_id = gri.grid_id
AND tab1.grid_id = tab2.grid_id
<if test="minRegistrationDate != null">
AND tab1.registration_date >= #{minRegistrationDate}
</if>
<if test="maxRegistrationDate != null">
AND #{maxRegistrationDate} >= tab1.registration_date
</if>
<if test="rentalHouseNo != null">
AND tab1.rental_house_no LIKE #{rentalHouseNoLike}
</if>
<if test="landlordName != null">
AND tab1.landlord_name LIKE #{landlordNameLike}
</if>
<if test="idCard != null">
AND tab1.id_card LIKE #{idCardLike}
</if>本回答被网友采纳

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网