  The theoretical predictions in the standard model (SM) and measurements on
the anomalous magnetic dipole moments (MDM) of muon and electron have great
precision, hence the MDMs of muon and electron have close relation with the new
physics (NP) beyond the SM. Recently, a negative $\sim2.4\sigma$ discrepancy
between the measured electron MDM and the SM prediction results from a recent
improved determination of the fine structure constant. Combined with the
long-lasting muon MDM discrepancy which is about $\sim3.7\sigma$, it is
difficult to explain both the magnitude and opposite signs of the deviations in
a consistent model, without introducing large flavour-violating effects. The
analysis shows that they can be explained in the minimal supersymmetric
extension (MSSM) of the SM with local $B-L$ gauge symmetry (B-LSSM). Comparing
with the MSSM, new parameters in the B-LSSM can affect the theoretical
predictions on lepton MDMs, and the effects of them are explored.
