`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`region_merchant_id`,`is_del`,`create_date`,`update_date`
update wx_merchant_relation
set is_del = 1, update_date = now()
where region_merchant_id = #{regionId}
insert into wx_merchant_relation (id, tenant_id,merchant_id,region_merchant_id,parent_tenant_id)
values
(#{item.id},
#{item.tenantId},
#{item.merchantId},
#{item.regionMerchantId},
#{item.parentTenantId})
update wx_merchant_relation
set is_del = 0,
update_date = now()
where region_merchant_id = #{regionId} and merchant_id in
#{id}
update wx_merchant_relation
set is_del = 1,
update_date = now()
where region_merchant_id = #{regionId} and merchant_id in
#{id}
update wx_merchant_relation
set is_del = 1, update_date = now()
where merchant_id = #{merchantId}