The smart grid (SG) is a new type of grid that integrates traditional power grid with the Internet of Things (IoT) to make the entire grid system more compatible, controllable and self-healing. However, the flourishing of SG still faces some challenges in term of privacy-preserving data aggregation. Previous multi-dimensional data aggregation schemes need heavy computation operations, cannot support multi-subset data aggregation, and resist neither collusion attack among the gateway (GW) and control center (CC) nor differential attack. To solve these issues, we propose a privacy-preserving data aggregation scheme for fog-based smart grids to achieve multi-dimensional and multi-subset data aggregation. The parallel composability of differential privacy is used to reasonably allocate the privacy budget, which can provide higher data utility in multi-dimensional data aggregation. In addition, each user's multi-dimensional power consumption data will be structured as a composite data by utilizing Chinese Remainder Theorem (CRT), which will further reduce the computational overhead. Security analysis shows that our scheme can resist differential attack, eavesdropping attack, collusion attack and active attack. Evaluation of the performance also demonstrates that our scheme is more efficient in terms of computational overhead and communication overhead.