//數據訂正修改類型
update TwmCustomerOperationLogs set type = 2 WHERE customerCode in (SELECT customerCode from (select customerCode from TwmCustomerOperationLogs where operationContent like '%線索%') as twm)
//訂正線索組織
update TwmCustomerOperationLogs tc RIGHT JOIN TwmClew twm on tc.customerCode = twm.clewCode set tc.organizationIds = twm.organizationIds
//訂正客戶組織
update TwmCustomerOperationLogs tc RIGHT JOIN TwmCustomerRecords twm on tc.customerCode = twm.customerCode set tc.organizationIds = twm.organizationIds