Example 3 Given that the lengths of the three sides of an acute triangle $\triangle ABC$ and the length of one of its altitudes are four consecutive integers, and that this altitude divides $\triangle ABC$ into two right triangles with integer side lengths. Find the lengths of the three sides of this triangle.

---

The translation maintains the original text's format and line breaks as requested.
Explanation: It can be considered in two steps: First, determine which of the 4 consecutive integers is the height, then discuss the base.

As shown in Figure 1, let the height be $AD$, and the 4 consecutive integers be $n, n+1, n+2, n+3$. Also, assume $AB < AC$, then $AD < AB < AC$. Therefore, $AD = n$ or $n+1$.

If $AD = n+1$, then $BC = n$.
Thus, $AB = n+2, AC = n+3$.
So, $BD = \sqrt{2n+3}, CD = 2\sqrt{n+2}$, and both are integers.
From $BD + CD = BC$, we get
$\sqrt{2n+3} + 2\sqrt{n+2} = n$, this equation has no integer solutions.
If $AD = n$, then
$BD \leq \sqrt{(n+2)^2 - n^2} = 2\sqrt{n+1}$,
$CD \leq \sqrt{(n+3)^2 - n^2} = \sqrt{6n+9}$.
Therefore, $n+1 \leq BC \leq 2\sqrt{n+1} + \sqrt{6n+9} < 5\sqrt{n+1}$.
Solving this, we get $n < 24$.
(1) When $BC = n+1$, then $AB = n+2, AC = n+3$. In this case, $BD = 2\sqrt{n+1}, CD = \sqrt{6n+9}$. There is no $n$ that satisfies $n < 24$ and $2\sqrt{n+1}, \sqrt{6n+9}$ are both integers.
(2) When $BC = n+2$, then $AB = n+1, AC = n+3$. In this case, $BD = \sqrt{2n+1}, CD = \sqrt{6n+9}$. The only $n$ that satisfies $n < 24$ and $\sqrt{2n+1}, \sqrt{6n+9}$ are both integers is $n = 12$, and it also satisfies $BD + CD = BC$. Thus,
$$
AB = 13, BC = 14, AC = 15.
$$
(3) When $BC = n+3$, then $AB = n+1, AC = n+2$. In this case, $BD = \sqrt{2n+1}, CD = 2\sqrt{n+1}$. There is no $n$ that satisfies $n < 24$ and $\sqrt{2n+1}, 2\sqrt{n+1}$ are both integers.
In summary, there is only one acute $\triangle ABC$ that meets the conditions, with side lengths of $13, 14, 15$.
Note: Before discussing the length of the base of the triangle, it is necessary to determine the range of the integer $n$.