当前位置: 代码迷 >> 综合 >> mybatis批量更新
  详细解决方案

mybatis批量更新

热度:22   发布时间:2024-02-07 11:54:59.0
参数为list<update id="updateGys" parameterType="java.util.List"><foreach collection="list" separator=";" item="gys" index="index" open="begin" close=";end;">  update xtxmzbxx<set>gysmc = #{gys.gysmc},zbje=#{gys.zbje,jdbcType=NUMERIC}</set>where zbid = #{gys.zbid}</foreach>
</update>

标红处一定要写,否则会报错:无效字符!

  相关解决方案