It means the end of the matter, the end of the thing that is happening. There is also a deliberate hint of the other meaning of "affair", a romantic involvement, which is related to the significance of the locks, which symbolize the permanence of the relationships of the people attaching the locks.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.