98ee04a7 by 冯轩

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

2 parents cb8f31f8 35dc3f45
...@@ -2130,16 +2130,18 @@ class SearchGBHistoryFileView(GenericView): ...@@ -2130,16 +2130,18 @@ class SearchGBHistoryFileView(GenericView):
2130 return response.ok(data=True) 2130 return response.ok(data=True)
2131 2131
2132 class DownloadGBHistoryFileView(GenericView): 2132 class DownloadGBHistoryFileView(GenericView):
2133 permission_classes = [IsAuthenticated] 2133 # permission_classes = [IsAuthenticated]
2134 authentication_classes = [OAuth2AuthenticationWithUser] 2134 # authentication_classes = [OAuth2AuthenticationWithUser]
2135 2135
2136 @use_args(d_gb_file_args, location='data') 2136 @use_args(d_gb_file_args, location='data')
2137 def post(self, request, args): 2137 def post(self, request, args):
2138 2138 try:
2139 business_type = args.get('business_type') 2139 business_type = args.get('business_type')
2140 object_id = args.get('object_id') 2140 object_id = args.get('object_id')
2141 save_path = args.get('save_path') 2141 save_path = args.get('save_path')
2142 ecm = ECM() 2142 ecm = ECM()
2143 ecm.download(save_path, object_id, 'green_book', business_type) 2143 ecm.download(save_path, object_id, 'green_book', business_type)
2144 self.running_log.info('[DownloadGBHistoryFileView] [args={0}] '.format(args)) 2144 self.running_log.info('[DownloadGBHistoryFileView] [args={0}] '.format(args))
2145 return response.ok(data=True)
2146 except Exception as e:
2145 return response.ok(data=False) 2147 return response.ok(data=False)
...\ No newline at end of file ...\ 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!