<insert id="addAttrValueBatch"> <if test="materialCustomerAttrPOS != null and materialCustomerAttrPOS.size>0"> insert into material_customer_attr(core_id,attr_code,attr_value,create_time,create_user,update_time,update_user) values <foreach collection="materialCustomerAttrPOS" item="it" separator=","> (#{it.coreId},#{it.attrCode},#{it.attrValue},now(),#{userId},now(),#{userId}) </foreach> </if> </insert> <update id="updateBatch"> <foreach collection="coreAttrlist" item="bean" index="index" open="" close="" separator=";"> UPDATE material_core_attr <set> name = #{bean.name}, attach_file_ids = #{bean.attachFileIds}, release_time = #{bean.releaseTime}, update_time = now(), update_user = #{userId} </set> <where> id = #{bean.id} </where> </foreach> </update>