@Mapper
public interface BaseInfoMapper extends BaseMapper<BaseInfo> {
int updateBatch(@Param("list") List<BaseInfo> list);
}
<update id="updateBatch">
update base_info
<trim prefix="set" suffixOverrides=",">
<trim prefix="location_code = case " suffix="end,">
<foreach collection="list" item="i" index="index">
<if test="i.locationCode != null">
when id = #{i.id}
then #{i.locationCode}
</if>
</foreach>
</trim>
<trim prefix="org_full_name = case " suffix="end,">
<foreach collection="list" item="i" index="index">