mybaties批量更新

<update id="updateParam" parameterType="java.util.List">
            update searchsystemconfigproperties
            <trim prefix="set" suffixOverrides=",">
	             <trim prefix="keyValue = case" suffix="end,">
	                 <foreach collection="parameterList" item="i" index="index">
	                         <if test="i.keyValue!=null and i.keyValue!= '' ">
	                          when keyName=#{i.keyName} then #{i.keyValue}
	                         </if>
	                 </foreach>
	              </trim>
             </trim>
          	 	 where
	         <foreach collection="parameterList" separator="or" item="i" index="index" >
	              keyName=#{i.keyName}
	         </foreach>
	</update>

  

posted @ 2019-01-05 11:39  张永光  阅读(513)  评论(0编辑  收藏  举报