A refrigerating and freezing device, comprising: a cabinet, wherein at least one storage compartment is defined therein, and a heating cavity configured to contain a to-be-processed object is defined in one of the storage compartments; and an electromagnetic heating device, configured to supply electromagnetic waves into the heating cavity so as to heat the to-be-processed object in the heating cavity, wherein the electromagnetic heating device is provided with an electromagnetic generation module configured to produce an electromagnetic wave signal, wherein a containing groove with an upward opening is provided in a top of the cabinet, the opening of the containing groove is covered with a cover so as to define a containing space between the containing groove and the cover, and heat dissipation holes configured to achieve communication between the containing space and an external environment where the cabinet is located are provided in the cover; and the electromagnetic generation module is disposed in the containing space, and a heat dissipation fan is further provided in the containing space and is configured to drive airflow to flow between the containing space and the external environment where the cabinet is located through the heat dissipation holes, so as to dissipate heat from the electromagnetic generation module, wherein the cover comprises a top wall and a peripheral wall extending downwards from a periphery of the top wall; and the heat dissipation holes comprise a plurality of air inlet holes provided in a first side wall of the peripheral wall and a plurality of air outlet holes provided in a second side wall of the peripheral wall opposite to the first side wall, so as to allow the airflow driven by the heat dissipation fan to enter the containing space through the plurality of air inlet holes and flow out through the plurality of air outlet holes, and thus forced convection heat dissipation is carried out on the electromagnetic generation module, characterized in that the cover further comprises a water retaining rib extending downwards from the top wall thereof and adjacently located on an inner side of the peripheral wall thereof, so as to prevent external water from entering the containing space. a cabinet, wherein at least one storage compartment is defined therein, and a heating cavity configured to contain a to-be-processed object is defined in one of the storage compartments; and an electromagnetic heating device, configured to supply electromagnetic waves into the heating cavity so as to heat the to-be-processed object in the heating cavity, wherein the electromagnetic heating device is provided with an electromagnetic generation module configured to produce an electromagnetic wave signal, wherein a containing groove with an upward opening is provided in a top of the cabinet, the opening of the containing groove is covered with a cover so as to define a containing space between the containing groove and the cover, and heat dissipation holes configured to achieve communication between the containing space and an external environment where the cabinet is located are provided in the cover; and the electromagnetic generation module is disposed in the containing space, and a heat dissipation fan is further provided in the containing space and is configured to drive airflow to flow between the containing space and the external environment where the cabinet is located through the heat dissipation holes, so as to dissipate heat from the electromagnetic generation module, wherein the cover comprises a top wall and a peripheral wall extending downwards from a periphery of the top wall; and the heat dissipation holes comprise a plurality of air inlet holes provided in a first side wall of the peripheral wall and a plurality of air outlet holes provided in a second side wall of the peripheral wall opposite to the first side wall, so as to allow the airflow driven by the heat dissipation fan to enter the containing space through the plurality of air inlet holes and flow out through the plurality of air outlet holes, and thus forced convection heat dissipation is carried out on the electromagnetic generation module, characterized in that the cover further comprises a water retaining rib extending downwards from the top wall thereof and adjacently located on an inner side of the peripheral wall thereof, so as to prevent external water from entering the containing space.