<!--批量更新--> <update id="updateCustMoney" parameterType="java.util.List"> <foreach collection="list" item="item" index="index" open="" close="" separator=";"> update pc_cust_money <set> <if test="item.storageAmount!=null and item.storageAmount!=''">storage_amount=${item.storageAmount},</if> <if test="item.alreadyPcMakeTwoafter!=null and item.alreadyPcMakeTwoafter!=''">already_pc_make_twoafter=${item.alreadyPcMakeTwoafter}</if> </set> where table_name= ${item.actualTradingCustomerCode} </foreach> </update> <!--批量新增--> <insert id="insertCustMoney" parameterType="java.util.List"> insert into table_name (actual_trading_customer_code, already_pc_make_twoafter) values <foreach collection="list" item="item" index="index" separator=","> ( #{item.actualTradingCustomerCode}, #{item.alreadyPcMakeTwoafter} ) </foreach> </insert>