mybatis 批量 update 报错,请教大神 50
批量更新-错误信息:org.mybatis.spring.MyBatisSystemException:nestedexceptionisorg.apache.ibati...
批量更新-错误信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'paychnlCode' not found. Available parameters are [list]
批量更新配置:
<update id="updateList" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="begin" close="end;" separator=";">
update T_PAYCHNL_RCNCL_TRANS_LOG
<set>
<if test="paychnlCode != null">
PAYCHNL_CODE = #{item.paychnlCode},
</if>
<if test="rcnclBatchNo != null">
RCNCL_BATCH_NO = #{item.rcnclBatchNo},
</if>
<if test="bizType != null">
BIZ_TYPE = #{item.bizType},
</if>
<if test="operType != null">
OPER_TYPE = #{item.operType},
</if>
<if test="bankNo != null">
BANK_NO = #{item.bankNo},
</if>
...............
...............
<if test="rcnclTime != null">
RCNCL_TIME = #{item.rcnclTime},
</if>
<if test="createTime != null">
CREATE_TIME = #{item.createTime},
</if>
<if test="modifyTime != null">
MODIFY_TIME = #{item.modifyTime},
</if>
<if test="name != null">
NAME = #{item.name},
</if>
<if test="bankCrdNO != null">
BANKCRD_NO = #{item.bankCrdNO},
</if>
</set>
where ID = #{item.id}
</foreach>
</update> 展开
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'paychnlCode' not found. Available parameters are [list]
批量更新配置:
<update id="updateList" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="begin" close="end;" separator=";">
update T_PAYCHNL_RCNCL_TRANS_LOG
<set>
<if test="paychnlCode != null">
PAYCHNL_CODE = #{item.paychnlCode},
</if>
<if test="rcnclBatchNo != null">
RCNCL_BATCH_NO = #{item.rcnclBatchNo},
</if>
<if test="bizType != null">
BIZ_TYPE = #{item.bizType},
</if>
<if test="operType != null">
OPER_TYPE = #{item.operType},
</if>
<if test="bankNo != null">
BANK_NO = #{item.bankNo},
</if>
...............
...............
<if test="rcnclTime != null">
RCNCL_TIME = #{item.rcnclTime},
</if>
<if test="createTime != null">
CREATE_TIME = #{item.createTime},
</if>
<if test="modifyTime != null">
MODIFY_TIME = #{item.modifyTime},
</if>
<if test="name != null">
NAME = #{item.name},
</if>
<if test="bankCrdNO != null">
BANKCRD_NO = #{item.bankCrdNO},
</if>
</set>
where ID = #{item.id}
</foreach>
</update> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询