insert into rec_attachment (pid, name, time, sort, url,size)
VALUES
(#{i.pid}, #{i.name}, #{i.time}, #{i.sort}, #{i.url},#{i.size})
delete
from rec_attachment
where 0
and id = #{id}and pid = #{pid}and url = #{url}
delete
from rec_attachment
where url in
#{i}
delete
from rec_attachment
where pid = #{pid}