98ee04a7 by 冯轩

Merge branch 'feature/CHINARPA-5131-5234' into feature/uat-tmp

2 parents cb8f31f8 35dc3f45
......@@ -2130,16 +2130,18 @@ class SearchGBHistoryFileView(GenericView):
return response.ok(data=True)
class DownloadGBHistoryFileView(GenericView):
permission_classes = [IsAuthenticated]
authentication_classes = [OAuth2AuthenticationWithUser]
# permission_classes = [IsAuthenticated]
# authentication_classes = [OAuth2AuthenticationWithUser]
@use_args(d_gb_file_args, location='data')
def post(self, request, args):
try:
business_type = args.get('business_type')
object_id = args.get('object_id')
save_path = args.get('save_path')
ecm = ECM()
ecm.download(save_path, object_id, 'green_book', business_type)
self.running_log.info('[DownloadGBHistoryFileView] [args={0}] '.format(args))
return response.ok(data=True)
except Exception as e:
return response.ok(data=False)
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!