Thanks for your query,based on the facts that you have posted it appears that you have undergone surgery for Inguinal Hernia
which was followed by swelling and bruising of the scrotum
and base of the penis.
This is common to have swelling and bruising of the scrotum and soft tissue
around base of the penis after surgery of Inguinal hernia.
Normally it gets resolved within 3-4 weeks .
As regards bending of the penis it is most likely to be due to oedema at the base of the penis awich will also get cured within 3 -4 weeks.
Please take broad spectrum antibiotic like Cefexine along with anti inflammatory drug like Diclofenac