A learn-and-construct framework for general mixed-integer programming problems