A.oc_id,
A.wf_ins_id,
A.activity_ins_id,
A.activity_code,
A.file_id,
B.file_title,
B.dir_id,
B.file_icon,
B.file_url,
B.file_ext,
B.file_size,
B.file_author,
B.file_desc,
B.uploaded_by AS uploader_id,
C.account_name AS uploader_name,
B.uploaded_at
INSERT INTO wf_ins_attach
oc_id,
wf_ins_id,
activity_ins_id,
file_id,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{wfInsId ,jdbcType=BIGINT},
#{activityInsId ,jdbcType=BIGINT},
#{fileId ,jdbcType=BIGINT},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
DELETE FROM wf_ins_attach
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND wf_ins_id = #{wfInsId ,jdbcType=BIGINT}
AND file_id = #{fileId ,jdbcType=BIGINT}