Treatment for prostatitis requires medication selection based on the specific type. Doctors typically prescribe antibiotics, alpha-blockers, or anti-inflammatory drugs based on symptoms. Lifestyle adjustments can also help alleviate discomfort. Below is a reference for medication use in common situations:

1. **Bacterial prostatitis**: This is mostly caused by infection. Doctors often prescribe antibiotics such as levofloxacin and doxycycline. The medication must be taken according to the prescribed course and should not be stopped on one's own.

2. **Nonbacterial prostatitis**: This is relatively common and may be related to lifestyle. Alpha-blockers (such as tamsulosin) can be used to relieve urinary discomfort, or nonsteroidal anti-inflammatory drugs (NSAIDs) can be used to reduce pain.
3. **Chronic pelvic pain syndrome**: Treatment focuses on relieving symptoms, possibly combining analgesics and muscle relaxants, and recommends avoiding prolonged sitting and reducing spicy foods.
Drink plenty of water and urinate regularly. Avoid prolonged cycling or sitting. If symptoms recur, please seek medical attention promptly for examination. A doctor will assess the symptoms and adjust the treatment plan accordingly. Do not self-medicate or rely on folk remedies.