Dissipative particle dynamics (DPD) is an effective mesoscopic particle model with a lower computational cost than molecular dynamics because of the soft potentials that it employs. However, the soft potential is not strong enough to prevent the DPD particles that are used to represent the fluid from penetrating solid boundaries represented by stationary DPD particles. A phase-field variable, phi(x,t), is used to indicate the phase at point x and time t, with a smooth transition from -1 (phase 1) to +1 (phase 2) across the interface. We describe an efficient implementation of no-slip boundary conditions in DPD models that combines solid-liquid particle-particle interactions with reflection at a sharp boundary located with subgrid scale accuracy using the phase field. This approach can be used for arbitrarily complex flow geometries and other similar particle models (such as smoothed particle hydrodynamics), and the validity of the model is demonstrated by DPD simulations of flow in confined systems with various geometries.