select t.*
from talk t
where t.user_id = 2
Union
select t.*
from talk t, user_contact c
where c.user_id = 2 and c.contact_type = 1 and c.be_user_id = t.user_id
it is correct to use Union to write this
then use the left connection and I will not write, no matter how to write, there will be duplicate data