update mailbox.mail_mark mm set mm.three_dept_id = m.three_dept_id, mm.three_dept_name = m.three_dept_name
    from mailbox.mail m where  m.id = mm.mail_id and mm.three_dept_id is null;

update mailbox.mail_mark mm set mm.completion_time = null where mm.completed = 0;