The increasing number of small and medium-sized prosumers with distributed energy resources (DERs) has led to the need for innovative operational strategies at the distribution system level. Among them, microgrid (MG) energy management for peer-to-peer power sharing between prosumers is a promising approach. In this study, we develop a multi-time scale optimization method for virtual battery model-based prosumer energy management. First, a day-ahead optimal scheduling model is established based on an integrated virtual battery model that aims to minimize the total dispatching cost of a prosumer-oriented MG without impacting the privacy of individual end-prosumers. Then, close to real-time operation, model predictive control is applied to minimize the deviation between the real-time power and the day-ahead optimal schedule over the control horizon for prosumers with energy storage resources. The simulation results show that the proposed approach employing the integrated virtual battery model to quantitatively characterize the resource flexibility of prosumers yields a good optimization performance and high computing efficiency, compared to those of the approaches modelling traditional DER flexibilities.