亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

mybatis異常

mybatis異常

BIG陽 2018-08-17 10:09:09
xml配置如下:<update id="updateUsers" parameterType="java.util.List"> <foreach collection="users" item="item" index="index" open="" close="" separator=";">update user  <set> parent_id = 0  </set> where id = ${item.id} and bjid = ${item.bjid} and njid = ${item.njid}  </foreach> </update> mapper如下:Integer updateUsers(@Param("users") List<user> users); 調用: userDao.updateUsers(userList); 異常信息如下:org.mybatis.spring.MyBatisSystemException:nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error updating database. Cause: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long\n### The error may involve com.kjm.calm.mmapper.UserDao.updateUserInfo-Inline\n### The error occurred while setting parameters\n### SQL: \n### Cause: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
查看完整描述

1 回答

?
繁星coding

TA貢獻1797條經驗 獲得超4個贊

updateUserInfo中參數類型錯誤,integer轉long報錯,異常中說了


查看完整回答
反對 回復 2018-09-06
  • 1 回答
  • 0 關注
  • 852 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號