注意一定添加open,close等标签
@Update("<script> " +
" <foreach item='item' collection='list' index='index' open='' close=';' separator=';'>" +
" <if test='item.acount!=null and item.acount!=\"\" ' >"+
" update account " +
" set " +
" acount = #{item.acount} " +
" where " +
" age=#{item.age} "+
" </if> " +
" </foreach> " +
" </script>")
void batchUpdateByList(@Param("list")List<Account> list);