Thanks for your query. based on the facts that you have posted it appears that you have acquired Genito Urinary tract infection
due to unprotected sex.along with Orchitis.
Consult qualified Urologist
for clinical examination .You may need to get some tests like
1) Routine Urine Test.
2) Urine culture
3) Blood test
to rule out STD.and Diabetes.
3) Ultrasound scanning of the scrotum done to confirm the diagnosis.
Please take some antibiotics like Doxycycline along with anti inflammatory drug like Diclofenac
twice daily for 10 days.
Get prescription of these drugs from your family Physician.