Thanks for your query.Based on the facts that you have posted it appears that you have pain in your penis immediately after sex.and while passing urine.
This is common to have pain in penis after sex due to congestion of urethra
that occurs during erection and ejaculation and remains for couple of hours.
Please take broad spectrum antibiotics along with anti inflammatory medication like Diclofenac
twice daily .
Get the prescription of medicines from your family Physician.
Ensure to drink more water.To keep your urine dilute This will help to control dysuria