modifier_apply not working when objects created in a specific order
In oper() when you call bpy.ops.object.modifier_apply() it works on the active object, which is the last object you created - the cylinder.

After you select obj1 in oper() also make obj1 the active object and you will get the result you want.

obj1.select=True
S.objects.active = obj1