Thanks for your query.Based on the facts that you have posted it appears that you have chronic Prostatitis
.Please get your routine urine and urine culture done and consult qualified Urologist
for clinical and digital rectal examination
to confirm the diagnosis.
You need to take broad spectrum antibiotics for a long period of 6 weeks along with anti inflammatory medication like Diclofenac
for 2 weeks.
Get the prescription of medicines from your family Physician.
Ensure to drink more water to keep your urine dilute and alkaline,
Please avoid sexual activities till it gets resolved completely.