In wireless networks, the network queue stability (throughput-optimality) and the network utility maximization are two crucial tasks for network operators. Besides, new techniques of mobile communications, e.g. the non-orthogonal multiple access (NOMA), have emerged endlessly to meet coming challenges. In this paper, we for the first time, investigate a downlink NOMA system with flow-level dynamics, where long-lived flows and short-lived flows exist simultaneously, and formulate an optimization problem of user selection and power allocation. We aim to maximize the network utility at each time slot and simultaneously guarantee the throughput-optimality, under the quality of service (QoS) constraints. Considering the practicability of algorithm, the suboptimal algorithm containing two stages, is proposed. And we analyze the complexity of proposed algorithm. In the performance evaluation, the benchmark algorithm is provided for comparison. And we take the energy efficiency (EE) as an example of the network utility and define the scheduling delay (SD). Simulation results show that the suboptimal algorithm is throughput-optimal, and understandably, its performances could be better than those in the benchmark algorithm in terms of EE and SD, as long as the appropriate parameter is set.