The invention relates to a door lock, which has an open state and a closed state, and comprises a shell, a lock arm, a rocker and a guide pin, wherein an opening for allowing a door hook to go in or out of the shell is arranged in the shell, and the lock arm is arranged in the shell; the front part of the lock arm is provided with a lock groove, and a long hole is arranged between the two ends of the lock arm; a lock tongue is arranged at the upper part of the lock groove, and when the door lock is in the closed state, the lock tongue is inserted into a lock hole in the door hook, and a slope or radian is arranged above the lock tongue; the rocker is arranged in the shell and is provided with a fixed end and a movable end, and the fixed end is rotatably and fixedly arranged in the shell; and the movable end is arranged in the long hole in a sliding way, and the guide pin is arranged at the back part of the lock arm, and moves up, down, back and forth on the guide surface to allow the lock arm to move up, down, back and forth. The door lock can conveniently restore to the normal state in the abnormal closed state. The invention also relates to equipment with the door lock.