It depends on what you want in the corners. If you don't need something too polished you can also use this plugin:

https://community.sketchucation.com/topic/106330/plugin-lines-to-tubes#p88592

It will work in one go: select all the lines and launch the plugin.