A self-powered triboelectric nanosensor for detecting the corrosion state of magnesium treated by micro-arc oxidation