A.oc_id,
A.todo_id,
A.file_id,
A.task_code,
B.file_title,
B.dir_id,
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 todo_attach
oc_id,
todo_id,
task_code,
file_id,
created_at,
created_by,
#{ocId ,jdbcType=BIGINT},
#{todoId ,jdbcType=BIGINT},
#{taskCode ,jdbcType=VARCHAR},
#{fileId ,jdbcType=BIGINT},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
DELETE FROM todo_attach
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND todo_id = #{todoId ,jdbcType=BIGINT}
AND file_id = #{fileId ,jdbcType=BIGINT}