It is really comparatively easy. But I do not advise you to fix it by yourself, because you are not a professional after all. It is possible for you to make it worse. You can bring them to the store where you bought them or any optical stores. I believe that it will just take few minutes to fix them and it is also possible to fix them for free.
Repairing spring hinges on glasses can help you save money because you don't have to buy new glasses. You can either repair spring hinges on your own or take them to the opticla store to have them repaired. Just put the broken piece back in the place, then use a very small drill bit to drill the tiny screw in the hole. If you can't do it ny yourself, you should ask others for help. Howver, the best way is to have them fixed at your optician office's.