id,tenant_id,parent_tenant_id,
activity_id,legion_id,merchant_id,
union_id,number_range,create_date,update_date
where 1 = 1
and `id` = #{id}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `activity_id` = #{activityId}
and `legion_id` = #{legionId}
and `merchant_id` = #{merchantId}
and `union_id` = #{unionId}
and id in
#{idItem}
order by ${sortColumns}
delete from wx_legion_activity_merchant_config
where `activity_id` = #{activityId}
and `tenant_id` = #{tenantId}
insert into wx_legion_activity_merchant_config
(id,
activity_id,legion_id,merchant_id,
union_id,number_range,create_date,update_date)
values
(#{item.id,jdbcType=BIGINT},
#{item.activityId,jdbcType=BIGINT},#{item.legionId,jdbcType=BIGINT},#{item.merchantId,jdbcType=BIGINT},
#{item.unionId,jdbcType=BIGINT},#{item.numberRange,jdbcType=VARCHAR},#{item.createDate,jdbcType=TIMESTAMP},#{item.updateDate,jdbcType=TIMESTAMP})
delete from wx_legion_activity_merchant_config
where `activity_id` = #{activityId}
and `tenant_id` = #{tenantId}
and id in
#{idItem}