第一次写博客,将会记录下自己的学习和感悟,可以的话 帮助更多的程序猿攻城狮
mybatis报错:
Caused by: org.apache.ibatis.binding.BindingException: Parameter 'list' not found. Available parameters are [1, 0, param1, param2]
如:public int updateFee(@Param("feeVOList")List<InsuranceFeeDomain> feeVOList,@Param("masterId")String masterId),
与 <foreach collection="feeVOList" item="item" index="index" open="" close="" separator=";"> 中collection对应。
其中:separator是两个sql语句之间的分隔符,如分号位置:update···;update···;update
2、xml中参数的取值方式:#{item.baseMoeny}和${item.baseMoeny}.
前者通过传入参数,如:update ins_xz_data SET xz_be = ? , xz_bf = ? , base_val = ? , tz_xs = ?,
后者直接赋值,如:update ins_xz_data SET xz_be = 1000 , xz_bf = 200 , base_val = 9000 , tz_xs = 9