More `General' Chinese Remainder Theorem
Yes, of course. You can just set $m := p_1^{r_1}$ and $n = p_2^{r_2}p_3^{r_3}\cdot \ldots \cdot p_n^{r_n}$ and start a recursion from there on. The theorem is true in a way more general context, see https://en.wikipedia.org/wiki/Chinese_remainder_theorem#Generalization_to_arbitrary_rings for details. However, in this general setting, you only get an existence result, no algorithms to actually compute the isomorphism in general.
The other answers have already answered perfectly. For those who want an even more general version of the theorem, you can find it in Universal algebra :
Let $A$ be an algebra, $\theta_0, \theta_1$ be two congruences on $A$ that are permutable (i.e. $\theta_0 \theta_1 = \theta_1\theta_0$), and such that $\theta_0\land \theta_1 = \Delta$, $\theta_0 \lor \theta_1 = \Omega$ ($\Delta= \{(a,a), a\in A\}, \Omega = \{(a,b), a,b\in A\}$).
Then $A \simeq A/\theta_0 \times A/\theta_1$.
The obvious morphism is well-defined because they are congruences, it is surjective because of the last condition and because they are permutable (because then, $\theta_0\lor\theta_1 = \theta_0\theta_1$), and it is injective because their g.l.b. is $\Delta$