A generator, comprising an active cooling circuit and a passive cooling circuit which are isolated from each other, wherein the active cooling circuit is in communication with a closed space, and the passive cooling circuit is in communication with an external environment; wherein the active cooling circuit comprises mutually communicating chambers (11a, 11b) located at two axial ends of the generator, an air gap between a rotor and a stator of the generator, and radial channels spaced apart along an axial direction of the stator, and a cooling device in communication with the closed space is provided in the active cooling circuit, and the stator is fixed on a fixed shaft through a stator bracket; wherein the passive cooling circuit comprises a first axial channel running through the stator in the axial direction, a second axial channel running through the stator bracket, and an outer surface of the generator; wherein a heat exchanger is further arranged inside the generator, the heat exchanger is in communication with the radial channels and the second axial channel, respectively; and wherein the stator comprises a plurality of iron core assemblies arranged at intervals along the axial direction, the radial channels are formed between every two adjacent iron core assemblies; the first axial channel comprises stator axial channels running through the plurality of iron core assemblies along the axial direction, each of the iron core assemblies comprises a yoke portion and a tooth portion integrally formed with the yoke portion, a plurality of tooth grooves arranged at intervals in a circumferential direction of each iron core assembly is provided on the tooth portion, the yoke portion is provided with a through hole corresponding to the tooth grooves, and a casing in communication with the through hole is arranged between each two adjacent iron core assemblies, and the stator axial channel is formed by the through hole and the casing. wherein the active cooling circuit comprises mutually communicating chambers (11a, 11b) located at two axial ends of the generator, an air gap between a rotor and a stator of the generator, and radial channels spaced apart along an axial direction of the stator, and a cooling device in communication with the closed space is provided in the active cooling circuit, and the stator is fixed on a fixed shaft through a stator bracket; wherein the passive cooling circuit comprises a first axial channel running through the stator in the axial direction, a second axial channel running through the stator bracket, and an outer surface of the generator; wherein a heat exchanger is further arranged inside the generator, the heat exchanger is in communication with the radial channels and the second axial channel, respectively; and wherein the stator comprises a plurality of iron core assemblies arranged at intervals along the axial direction, the radial channels are formed between every two adjacent iron core assemblies; the first axial channel comprises stator axial channels running through the plurality of iron core assemblies along the axial direction, each of the iron core assemblies comprises a yoke portion and a tooth portion integrally formed with the yoke portion, a plurality of tooth grooves arranged at intervals in a circumferential direction of each iron core assembly is provided on the tooth portion, the yoke portion is provided with a through hole corresponding to the tooth grooves, and a casing in communication with the through hole is arranged between each two adjacent iron core assemblies, and the stator axial channel is formed by the through hole and the casing.