<update id="saveOrUpdate" parameterType="java.util.List">
update icp_sale_organ
<trim prefix="set" suffixOverrides=",">
<trim prefix="ORG_LEVEL =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.orgLevel!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.orgLevel}
</if>
</foreach>
</trim>
<trim prefix="ORG_NAME =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.orgName!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.orgName}
</if>
</foreach>
</trim>
<trim prefix="UPPER_CODE =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.upperCode!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.upperCode}
</if>
</foreach>
</trim>
<trim prefix=" ACCOUNT_RATE=case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.accountRate!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.accountRate}
</if>
</foreach>
</trim>
<trim prefix=" DESCRIPTION=case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.description!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.description}
</if>
</foreach>
</trim>
<trim prefix="MODIFY_DATE =case" suffix="end,">
<foreach collection="list" item="i" index="index">
when (ORG_CODE = #{i.orgCode}) then NOW()
</foreach>
</trim>
<trim prefix="MODIFY_USER_CODE =case" suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.modifyUserCode!=null">
when (ORG_CODE = #{i.orgCode}) then #{i.modifyUserCode}
</if>
</foreach>
</trim>
</trim>
where
<foreach collection="list" separator="or" item="i" index="index" >
(ORG_CODE = #{i.orgCode})
</foreach>
</update>